DOFOperation ClassOpenDOF Object Access Library
DOFOperation encapsulates methods for working with operations while they are pending processing or during various phases of processing.
Inheritance Hierarchy

SystemObject
  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

  NameDescription
Protected methodDOFOperation
Initializes a new instance of the DOFOperation class
Top
Methods

  NameDescription
Public methodcancel
Cancel the operation.
Public methodcheckException
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.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodextend
Extend the operation.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodgetContext
Get the operation context.
Public methodgetException
Return an exception, if any, associated with this operation as a response.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodgetTimeRemaining
Get the operation time remaining.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodisAcknowledged
Return whether or not the operation has been acknowledged.
Public methodisCancelled
Public methodisComplete
Is the operation complete.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodretry
Retry the operation.
Public methodsetTimeout
Set a new timeout value for the operation.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodwaitAcknowledged
Block the current thread until the operation is acknowledged or has completed, or until the specified timeout expires.
Public methodwaitComplete
Block the current thread until the operation has completed.
Public methodwaitComplete(Int32)
Block the current thread until the operation has completed, or until the specified timeout expires.
Top
Remarks

DOFOperation encapsulates methods for working with operations while they are pending processing or during various phases of processing. For example, all asynchronous requests return a DOFOperation so that it may be tracked or cancelled, etc.

Additionally, there are 6 operations that may result in an exception from the Provider. They are: Get , Set , Invoke , Session , Subscribe , and Register . They all can result in a DOFErrorException and the first 4 can also result in a DOFProviderException . The following describes where these exceptions are passed back to the requestor.

  • Get, Set, and Invoke return a value and therefore the exceptions can be trapped in 3 ways (illustrated with Get):
    1. Synchronous: Call DOFObject.get(Property, int)
    2. Blocking asynchronous: Call DOFObject.beginGet(Property, int) , then block with Get.waitResult(int)
    3. 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).
Although any of these 6 operations can result in a DOFErrorException, the many specific DOFErrorException codes are only relevant in certain contexts. See the individual DOFErrorException codes for details.
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)