Top   Module   Use   Manual   Index 
 EXPORTING SERVICES | METHODS' SUMMARY | METHODS' DETAILS 

com :: sun :: star :: ucb ::

interface XCommandProcessor

Base Interface
com::sun::star::uno::XInterface

[ DEPRECATED ]
Description
defines a processor for synchronous commands, which are executed in a specific execution environment.
See also
com::sun::star::ucb::XCommandProcessor2
for the improved version of this interface.
See also
Command
See also
XCommandEnvironment
See also
XContent


Known Services which Export this Interface

com::sun::star::ucb::HierarchyRootFolderContent A HCP Root Folder is the root container for all other HCP Folders and HCP Links.
com::sun::star::ucb::WebDAVFolderContent A DCP Folder is a container for other DCP Folders or Documents.
com::sun::star::ucb::UniversalContentBroker is a one-instance service that provides access to a set of Content s via ContentProvider s.
com::sun::star::ucb::HierarchyFolderContent A HCP Folder is a container for other HCP Folders and HCP Links.
com::sun::star::ucb::FileContent A File Content represents either a directory or a file in the local file system.
com::sun::star::ucb::PackageFolderContent A PCP Folder is a container for other PCP Folders and PCP Streams.
com::sun::star::ucb::PackageStreamContent A PCP Stream is a content which represents a file inside a package.
com::sun::star::ucb::WebDAVDocumentContent A DCP Document is a container for Document data/content.
com::sun::star::ucb::HierarchyLinkContent A HCP Link is a content which points to another location.
com::sun::star::ucb::ChaosContent [ DEPRECATED ]
A Chaos Content is a representation of a resource provided by the Chaos Content Provider.
com::sun::star::ucb::Content A Content is a service that provides access to data of a content provided by an implementation of the service ContentProvider .

Methods' Summary

createCommandIdentifier creates a unique identifier for a command.
execute executes a command.
abort ends the command associated with the given id.

Methods' Details

createCommandIdentifier
 
long
createCommandIdentifier();
Description
creates a unique identifier for a command.

This identifier can be used to abort the execution of the command accociated with that identifier. Note that it is generally not necessary to obtain a new id for each command, because commands are executed synchronously. So the id for a command is valid again after a command previously associated with this id has finished. In fact you only should get one identifier per thread and assign it to every command executed by that thread.

Also, after a call to XCommandProcessor::abort , an identifier should not be used any longer (and instead be released by a call to XCommandProcessor2::releaseCommandIdentifier ), because it may well abort all further calls to XCommandProcessor::execute .

To avoid ever-increasing resource consumption, the identifier should be released via XCommandProcessor2::releaseCommandIdentifier when it is no longer used.

Returns
a command identifier.
execute
 
any
execute(
[ in ] com::sun::star::ucb::Command aCommand,
[ in ] long CommandId,
[ in ] com::sun::star::ucb::XCommandEnvironment Environment )
raises ( com::sun::star::uno::Exception, com::sun::star::ucb::CommandAbortedException );

Description
executes a command.

Common command definitions can be found in the soecification of the service Content .

Parameter aCommand
is the command to execute.
Parameter CommandId
is a unique id for the command. This identifier was obtained by calling XCommandProcessor::createCommandIdentifier . A value of zero can be used, if the command never shall be aborted. Different threads MUST NOT share one command identifier (except 0 ). This can easily achieved, if every thread that wants to use an XCommandProcessor , obtains exactly one identifier using XCommandProcessor::createCommandIdentifier . This identifier can be used for every call to XCommandProcessor::execute done by that thread.
Parameter Environment
is the execution environment.
Returns
the result according to the specification of the command.
Throws
CommandAbortedException to indicate that the command was aborted.
Throws
DuplicateCommandIdentifierException to indicate that two threads tried to use the same command identifier
Throws
Exception if an error occured during the execution of the command.
abort
 
[ oneway ] void
abort(
[ in ] long CommandId );

Description
ends the command associated with the given id.
Parameter CommandId
is a unique id for the command to abort. This must be the identifier passed to XCommandProcessor::execute for the command to abort.

Top of Page