DOFObject ClassOpenDOF Object Access Library
The DOFObject class represents an DOF Provider Object and is one of the core classes of the framework.
Inheritance Hierarchy

SystemObject
  org.opendof.core.oalDOFObject

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public sealed class DOFObject

The DOFObject type exposes the following members.

Methods

  NameDescription
Public methodadvertise(DOFInterfaceID)
Used by a Provider to advertise that the specified interface can be provided.
Public methodadvertise(DOFInterfaceID, DOFOperationControl)
Used by a Provider to advertise that the specified interface can be provided, specifying a Control for this operation. This call is beneficial at startup to notify potentially interested nodes of this provider's capability. The advertise solicits matching DOFInterestLevel.WATCH , DOFInterestLevel.ACTIVATE , and DOFInterestLevel.CONNECT interest. NOTE: This advertise will be sent to all security compatible nodes and timeout after 5 seconds. For a long-term advertise use beginAdvertise(DOFInterfaceID, int) .
Public methodbeginAdvertise(DOFInterfaceID, Int32)
Used by a Provider to advertise that the specified interface can be provided, specifying a timeout for this operation.
Public methodbeginAdvertise(DOFInterfaceID, DOFOperationControl, Int32)
Used by a Provider to advertise that the specified interface can be provided, specifying a Control and a timeout for this operation. While the operation timeout has not been reached the operation will be retried periodically as well as be sent over new connections as they come up. This call is beneficial at startup to notify potentially interested nodes of this provider's capability. The advertise solicits matching DOFInterestLevel.WATCH , DOFInterestLevel.ACTIVATE , and DOFInterestLevel.CONNECT interest.
Public methodbeginDefine(DOFInterfaceID, Int32, DOFObjectDefineOperationListener, Object)
Used by a Requestor to obtain an interface definition asynchronously.
Public methodbeginDefine(DOFInterfaceID, DOFOperationControl, Int32, DOFObjectDefineOperationListener, Object)
Used by a Requestor to obtain an interface definition asynchronously.
Public methodbeginGet(DOFInterfaceProperty, Int32)
Used by a Requestor to get a property's value asynchronously or to request a property's value from multiple providers using an object with the DOFObjectID.BROADCAST ID.

Note: Since no GetOperationListener is defined the initial result can only be obtained by calling Get.waitResult(int) on the returned operation. If the number of responders is unknown -- as is typically the case when making requests on an object with the DOFObjectID.BROADCAST ID -- then:

  1. The operation will always wait for the entire timeout period.
  2. Only the initial result will be available. To receive multiple responses specify a listener calling beginGet(Property, int, GetOperationListener)

Public methodbeginGet(DOFInterfaceProperty, Int32, DOFObjectGetOperationListener)
Used by a Requestor to get a property's value asynchronously or to request a property's value from multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginGet(DOFInterfaceProperty, Int32, DOFObjectGetOperationListener, Object)
Used by a Requestor to get a property's value asynchronously or to request a property's value from multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginGet(DOFInterfaceProperty, DOFOperationControl, Int32, DOFObjectGetOperationListener, Object)
Used by a Requestor to get a property's value asynchronously as specified using a Control or to request a property's value from multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginInvoke(DOFInterfaceMethod, IListDOFValue, Int32)
Used by a Requestor to invoke (or call) a method asynchronously or to invoke a method on multiple providers using an object with the DOFObjectID.BROADCAST ID. Note: Since no InvokeOperationListener is defined the initial result can only be obtained by calling Invoke.waitResult(int) . *
  1. The operation will always wait for the entire timeout period.
  2. Only the initial result will be available. To receive multiple responses specify a listener calling beginInvoke(Method, System.Collections.Generic.IList<E>, int, InvokeOperationListener)
Public methodbeginInvoke(DOFInterfaceMethod, Int32, DOFValue)
Used by a Requestor to invoke (or call) a method asynchronously or to invoke a method on multiple providers using an object with the DOFObjectID.BROADCAST ID. Note: Since no SetOperationListener is defined the initial result can only be obtained by calling Invoke.waitResult(int) . *
  1. The operation will always wait for the entire timeout period.
  2. Only the initial result will be available. To receive multiple responses specify a listener calling beginInvoke(Method, int, InvokeOperationListener, DOFValue[])
Public methodbeginInvoke(DOFInterfaceMethod, IListDOFValue, Int32, DOFObjectInvokeOperationListener)
Used by a Requestor to invoke (or call) a method asynchronously or to invoke a method on multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginInvoke(DOFInterfaceMethod, Int32, DOFObjectInvokeOperationListener, DOFValue)
Used by a Requestor to invoke (or call) a method asynchronously or to invoke a method on multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginInvoke(DOFInterfaceMethod, IListDOFValue, Int32, DOFObjectInvokeOperationListener, Object)
Used by a Requestor to invoke (or call) a method asynchronously or to invoke a method on multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginInvoke(DOFInterfaceMethod, Int32, DOFObjectInvokeOperationListener, Object, DOFValue)
Used by a Requestor to invoke (or call) a method asynchronously or to invoke a method on multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginInvoke(DOFInterfaceMethod, DOFOperationControl, Int32, DOFObjectInvokeOperationListener, Object, DOFValue)
Used by a Requestor to invoke (or call) a method asynchronously as specified using a Control . Or to invoke a method on multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginInvoke(DOFInterfaceMethod, IListDOFValue, DOFOperationControl, Int32, DOFObjectInvokeOperationListener, Object)
Used by a Requestor to invoke (or call) a method asynchronously as specified using a Control . Or to invoke a method on multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginProvide(DOFInterface, DOFObjectProvider)
Used by a Provider to begin providing the specified interface indefinitely (equivalent to specifying a timeout of DOF.TIMEOUT_NEVER ). To quit providing use DOFOperation.cancel() .
Public methodbeginProvide(DOFInterface, Int32, DOFObjectProvider)
Used by a Provider to begin providing the specified interface.
Public methodbeginProvide(DOFInterface, Int32, DOFObjectProvider, Object)
Used by a Provider to begin providing the specified interface.
Public methodbeginRegister(DOFInterfaceEvent, Int32, DOFObjectEventOperationListener, Object) Obsolete.
Used by a Requestor to register an event handler to be notified whenever an event occurs.
Public methodbeginRegister(DOFInterfaceEvent, DOFOperationControl, Int32, DOFObjectEventOperationListener, Object) Obsolete.
Used by a Requestor to register an event handler, as specified using a Control , to be notified whenever an event occurs.

NOTE: Interest is required (through DOFSystem.beginInterest(DOFObjectID, DOFInterestLevel) for this operation in order to determine the primary provider. If no interest is specified, then this operation will result in a DOFErrorException.TIMEOUT exception.

NOTE: If the primary provider changes during the lifetime of this operation, and the Control response level includes exceptions, then see EventOperationListener.eventSignaled(Register, DOFProviderInfo, System.Collections.Generic.IList<E>, DOFException) for what to do.

Public methodbeginSession(DOFInterface, DOFInterfaceID)
Used by a Requestor to begin a session with an indefinite duration (equivalent to specifying a timeout of DOF.TIMEOUT_NEVER ). A session is an object provided exclusively for a requestor. No other requestor is allowed to access the session object. Use Session.waitSession(int) to ensure that the session object is available. Use DOFSystem.waitProvider(DOFInterfaceID, int) to make sure there's a route to the provider. The session ends when its timeout expires or when the session operation is cancelled. Attempting to open a session on a "session object" (an object returned by Session.waitSession(int) ) is not supported.

NOTE: It is not necessary to call

destroy()
on the session object. The library will destroy the session object when the operation completes or is cancelled.

NOTE: Interest is required (through DOFSystem.beginInterest(DOFObjectID, DOFInterestLevel) for this operation in order to determine the primary provider. If no interest is specified, then this operation will result in a DOFErrorException.TIMEOUT exception.

NOTE: If the primary provider changes during the lifetime of this operation, and the Control response level includes exceptions, then see SessionOperationListener.complete(DOFOperation, DOFException) .

Public methodbeginSession(DOFInterface, DOFInterfaceID, DOFObjectSessionOperationListener)
Used by a Requestor to begin a session with an indefinite duration (equivalent to specifying a timeout of DOF.TIMEOUT_NEVER ). A session is an object provided exclusively for a requestor. No other requestor is allowed to access the session object. Use Session.waitSession(int) to ensure that the session object is available. Use DOFSystem.waitProvider(DOFInterfaceID, int) to make sure there's a route to the provider. The session ends when its timeout expires or when the session operation is cancelled. Attempting to open a session on a "session object" (an object returned by Session.waitSession(int) ) is not supported.

NOTE: It is not necessary to call

destroy()
on the session object. The library will destroy the session object when the operation completes or is cancelled.

NOTE: Interest is required (through DOFSystem.beginInterest(DOFObjectID, DOFInterestLevel) for this operation in order to determine the primary provider. If no interest is specified, then this operation will result in a DOFErrorException.TIMEOUT exception.

NOTE: If the primary provider changes during the lifetime of this operation, and the Control response level includes exceptions, then see SessionOperationListener.complete(DOFOperation, DOFException) .

Public methodbeginSession(DOFInterface, DOFInterfaceID, Int32, DOFObjectSessionOperationListener)
Used by a Requestor to begin a session.
Public methodbeginSession(DOFInterface, DOFInterfaceID, Int32, DOFObjectSessionOperationListener, Object)
Used by a Requestor to begin a session.
Public methodbeginSession(DOFInterface, DOFInterfaceID, DOFOperationControl, Int32, DOFObjectSessionOperationListener, Object)
Used by a Requestor to begin a session.
Public methodbeginSet(DOFInterfaceProperty, DOFValue, Int32)
Used by a Requestor to set a property's value asynchronously or to set a property's value on multiple providers using an object with the DOFObjectID.BROADCAST ID.

Note: Since no SetOperationListener is defined the initial result may be obtained by calling Set.waitResult(int) . If the number of responders is unknown -- as is typically the case when making requests on an object with the DOFObjectID.BROADCAST ID -- then:

  1. The operation will always wait for the entire timeout period.
  2. Only the initial result will be available. To receive multiple responses specify a listener calling beginSet(Property, DOFValue, int, SetOperationListener)

Public methodbeginSet(DOFInterfaceProperty, DOFValue, Int32, DOFObjectSetOperationListener)
Used by a Requestor to set a property's value asynchronously or to set a property's value on multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginSet(DOFInterfaceProperty, DOFValue, Int32, DOFObjectSetOperationListener, Object)
Used by a Requestor to set a property's value asynchronously or to set a property's value on multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginSet(DOFInterfaceProperty, DOFValue, DOFOperationControl, Int32, DOFObjectSetOperationListener, Object)
Used by a Requestor to set a property's value asynchronously as specified using a Control or to set a property's value on multiple providers using an object with the DOFObjectID.BROADCAST ID.
Public methodbeginSubscribe(DOFInterfaceProperty, Int32, Int32, DOFObjectSubscribeOperationListener, Object) Obsolete.
Used by a Requestor to begin a subscription, to be notified of changes to a property's value.
Public methodbeginSubscribe(DOFInterfaceProperty, Int32, DOFOperationControl, Int32, DOFObjectSubscribeOperationListener, Object) Obsolete.
Used by a Requestor to begin a subscription, as specified using a Control , to be notified of changes to a property's value.

NOTE: The Property's current value is always returned when the subscription is started.

NOTE: Intermediate changes that occur more frequently than minPeriod may be dropped to save bandwidth, but the most current value of the Property is always returned.

NOTE: Interest is required (through DOFSystem.beginInterest(DOFObjectID, DOFInterestLevel) for this operation in order to determine the primary provider. If no interest is specified, then this operation will result in a DOFErrorException.TIMEOUT exception.

NOTE: If the primary provider changes during the lifetime of this operation, and the Control response level includes exceptions, then see SubscribeOperationListener.propertyChanged(Subscribe, DOFProviderInfo, DOFValue, DOFException) for what to do.

Public methodchanged
Used by a Provider to notify all subscribers that a property's value has changed.
Public methoddefine(DOFInterfaceID, Int32)
Used by a Requestor to get the definition of an interface.
Public methoddefine(DOFInterfaceID, DOFOperationControl, Int32)
Used by a Requestor to get the definition of an interface.
Public methoddestroy
Destroy an object that has been created by the system.
Public methodEquals (Overrides ObjectEquals(Object).)
Public methodget(DOFInterfaceProperty, Int32)
Used by a Requestor to get a property's value.
Public methodget(DOFInterfaceProperty, DOFOperationControl, Int32)
Used by a Requestor to get a property's value as specified using a Control .
Public methodGetHashCode (Overrides ObjectGetHashCode.)
Public methodgetInterfaces
Get the set of interfaces currently being provided on the object.
Public methodgetObjectID
Get this provider's object identifier.
Public methodgetSystem
Get this provider's system.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodinvoke(DOFInterfaceMethod, IListDOFValue, Int32)
Used by a Requestor to invoke (or call) a method.
Public methodinvoke(DOFInterfaceMethod, Int32, DOFValue)
Used by a Requestor to invoke (or call) a method.
Public methodinvoke(DOFInterfaceMethod, DOFOperationControl, Int32, DOFValue)
Used by a Requestor to invoke (or call) a method as specified using a Control .
Public methodinvoke(DOFInterfaceMethod, IListDOFValue, DOFOperationControl, Int32)
Used by a Requestor to invoke (or call) a method as specified using a Control .
Public methodisInterestRequested
Used by a Provider to determine if interest currently requested for the specified interface.
Public methodisSignalRequired
Used by a Provider to determine whether or not calling signal is necessary when a specified event occurs.
Public methodset(DOFInterfaceProperty, DOFValue, Int32)
Used by a Requestor to set a property's value.
Public methodset(DOFInterfaceProperty, DOFValue, DOFOperationControl, Int32)
Used by a Requestor to set a property's value as specified using a Control .
Public methodsignal(DOFInterfaceEvent, DOFValue)
Used by a Provider to notify all registered event handlers that an event has occurred.
Public methodsignal(DOFInterfaceEvent, IListDOFValue)
Used by a Provider to notify all registered event handlers that an event has occurred.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The DOFObject class represents an DOF Provider Object and is one of the core classes of the framework.

Each DOFObject represents either:

  1. A Provider being provided by this application.
  2. A Provider being provided somewhere on the network (in this case, the application will be accessing the Provider in the role of Requestor).
Many methods have both synchronous and asynchronous forms. Asynchronous methods use the prefix, "Begin...". For example, to set a property synchronously you use "Set(...", and to set it asynchronously, you use "BeginSet(...".

Constructing DOFObject:

DOFObject instances are constructed through the DOFSystem with DOFSystem.createObject(DOFObjectID) .

See Also

Reference

DOFObject