DOFOperation encapsulates methods for working with
operations while they are pending processing or during various phases of
processing.
Inheritance Hierarchy
org.opendof.core.oalDOFOperation
Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax
C#
public abstract class DOFOperation
The DOFOperation type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | DOFOperation | Initializes a new instance of the DOFOperation class |
Methods
Name | Description | |
---|---|---|
![]() | cancel | Cancel the operation. |
![]() | checkException |
If this operation has resulted in any exception(s), checkException() will
throw the first exception (since multiple exceptions are possible for some operations),
otherwise, it will return immediately.
|
![]() | Equals | (Inherited from Object.) |
![]() | extend | Extend the operation. |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | getContext | Get the operation context. |
![]() | getException | Return an exception, if any, associated with this operation as a response.
|
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | getTimeRemaining | Get the operation time remaining. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | isAcknowledged | Return whether or not the operation has been acknowledged. |
![]() | isCancelled | |
![]() | isComplete | Is the operation complete. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | retry | Retry the operation. |
![]() | setTimeout | Set a new timeout value for the operation. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | waitAcknowledged |
Block the current thread until the operation is acknowledged or has
completed, or until the specified timeout expires.
|
![]() | waitComplete | Block the current thread until the operation has completed. |
![]() | waitComplete(Int32) |
Block the current thread until the operation has completed, or until the
specified timeout expires.
|
Remarks
- Get, Set, and Invoke return a value and therefore the exceptions can be trapped in 3 ways (illustrated with Get):
- Synchronous: Call DOFObject.get(Property, int)
- Blocking asynchronous: Call DOFObject.beginGet(Property, int) , then block with Get.waitResult(int)
- Non-blocking asynchronous: Call DOFObject.beginGet(Property, int) , then wait for GetOperationListener.getResult(Get, DOFProviderInfo, DOFValue, DOFException) to be called
- Session returns a session ID, so exceptions are trapped in Session.waitSession() (blocking asynchronous).
- Subscribe exceptions are passed into Listener (non-blocking asynchronous).
See Also
Reference
DOFObject.beginGet(Property, int)
DOFObject.beginSet(Property, DOFValue, int)
DOFObject.beginInvoke(Method, int, DOFValue[])
DOFObject.beginProvide(DOFInterface, Provider)
DOFSystem.beginQuery(DOFQuery, QueryOperationListener)
DOFSystem.createSubscription(DOFObjectID, Property, int, Listener)
DOFSystem.createRegistration(DOFObjectID, Event, Listener)