This is the part of the interface to the Operation Manager that is not public.
import "IOperationManager.idl";
Public Member Functions | |
void | RegisterObserverInternal (in string address) raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException) |
void | CreateOperationInternal (in string userData, out TToiOperationId operationId) raises (TToiNotEnoughResourcesException) |
void | CreateOperation (in IToiApplicationService::TToiApplicationId applicationId, in string userData, out TToiOperationId operationId) raises (TToiNotEnoughResourcesException) |
void | CancelOperation (in TToiOperationId operationId) raises (TToiInvalidArgumentException) |
void | ReleaseOperation (in TToiOperationId operationId) raises (TToiInvalidArgumentException) |
void | GetOperationInfo (in TToiOperationId operationId, out TToiOperationInfo operationInfo) raises (TToiInvalidArgumentException) |
void | RegisterObserver (in IToiApplicationService::TToiApplicationId applicationId, in string address) raises (TToiInvalidArgumentException) |
void | ReleaseObserver (in string address) raises (TToiInvalidArgumentException) |
Public Attributes | |
Operation error codes | |
const TToiOperationError | OP_ERROR_FAILED = -1 |
const TToiOperationError | OP_ERROR_CANCELLED = -2 |
Operation results | |
const TToiOperationResult | OP_RESULT_NONE = 0 |
Public Types | |
typedef TToiOperationId | TOperationId |
typedef TToiOperationResult | TOperationResult |
typedef TToiOperationError | TOperationError |
typedef TToiOperationState | TOperationState |
typedef TToiOperationInfo | TOperationInfo |
enum | TToiOperationState { OPERATION_PENDING, OPERATION_COMPLETED, OPERATION_FAILED } |
typedef long | TToiOperationId |
typedef long | TToiOperationResult |
typedef long | TToiOperationError |
typedef long | TToiPropertyId |
typedef string | TToiPropertyValue |
typedef sequence< TToiProperty > | TToiPropertySequence |
typedef long IToiOperationManager::TToiOperationError [inherited] |
Type for operation errors.
typedef long IToiOperationManager::TToiOperationId [inherited] |
Type for operation identifier.
typedef long IToiOperationManager::TToiOperationResult [inherited] |
Type for operation results.
typedef long IToiOperationManager::TToiPropertyId [inherited] |
Identifier for a metadata property. This with TToiPropertyValue forms a key-value pair that is used by the TToiOperationInfo to provide additional information about operation informaiton .
typedef sequence< TToiProperty > IToiOperationManager::TToiPropertySequence [inherited] |
Sequence of property tags.
typedef string IToiOperationManager::TToiPropertyValue [inherited] |
Value for a metadata property. This with TToiPropertyId forms a key-value pair that is used by the TToiOperationInfo toprovide additional information about operation informaiton .
enum IToiOperationManager::TToiOperationState [inherited] |
void IToiOperationManager::CancelOperation | ( | in TToiOperationId | operationId | ) | raises (TToiInvalidArgumentException) [inherited] |
Requests an operation to stop execution.
operationId | Operation identifier. |
TToiInvalidArgumentException | Raised if any of the parameters to the call are invalid. |
void IToiOperationManager::CreateOperation | ( | in IToiApplicationService::TToiApplicationId | applicationId, | |
in string | userData, | |||
out TToiOperationId | operationId | |||
) | raises (TToiNotEnoughResourcesException) [inherited] |
Creates a new operation. The operation identifier is used when starting a asynchronous request. When the operation is completed the operation shall either be released by calling ReleaseOperation() or reused for another request.
applicationId | The identifier of the application. | |
userData | The user defined data to be passed as parameter for identification in all operation callbacks. |
operationId | Operation identifier. |
TToiNotEnoughResourcesException | Raised if too many operations are active and the system cannot create another operation. |
void IOperationManager::CreateOperationInternal | ( | in string | userData, | |
out TToiOperationId | operationId | |||
) | raises (TToiNotEnoughResourcesException) |
This function works the same way as the CreateOperation in IToiOperationManager. It should be used by platform services since no application id is needed.
userData | The user defined data to be passed as parameter for identification in all operation callbacks. |
operationId | Operation identifier. |
TToiNotEnoughResourcesException | Raised if too many operations are active and the system cannot create another operation. |
void IToiOperationManager::GetOperationInfo | ( | in TToiOperationId | operationId, | |
out TToiOperationInfo | operationInfo | |||
) | raises (TToiInvalidArgumentException) [inherited] |
Returns information about given operation. This method is normally not useful for an application that is listening to operation events since the same information is provided in the callback.
In some circumstances it may still be relevant to use this method and that is when the application is using a polled approach to handle operation results instead of callbacks. But also if the application do not handle an incoming callback directly and want to get the latest updated operation information.
operationId | Operation identifier. |
operationInfo | The current operation information. |
TToiInvalidArgumentException | Raised if any of the parameters to the call are invalid. |
void IToiOperationManager::RegisterObserver | ( | in IToiApplicationService::TToiApplicationId | applicationId, | |
in string | address | |||
) | raises (TToiInvalidArgumentException) [inherited] |
Register an observer of type IToiOperationObserver. The observer will receive events sent by this IToiOperationManager instance.
applicationId | The identifier of the observing application. | |
address | The address where the IToiOperationManager can find an IToiOperationObserver interface. |
TToiInvalidArgumentException | Raised if the specified address is invalid or if the application has already registered itself as an observer with the same address. |
void IOperationManager::RegisterObserverInternal | ( | in string | address | ) | raises (TToiInvalidArgumentException, TToiNotEnoughResourcesException) |
This function works the same way as the RegisterObserver in IToiOperationManager. It should be used by platform services since no application id is needed.
address | The address to the observer implementing the IToiOperationObserver interface. |
TToiInvalidArgumentException | Raised if the specified address is invalid. | |
TToiNotEnoughResourcesException | Raised if the system cannot allocate resources to handle the observer. |
void IToiOperationManager::ReleaseObserver | ( | in string | address | ) | raises (TToiInvalidArgumentException) [inherited] |
Release an observer previously registered with RegisterObserver.
address | The address where the IToiOperationManager can find the registered IToiOperationObserver interface. |
TToiInvalidArgumentException | Raised if the specified address is invalid. |
void IToiOperationManager::ReleaseOperation | ( | in TToiOperationId | operationId | ) | raises (TToiInvalidArgumentException) [inherited] |
Releases any system resources associated with the operation and if needed cancels the operation as well. This method shall be called when the application is done with the operation and will use it no more.
operationId | Operation identifier. |
TToiInvalidArgumentException | Raised if any of the parameters to the call are invalid. |
const TToiOperationError IToiOperationManager::OP_ERROR_CANCELLED = -2 [inherited] |
Operation was canceled by user.
This constant can also be accessed from toi.consts.IToiOperationManager.OP_ERROR_CANCELLED.
const TToiOperationError IToiOperationManager::OP_ERROR_FAILED = -1 [inherited] |
Operation failed for unknown reason.
This constant can also be accessed from toi.consts.IToiOperationManager.OP_ERROR_FAILED.
const TToiOperationResult IToiOperationManager::OP_RESULT_NONE = 0 [inherited] |
The operation has no result. Can be used for operations that perform some action and only indicate progress, success and failure.
This constant can also be accessed from toi.consts.IToiOperationManager.OP_RESULT_NONE.