public final class DOFObject
extends java.lang.Object
DOFSystem.createObject(org.opendof.core.oal.DOFObjectID)
.DOFObjectID
,
DOFObject
,
DOFInterface
Modifier and Type | Class and Description |
---|---|
static class |
DOFObject.DefaultProvider
The DefaultProvider class implements
DOFObject.Provider . |
static interface |
DOFObject.DefineOperationListener
This interface is used to receive asynchronous define completion for define requests.
|
static interface |
DOFObject.EventOperationListener
Deprecated.
Replaced by
DOFRegistration.Listener |
static interface |
DOFObject.GetOperationListener
This interface is implemented by requestors to receive information from asynchronous get operations.
|
static interface |
DOFObject.InvokeOperationListener
This interface is implemented by requestors to receive information from asynchronous invoke operations.
|
static interface |
DOFObject.Provider
This interface is implemented by providers to provide Properties, Methods, Events, etc.
|
static interface |
DOFObject.SessionOperationListener
This interface is implemented by requestors to receive asynchronous session completion for session requests.
|
static interface |
DOFObject.SetOperationListener
This interface is implemented by requestors to receive information from asynchronous set operations.
|
static interface |
DOFObject.SubscribeOperationListener
Deprecated.
Replaced by
DOFSubscription.Listener |
Modifier and Type | Method and Description |
---|---|
void |
advertise(DOFInterfaceID interfaceID)
Used by a Provider to advertise that the specified interface can be provided.
|
void |
advertise(DOFInterfaceID interfaceID,
DOFOperation.Control control)
Used by a Provider to advertise that the specified interface can be provided, specifying a
DOFOperation.Control
for this operation. |
DOFOperation.Advertise |
beginAdvertise(DOFInterfaceID interfaceID,
DOFOperation.Control control,
int timeout)
Used by a Provider to advertise that the specified interface can be provided, specifying a
DOFOperation.Control
and a timeout for this operation. |
DOFOperation.Advertise |
beginAdvertise(DOFInterfaceID interfaceID,
int timeout)
Used by a Provider to advertise that the specified interface can be provided, specifying a timeout
for this operation.
|
DOFOperation.Define |
beginDefine(DOFInterfaceID interfaceID,
DOFOperation.Control control,
int timeout,
DOFObject.DefineOperationListener operationListener,
java.lang.Object context)
Used by a Requestor to obtain an interface definition asynchronously.
|
DOFOperation.Define |
beginDefine(DOFInterfaceID interfaceID,
int timeout,
DOFObject.DefineOperationListener operationListener,
java.lang.Object context)
Used by a Requestor to obtain an interface definition asynchronously.
|
DOFOperation.Get |
beginGet(DOFInterface.Property property,
DOFOperation.Control control,
int timeout,
DOFObject.GetOperationListener operationListener,
java.lang.Object context)
Used by a Requestor to get a property's value asynchronously as specified using a
DOFOperation.Control or to request a property's
value from multiple providers using an object with the DOFObjectID.BROADCAST ID. |
DOFOperation.Get |
beginGet(DOFInterface.Property property,
int timeout)
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. |
DOFOperation.Get |
beginGet(DOFInterface.Property property,
int timeout,
DOFObject.GetOperationListener operationListener)
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. |
DOFOperation.Get |
beginGet(DOFInterface.Property property,
int timeout,
DOFObject.GetOperationListener operationListener,
java.lang.Object context)
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. |
DOFOperation.Invoke |
beginInvoke(DOFInterface.Method method,
DOFOperation.Control control,
int timeout,
DOFObject.InvokeOperationListener operationListener,
java.lang.Object context,
DOFValue... parameters)
Used by a Requestor to invoke (or call) a method asynchronously as specified using a
DOFOperation.Control . |
DOFOperation.Invoke |
beginInvoke(DOFInterface.Method method,
int timeout,
DOFObject.InvokeOperationListener operationListener,
DOFValue... parameters)
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. |
DOFOperation.Invoke |
beginInvoke(DOFInterface.Method method,
int timeout,
DOFObject.InvokeOperationListener operationListener,
java.lang.Object context,
DOFValue... parameters)
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. |
DOFOperation.Invoke |
beginInvoke(DOFInterface.Method method,
int timeout,
DOFValue... parameters)
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. |
DOFOperation.Invoke |
beginInvoke(DOFInterface.Method method,
java.util.List<DOFValue> parameters,
DOFOperation.Control control,
int timeout,
DOFObject.InvokeOperationListener operationListener,
java.lang.Object context)
Used by a Requestor to invoke (or call) a method asynchronously as specified using a
DOFOperation.Control . |
DOFOperation.Invoke |
beginInvoke(DOFInterface.Method method,
java.util.List<DOFValue> parameters,
int timeout)
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. |
DOFOperation.Invoke |
beginInvoke(DOFInterface.Method method,
java.util.List<DOFValue> parameters,
int timeout,
DOFObject.InvokeOperationListener operationListener)
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. |
DOFOperation.Invoke |
beginInvoke(DOFInterface.Method method,
java.util.List<DOFValue> parameters,
int timeout,
DOFObject.InvokeOperationListener operationListener,
java.lang.Object context)
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. |
DOFOperation.Provide |
beginProvide(DOFInterface iface,
DOFObject.Provider provider)
Used by a Provider to begin providing the specified interface indefinitely (equivalent to specifying a timeout of
DOF.TIMEOUT_NEVER ). |
DOFOperation.Provide |
beginProvide(DOFInterface iface,
int timeout,
DOFObject.Provider provider)
Used by a Provider to begin providing the specified interface.
|
DOFOperation.Provide |
beginProvide(DOFInterface iface,
int timeout,
DOFObject.Provider provider,
java.lang.Object context)
Used by a Provider to begin providing the specified interface.
|
DOFOperation.Register |
beginRegister(DOFInterface.Event event,
DOFOperation.Control control,
int timeout,
DOFObject.EventOperationListener operationListener,
java.lang.Object context)
|
DOFOperation.Register |
beginRegister(DOFInterface.Event event,
int timeout,
DOFObject.EventOperationListener operationListener,
java.lang.Object context)
|
DOFOperation.Session |
beginSession(DOFInterface iface,
DOFInterfaceID sessionType)
Used by a Requestor to begin a session with an indefinite duration (equivalent to specifying a timeout of
DOF.TIMEOUT_NEVER ). |
DOFOperation.Session |
beginSession(DOFInterface iface,
DOFInterfaceID sessionType,
DOFObject.SessionOperationListener operationListener)
Used by a Requestor to begin a session with an indefinite duration (equivalent to specifying a timeout of
DOF.TIMEOUT_NEVER ). |
DOFOperation.Session |
beginSession(DOFInterface iface,
DOFInterfaceID sessionType,
DOFOperation.Control control,
int timeout,
DOFObject.SessionOperationListener operationListener,
java.lang.Object context)
Used by a Requestor to begin a session.
|
DOFOperation.Session |
beginSession(DOFInterface iface,
DOFInterfaceID sessionType,
int timeout,
DOFObject.SessionOperationListener operationListener)
Used by a Requestor to begin a session.
|
DOFOperation.Session |
beginSession(DOFInterface iface,
DOFInterfaceID sessionType,
int timeout,
DOFObject.SessionOperationListener operationListener,
java.lang.Object context)
Used by a Requestor to begin a session.
|
DOFOperation.Set |
beginSet(DOFInterface.Property property,
DOFValue value,
DOFOperation.Control control,
int timeout,
DOFObject.SetOperationListener operationListener,
java.lang.Object context)
Used by a Requestor to set a property's value asynchronously as specified using a
DOFOperation.Control
or to set a property's value on multiple providers using an object with the DOFObjectID.BROADCAST ID. |
DOFOperation.Set |
beginSet(DOFInterface.Property property,
DOFValue value,
int timeout)
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. |
DOFOperation.Set |
beginSet(DOFInterface.Property property,
DOFValue value,
int timeout,
DOFObject.SetOperationListener operationListener)
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. |
DOFOperation.Set |
beginSet(DOFInterface.Property property,
DOFValue value,
int timeout,
DOFObject.SetOperationListener operationListener,
java.lang.Object context)
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. |
DOFOperation.Subscribe |
beginSubscribe(DOFInterface.Property property,
int minPeriod,
DOFOperation.Control control,
int timeout,
DOFObject.SubscribeOperationListener operationListener,
java.lang.Object context)
|
DOFOperation.Subscribe |
beginSubscribe(DOFInterface.Property property,
int minPeriod,
int timeout,
DOFObject.SubscribeOperationListener operationListener,
java.lang.Object context)
|
void |
changed(DOFInterface.Property property)
Used by a Provider to notify all subscribers that a property's value has changed.
|
DOFInterface |
define(DOFInterfaceID interfaceID,
DOFOperation.Control control,
int timeout)
Used by a Requestor to get the definition of an interface.
|
DOFInterface |
define(DOFInterfaceID interfaceID,
int timeout)
Used by a Requestor to get the definition of an interface.
|
void |
destroy()
Destroy an object that has been created by the system.
|
boolean |
equals(java.lang.Object obj) |
DOFResult<DOFValue> |
get(DOFInterface.Property property,
DOFOperation.Control control,
int timeout)
Used by a Requestor to get a property's value as specified using a
DOFOperation.Control . |
DOFResult<DOFValue> |
get(DOFInterface.Property property,
int timeout)
Used by a Requestor to get a property's value.
|
java.util.Collection<DOFInterfaceID> |
getInterfaces()
Get the set of interfaces currently being provided on the object.
|
DOFObjectID |
getObjectID()
Get this provider's object identifier.
|
DOFSystem |
getSystem()
Get this provider's system.
|
int |
hashCode() |
DOFResult<java.util.List<DOFValue>> |
invoke(DOFInterface.Method method,
DOFOperation.Control control,
int timeout,
DOFValue... parameters)
Used by a Requestor to invoke (or call) a method as specified using a
DOFOperation.Control . |
DOFResult<java.util.List<DOFValue>> |
invoke(DOFInterface.Method method,
int timeout,
DOFValue... parameters)
Used by a Requestor to invoke (or call) a method.
|
DOFResult<java.util.List<DOFValue>> |
invoke(DOFInterface.Method method,
java.util.List<DOFValue> parameters,
DOFOperation.Control control,
int timeout)
Used by a Requestor to invoke (or call) a method as specified using a
DOFOperation.Control . |
DOFResult<java.util.List<DOFValue>> |
invoke(DOFInterface.Method method,
java.util.List<DOFValue> parameters,
int timeout)
Used by a Requestor to invoke (or call) a method.
|
boolean |
isInterestRequested(DOFInterfaceID interfaceID,
DOFInterestLevel level)
Used by a Provider to determine if interest currently requested for the specified interface.
|
boolean |
isSignalRequired(DOFInterface.Event event)
Used by a Provider to determine whether or not calling signal is necessary when a specified event occurs.
|
DOFResult<java.lang.Void> |
set(DOFInterface.Property property,
DOFValue value,
DOFOperation.Control control,
int timeout)
Used by a Requestor to set a property's value as specified using a
DOFOperation.Control . |
DOFResult<java.lang.Void> |
set(DOFInterface.Property property,
DOFValue value,
int timeout)
Used by a Requestor to set a property's value.
|
void |
signal(DOFInterface.Event event,
DOFValue... parameters)
Used by a Provider to notify all registered event handlers that an event has occurred.
|
void |
signal(DOFInterface.Event event,
java.util.List<DOFValue> parameters)
Used by a Provider to notify all registered event handlers that an event has occurred.
|
public void destroy()
DOF.destroy()
or DOFSystem.destroy()
.
Any attempt to use a destroyed DOFObject will result in undefined behavior.public DOFSystem getSystem()
DOFSystem
public DOFObjectID getObjectID()
DOFObjectID
public boolean isInterestRequested(DOFInterfaceID interfaceID, DOFInterestLevel level)
interfaceID
- The interface identifier. This may be null meaning any. The Wildcard ID only matches interest where the Wildcard ID was used to express interest.level
- The level of interest. Current interest at or above the specified level will give an affirmative result.public DOFOperation.Session beginSession(DOFInterface iface, DOFInterfaceID sessionType)
DOF.TIMEOUT_NEVER
).
A session is an object provided exclusively for a requestor. No other requestor is allowed to access the session object.
Use DOFOperation.Session.waitSession(int)
to ensure that the session object is available.
Use DOFSystem.waitProvider(org.opendof.core.oal.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 DOFOperation.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(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.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 DOFOperation.Control
response level
includes exceptions, then see DOFObject.SessionOperationListener.complete(org.opendof.core.oal.DOFOperation, org.opendof.core.oal.DOFException)
.iface
- Any interface being currently provided by the target provider of this session. The system
uses this interface to locate the correct provider. Also, if a DOFProviderException is thrown by the Provider,
the system uses iface to decode the exception. This must not be null.sessionType
- The session type. This is a hint to the provider that this interface
should be provided on the session object (possibly in addition to others), and defines the purpose and contract
for the session. Must not be null.DOFOperation.cancel()
on this operation to end the session. Will not be null.public DOFOperation.Session beginSession(DOFInterface iface, DOFInterfaceID sessionType, DOFObject.SessionOperationListener operationListener)
DOF.TIMEOUT_NEVER
).
A session is an object provided exclusively for a requestor. No other requestor is allowed to access the session object.
Use DOFOperation.Session.waitSession(int)
to ensure that the session object is available.
Use DOFSystem.waitProvider(org.opendof.core.oal.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 DOFOperation.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(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.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 DOFOperation.Control
response level
includes exceptions, then see DOFObject.SessionOperationListener.complete(org.opendof.core.oal.DOFOperation, org.opendof.core.oal.DOFException)
.iface
- Any interface being currently provided by the target provider of this session. The system
uses this interface to locate the correct provider. Also, if a DOFProviderException is thrown by the Provider,
the system uses iface to decode the exception. This must not be null.sessionType
- The session type. This is a hint to the provider that this interface
should be provided on the session object (possibly in addition to others), and defines the purpose and contract
for the session. Must not be null.operationListener
- The listener to receive notification of the session being opened. If null, the session may be obtained by calling DOFOperation.Session.waitSession(int)
.DOFOperation.cancel()
on this operation to end the session. Will not be null.public DOFOperation.Session beginSession(DOFInterface iface, DOFInterfaceID sessionType, int timeout, DOFObject.SessionOperationListener operationListener)
DOFOperation.Session.waitSession(int)
to
ensure that the session object is available. Use DOFSystem.waitProvider(org.opendof.core.oal.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 DOFOperation.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(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.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 DOFOperation.Control
response level
includes exceptions, then see DOFObject.SessionOperationListener.complete(org.opendof.core.oal.DOFOperation, org.opendof.core.oal.DOFException)
.iface
- Any interface being currently provided by the target provider of this session. The system
uses this interface to locate the correct provider. Also, if a DOFProviderException is thrown by the Provider,
the system uses iface to decode the exception. This must not be null.sessionType
- The session type. This is a hint to the provider that this interface
should be provided on the session object (possibly in addition to others), and defines the purpose and contract
for the session. Must not be null.timeout
- The duration of the session, in milliseconds. After this time, the session object will no longer be available.
Use DOF.TIMEOUT_NEVER
to create a session with indefinite duration. Then use DOFOperation.cancel()
to
end the session. Must be >= 0.operationListener
- The listener to receive notification of the session being opened. If null, the session may be obtained by calling DOFOperation.Session.waitSession(int)
.DOFOperation.cancel()
on this operation to end the session. Will not be null.public DOFOperation.Session beginSession(DOFInterface iface, DOFInterfaceID sessionType, int timeout, DOFObject.SessionOperationListener operationListener, java.lang.Object context)
DOFOperation.Session.waitSession(int)
to
ensure that the session object is available. Use DOFSystem.waitProvider(org.opendof.core.oal.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 DOFOperation.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(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.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 DOFOperation.Control
response level
includes exceptions, then see DOFObject.SessionOperationListener.complete(org.opendof.core.oal.DOFOperation, org.opendof.core.oal.DOFException)
.iface
- Any interface being currently provided by the target provider of this session. The system
uses this interface to locate the correct provider. Also, if a DOFProviderException is thrown by the Provider,
the system uses iface to decode the exception. This must not be null.sessionType
- The session type. This is a hint to the provider that this interface
should be provided on the session object (possibly in addition to others), and defines the purpose and contract
for the session. Must not be null.timeout
- The duration of the session, in milliseconds. After this time, the session object will no longer be available.
Use DOF.TIMEOUT_NEVER
to create a session with indefinite duration. Then use DOFOperation.cancel()
to
end the session. Must be >= 0.operationListener
- The listener to receive notification of the session being opened. If null, the session may be obtained by calling DOFOperation.Session.waitSession(int)
.context
- An optional, user-definable object that will be passed back in listeners as a member of
DOFOperation. May be null.DOFOperation.cancel()
on this operation to end the session. Will not be null.public DOFOperation.Session beginSession(DOFInterface iface, DOFInterfaceID sessionType, DOFOperation.Control control, int timeout, DOFObject.SessionOperationListener operationListener, java.lang.Object context)
DOFOperation.Session.waitSession(int)
to
ensure that the session object is available. Use DOFSystem.waitProvider(org.opendof.core.oal.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 DOFOperation.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(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.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 DOFOperation.Control
response level
includes exceptions, then see DOFObject.SessionOperationListener.complete(org.opendof.core.oal.DOFOperation, org.opendof.core.oal.DOFException)
.iface
- Any interface being currently provided by the target provider of this session. The system
uses this interface to locate the correct provider. Also, if a DOFProviderException is thrown by the Provider,
the system uses iface to decode the exception. This must not be null.sessionType
- The session type. This is a hint to the provider that this interface
should be provided on the session object (possibly in addition to others), and defines the purpose and contract
for the session. Must not be null.control
- The control to use for the request.timeout
- The duration of the session, in milliseconds. After this time, the session object will no longer be available.
Use DOF.TIMEOUT_NEVER
to create a session with indefinite duration. Then use DOFOperation.cancel()
to
end the session. Must be >= 0.operationListener
- The listener to receive notification of the session being opened. If null, the session may be obtained by calling DOFOperation.Session.waitSession(int)
.context
- An optional, user-definable object that will be passed back in listeners as a member of
DOFOperation. May be null.DOFOperation.cancel()
on this operation to end the session. Will not be null.public void advertise(DOFInterfaceID interfaceID)
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(org.opendof.core.oal.DOFInterfaceID, int)
.interfaceID
- The interface identifier for the interface to be provided. This must not be null.DOFSystem.beginInterest(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterestLevel)
public void advertise(DOFInterfaceID interfaceID, DOFOperation.Control control)
DOFOperation.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(org.opendof.core.oal.DOFInterfaceID, int)
.interfaceID
- The interface identifier for the interface to be provided. This must not be null.control
- The control to use for the operation. Null == use default control.DOFSystem.beginInterest(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterestLevel)
public DOFOperation.Advertise beginAdvertise(DOFInterfaceID interfaceID, int timeout)
DOFInterestLevel.WATCH
,
DOFInterestLevel.ACTIVATE
, and DOFInterestLevel.CONNECT
interest.interfaceID
- The interface identifier for the interface to be provided. This must not be null.timeout
- The duration of the advertise in milliseconds.DOFOperation.cancel()
on this operation to cancel the advertise. Will not be null.DOFSystem.beginInterest(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterestLevel)
public DOFOperation.Advertise beginAdvertise(DOFInterfaceID interfaceID, DOFOperation.Control control, int timeout)
DOFOperation.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.interfaceID
- The interface identifier for the interface to be provided. This must not be null.control
- The control to use for the operation. Null == use default control.timeout
- The duration of the advertise in milliseconds.DOFOperation.cancel()
on this operation to cancel the advertise. Will not be null.DOFSystem.beginInterest(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterestLevel)
public DOFInterface define(DOFInterfaceID interfaceID, int timeout) throws DOFException
DOFObjectID.BROADCAST
and dynamic interfaces (registry zero) is illegal.interfaceID
- The interface identifier for the interface. This must not be null.timeout
- How long to wait in milliseconds. Must be >= 0.DOFException
- If the interface cannot be retrieved within the timeout specified or other errors occur.public DOFInterface define(DOFInterfaceID interfaceID, DOFOperation.Control control, int timeout) throws DOFException
DOFObjectID.BROADCAST
and dynamic interfaces (registry zero) is illegal.interfaceID
- The interface identifier for the interface. This must not be null.control
- The control to use for the request.timeout
- How long to wait in milliseconds. Must be >= 0.DOFException
- If the interface cannot be retrieved within the timeout specified or other errors occur.public DOFOperation.Define beginDefine(DOFInterfaceID interfaceID, int timeout, DOFObject.DefineOperationListener operationListener, java.lang.Object context)
DOFObjectID.BROADCAST
and dynamic interfaces (registry zero) is illegal.interfaceID
- The interface identifier for the interface. This must not be null.timeout
- Maximum time to wait, in milliseconds, for the interface definition to be obtained. Must be >= 0.operationListener
- The listener for receiving asynchronous notification. A null value means no listener will be called and the definition can be obtained
by calling DOFOperation.Define.getInterfaceID()
or DOFOperation.Define.waitInterface(int)
.context
- Application context for the define. The context is returned with the operation when a listener is called.
A value of null represents 'no context', but will be handled just like a non-null value.public DOFOperation.Define beginDefine(DOFInterfaceID interfaceID, DOFOperation.Control control, int timeout, DOFObject.DefineOperationListener operationListener, java.lang.Object context)
DOFObjectID.BROADCAST
and dynamic interfaces (registry zero) is illegal.interfaceID
- The interface identifier for the interface. This must not be null.control
- The control to use for the request.timeout
- Maximum time to wait, in milliseconds, for the interface definition to be obtained. Must be >= 0.operationListener
- The listener for receiving asynchronous notification. A null value means no listener will be called and the definition can be obtained
by calling DOFOperation.Define.getInterfaceID()
or DOFOperation.Define.waitInterface(int)
.context
- Application context for the define. The context is returned with the operation when a listener is called.
A value of null represents 'no context', but will be handled just like a non-null value.public DOFOperation.Provide beginProvide(DOFInterface iface, DOFObject.Provider provider)
DOF.TIMEOUT_NEVER
).
To quit providing use DOFOperation.cancel()
.iface
- The interface to be provided. This must not be null.provider
- The listener to handle requests on this interface. Null = no desired listener (may be used for "marker interfaces"/no provider implementation).public DOFOperation.Provide beginProvide(DOFInterface iface, int timeout, DOFObject.Provider provider)
iface
- The interface to be provided. This must not be null.timeout
- Time, in milliseconds, for the provide to remain active. Must be >= 0. Use
DOF.TIMEOUT_NEVER
to provide indefinitely. Then use DOFOperation.cancel()
to quit providing.
If used in conjunction with beginSession(org.opendof.core.oal.DOFInterface, org.opendof.core.oal.DOFInterfaceID)
, use DOF.TIMEOUT_NEVER.provider
- The listener to handle requests on this interface. Null = no desired listener (may be used for "marker interfaces"/no provider implementation).public DOFOperation.Provide beginProvide(DOFInterface iface, int timeout, DOFObject.Provider provider, java.lang.Object context)
iface
- The interface to be provided. This must not be null.timeout
- Time, in milliseconds, for the provide to remain active. Must be >= 0. Use
DOF.TIMEOUT_NEVER
to provide indefinitely. Then use DOFOperation.cancel()
to quit providing.
If used in conjunction with beginSession(org.opendof.core.oal.DOFInterface, org.opendof.core.oal.DOFInterfaceID)
, use DOF.TIMEOUT_NEVER.provider
- The listener to handle requests on this interface. Null = no desired listener (may be used for "marker interfaces"/no provider implementation).context
- A user-definable object that will be passed back in listeners as part of the DOFOperation.public void changed(DOFInterface.Property property)
changed()
, since the library does this for you. A provider
should typically call changed()
when the property's value has changed due to
something other than a "Set".property
- The changed property. This must not be null.DOFInterface
public void signal(DOFInterface.Event event, java.util.List<DOFValue> parameters)
event
- The event that has occurred. This must not be null.parameters
- A List of DOFValue's representing the event's parameters.isSignalRequired(org.opendof.core.oal.DOFInterface.Event)
public void signal(DOFInterface.Event event, DOFValue... parameters)
event
- The event that has occurred. This must not be null.parameters
- A variable number of DOFValue's representing the event's parameters. May be omitted to indicate no parameters.isSignalRequired(org.opendof.core.oal.DOFInterface.Event)
public boolean isSignalRequired(DOFInterface.Event event)
event
- The event in question. This must not be null.public java.util.Collection<DOFInterfaceID> getInterfaces()
DOFInterfaceID
public DOFResult<java.lang.Void> set(DOFInterface.Property property, DOFValue value, int timeout) throws DOFException
property
- The property. Must not be null.value
- The value of the property to be set. The data type must match
the property's data type.timeout
- Maximum time to wait, in milliseconds, to obtain the result of the operation. Must be >= 0.DOFException
- Indicates an error occurred.beginSet(org.opendof.core.oal.DOFInterface.Property, org.opendof.core.oal.DOFValue, int)
public DOFResult<java.lang.Void> set(DOFInterface.Property property, DOFValue value, DOFOperation.Control control, int timeout) throws DOFException
DOFOperation.Control
.property
- The property. Must not be null.value
- The value of the property to be set. The data type must match the property's data type.control
- The control to use for the request.timeout
- Maximum time to wait, in milliseconds, to obtain the result of the operation. Must be >= 0.DOFException
- Indicates an error occurred.beginSet(org.opendof.core.oal.DOFInterface.Property, org.opendof.core.oal.DOFValue, int)
public DOFOperation.Set beginSet(DOFInterface.Property property, DOFValue value, int timeout)
DOFObjectID.BROADCAST
ID.
Note: Since no SetOperationListener is defined the initial result may be obtained by calling DOFOperation.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:
beginSet(org.opendof.core.oal.DOFInterface.Property, DOFValue, int, org.opendof.core.oal.DOFObject.SetOperationListener)
property
- the property. Must not be null.value
- The value of the property to be set. The data type must match the property's data type.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.set(org.opendof.core.oal.DOFInterface.Property, org.opendof.core.oal.DOFValue, int)
public DOFOperation.Set beginSet(DOFInterface.Property property, DOFValue value, int timeout, DOFObject.SetOperationListener operationListener)
DOFObjectID.BROADCAST
ID.property
- the property. Must not be null.value
- The value of the property to be set. The data type must match the property's data type.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive notification of completion, provider thrown exceptions, etc. May be null -- the initial result may be obtained by calling DOFOperation.Set.waitResult(int)
. Subsequent results are only reported to the listener.set(org.opendof.core.oal.DOFInterface.Property, org.opendof.core.oal.DOFValue, int)
public DOFOperation.Set beginSet(DOFInterface.Property property, DOFValue value, int timeout, DOFObject.SetOperationListener operationListener, java.lang.Object context)
DOFObjectID.BROADCAST
ID.property
- the property. Must not be null.value
- The value of the property to be set. The data type must match the property's data type.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive notification of completion, provider thrown exceptions, etc. May be null -- the initial result may be obtained by calling DOFOperation.Set.waitResult(int)
. Subsequent results are only reported to the listener.context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.set(org.opendof.core.oal.DOFInterface.Property, org.opendof.core.oal.DOFValue, int)
public DOFOperation.Set beginSet(DOFInterface.Property property, DOFValue value, DOFOperation.Control control, int timeout, DOFObject.SetOperationListener operationListener, java.lang.Object context)
DOFOperation.Control
or to set a property's value on multiple providers using an object with the DOFObjectID.BROADCAST
ID.property
- the property. Must not be null.value
- The value of the property to be set. The data type must match the property's data type.control
- The control to use for the request.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive notification of completion, provider thrown exceptions, etc. May be null -- the initial result may be obtained by calling DOFOperation.Set.waitResult(int)
. Subsequent results are only reported to the listener.context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.set(org.opendof.core.oal.DOFInterface.Property, org.opendof.core.oal.DOFValue, int)
public DOFResult<DOFValue> get(DOFInterface.Property property, int timeout) throws DOFException
property
- The property. Must not be null.timeout
- Maximum time to wait, in milliseconds, to obtain the result of the operation. Must be >= 0.DOFErrorException
- Indicates an error occurred.DOFException
beginGet(org.opendof.core.oal.DOFInterface.Property, int)
public DOFResult<DOFValue> get(DOFInterface.Property property, DOFOperation.Control control, int timeout) throws DOFException
DOFOperation.Control
.property
- The property. Must not be null.control
- The control to use for the request.timeout
- Maximum time to wait, in milliseconds, to obtain the result of the operation. Must be >= 0.DOFErrorException
- Indicates an error occurred.DOFException
beginGet(org.opendof.core.oal.DOFInterface.Property, int)
public DOFOperation.Get beginGet(DOFInterface.Property property, int timeout)
DOFObjectID.BROADCAST
ID.
Note: Since no GetOperationListener is defined the initial result can only be obtained by calling DOFOperation.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:
beginGet(org.opendof.core.oal.DOFInterface.Property, int, org.opendof.core.oal.DOFObject.GetOperationListener)
property
- The property. Must not be null.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.get(org.opendof.core.oal.DOFInterface.Property, int)
public DOFOperation.Get beginGet(DOFInterface.Property property, int timeout, DOFObject.GetOperationListener operationListener)
DOFObjectID.BROADCAST
ID.property
- The property. Must not be null.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive the result. May be null -- the initial result may be obtained by calling DOFOperation.Get.waitResult(int)
. Subsequent results are only reported to the listener.get(org.opendof.core.oal.DOFInterface.Property, int)
public DOFOperation.Get beginGet(DOFInterface.Property property, int timeout, DOFObject.GetOperationListener operationListener, java.lang.Object context)
DOFObjectID.BROADCAST
ID.property
- The property. Must not be null.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive the result. May be null -- the initial result may be obtained by calling DOFOperation.Get.waitResult(int)
. Subsequent results are only reported to the listener.context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.get(org.opendof.core.oal.DOFInterface.Property, int)
public DOFOperation.Get beginGet(DOFInterface.Property property, DOFOperation.Control control, int timeout, DOFObject.GetOperationListener operationListener, java.lang.Object context)
DOFOperation.Control
or to request a property's
value from multiple providers using an object with the DOFObjectID.BROADCAST
ID.property
- The property. Must not be null.control
- The control to use for the request.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive the result. May be null -- the initial result may be obtained by calling DOFOperation.Get.waitResult(int)
. Subsequent results are only reported to the listener.context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.get(org.opendof.core.oal.DOFInterface.Property, int)
public DOFResult<java.util.List<DOFValue>> invoke(DOFInterface.Method method, java.util.List<DOFValue> parameters, int timeout) throws DOFException
method
- The method. Must not be null.parameters
- The method's parameter list. The data types must match the method's defined parameter types. Null is the same as an empty parameter list.timeout
- Maximum time to wait, in milliseconds, to obtain the result of the operation. Must be >= 0.DOFException
- Indicates an error occurred.beginInvoke(org.opendof.core.oal.DOFInterface.Method, int, org.opendof.core.oal.DOFValue...)
public DOFResult<java.util.List<DOFValue>> invoke(DOFInterface.Method method, int timeout, DOFValue... parameters) throws DOFException
method
- The method. Must not be null.timeout
- Maximum time to wait, in milliseconds, to obtain the result of the operation. Must be >= 0.parameters
- The method's parameters. The data types and order must match the method's defined parameter types. May be omitted for an empty parameter list.DOFException
- Indicates an error occurred.beginInvoke(org.opendof.core.oal.DOFInterface.Method, int, org.opendof.core.oal.DOFValue...)
public DOFResult<java.util.List<DOFValue>> invoke(DOFInterface.Method method, java.util.List<DOFValue> parameters, DOFOperation.Control control, int timeout) throws DOFException
DOFOperation.Control
.method
- The method. Must not be null.parameters
- The method's parameter list. The data types must match the method's defined parameter types. Null is the same as an empty parameter list.control
- The control to use for the request.timeout
- Maximum time to wait, in milliseconds, to obtain the result of the operation. Timeout in milliseconds. Must be >= 0.DOFException
- Indicates an error occurred.beginInvoke(org.opendof.core.oal.DOFInterface.Method, int, org.opendof.core.oal.DOFValue...)
public DOFResult<java.util.List<DOFValue>> invoke(DOFInterface.Method method, DOFOperation.Control control, int timeout, DOFValue... parameters) throws DOFException
DOFOperation.Control
.method
- The method. Must not be null.control
- The control to use for the request.timeout
- Maximum time to wait, in milliseconds, to obtain the result of the operation. Timeout in milliseconds. Must be >= 0.parameters
- The method's parameters. The data types and order must match the method's defined parameter types. May be omitted for an empty parameter list.DOFException
- Indicates an error occurred.beginInvoke(org.opendof.core.oal.DOFInterface.Method, int, org.opendof.core.oal.DOFValue...)
public DOFOperation.Invoke beginInvoke(DOFInterface.Method method, int timeout, DOFValue... parameters)
DOFObjectID.BROADCAST
ID.
Note: Since no SetOperationListener is defined the initial result can only be obtained by calling DOFOperation.Invoke.waitResult(int)
.
* beginInvoke(org.opendof.core.oal.DOFInterface.Method, int, org.opendof.core.oal.DOFObject.InvokeOperationListener, DOFValue...)
method
- The method. Must not be null.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.parameters
- The method's parameters. The data types and order must match the method's defined parameter types. May be omitted for an empty parameter list.invoke(org.opendof.core.oal.DOFInterface.Method, java.util.List<org.opendof.core.oal.DOFValue>, int)
public DOFOperation.Invoke beginInvoke(DOFInterface.Method method, int timeout, DOFObject.InvokeOperationListener operationListener, DOFValue... parameters)
DOFObjectID.BROADCAST
ID.method
- The method. Must not be null.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive the result. May be null -- the initial result may be obtained by calling DOFOperation.Invoke.waitResult(int)
. Subsequent results are only reported to the operationListener.parameters
- The method's parameters. The data types and order must match the method's defined parameter types. May be omitted for an empty parameter list.invoke(org.opendof.core.oal.DOFInterface.Method, java.util.List<org.opendof.core.oal.DOFValue>, int)
public DOFOperation.Invoke beginInvoke(DOFInterface.Method method, int timeout, DOFObject.InvokeOperationListener operationListener, java.lang.Object context, DOFValue... parameters)
DOFObjectID.BROADCAST
ID.method
- The method. Must not be null.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive the result. May be null -- the initial result may be obtained by calling DOFOperation.Invoke.waitResult(int)
. Subsequent results are only reported to the operationListener.context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.parameters
- The method's parameters. The data types and order must match the method's defined parameter types. May be omitted for an empty parameter list.invoke(org.opendof.core.oal.DOFInterface.Method, java.util.List<org.opendof.core.oal.DOFValue>, int)
public DOFOperation.Invoke beginInvoke(DOFInterface.Method method, java.util.List<DOFValue> parameters, int timeout)
DOFObjectID.BROADCAST
ID.
Note: Since no InvokeOperationListener is defined the initial result can only be obtained by calling DOFOperation.Invoke.waitResult(int)
.
* beginInvoke(org.opendof.core.oal.DOFInterface.Method, java.util.List, int, org.opendof.core.oal.DOFObject.InvokeOperationListener)
method
- The method. Must not be null.parameters
- The method's parameter list. The data types must match the method's defined parameter types. Null is the same as an empty parameter list.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.invoke(org.opendof.core.oal.DOFInterface.Method, java.util.List<org.opendof.core.oal.DOFValue>, int)
public DOFOperation.Invoke beginInvoke(DOFInterface.Method method, java.util.List<DOFValue> parameters, int timeout, DOFObject.InvokeOperationListener operationListener)
DOFObjectID.BROADCAST
ID.method
- The method. Must not be null.parameters
- The method's parameter list. The data types must match the method's defined parameter types. Null is the same as an empty parameter list.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive the result. May be null -- the initial result may be obtained by calling DOFOperation.Invoke.waitResult(int)
. Subsequent results are only reported to the operationListener.invoke(org.opendof.core.oal.DOFInterface.Method, java.util.List<org.opendof.core.oal.DOFValue>, int)
public DOFOperation.Invoke beginInvoke(DOFInterface.Method method, java.util.List<DOFValue> parameters, int timeout, DOFObject.InvokeOperationListener operationListener, java.lang.Object context)
DOFObjectID.BROADCAST
ID.method
- The method. Must not be null.parameters
- The method's parameter list. The data types must match the method's defined parameter types. Null is the same as an empty parameter list.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive the result. May be null -- the initial result may be obtained by calling DOFOperation.Invoke.waitResult(int)
. Subsequent results are only reported to the operationListener.context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.invoke(org.opendof.core.oal.DOFInterface.Method, java.util.List<org.opendof.core.oal.DOFValue>, int)
public DOFOperation.Invoke beginInvoke(DOFInterface.Method method, java.util.List<DOFValue> parameters, DOFOperation.Control control, int timeout, DOFObject.InvokeOperationListener operationListener, java.lang.Object context)
DOFOperation.Control
. Or to invoke
a method on multiple providers using an object with the DOFObjectID.BROADCAST
ID.method
- The method. Mut not be null.parameters
- The method's parameter list. The data types must match the method's defined parameter types. Null is the same as an empty parameter list.control
- The control to use for the request.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive the result. May be null -- the initial result may be obtained by calling DOFOperation.Invoke.waitResult(int)
. Subsequent results are only reported to the operationListener.context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.invoke(org.opendof.core.oal.DOFInterface.Method, java.util.List<org.opendof.core.oal.DOFValue>, int)
public DOFOperation.Invoke beginInvoke(DOFInterface.Method method, DOFOperation.Control control, int timeout, DOFObject.InvokeOperationListener operationListener, java.lang.Object context, DOFValue... parameters)
DOFOperation.Control
. Or to invoke
a method on multiple providers using an object with the DOFObjectID.BROADCAST
ID.method
- The method. Mut not be null.control
- The control to use for the request.timeout
- Maximum time to wait, in milliseconds, to obtain the result(s) of the operation. Must be >= 0.
NOTE: If the number of responders is unknown, as is typically the case when making requests on an object
with the DOFObjectID.BROADCAST
ID, then the operation will always wait for the entire timeout period.operationListener
- Listener to receive the result. May be null -- the initial result may be obtained by calling DOFOperation.Invoke.waitResult(int)
. Subsequent results are only reported to the operationListener.context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.parameters
- The method's parameters. The data types and order must match the method's defined parameter types. May be omitted for an empty parameter list.invoke(org.opendof.core.oal.DOFInterface.Method, java.util.List<org.opendof.core.oal.DOFValue>, int)
@Deprecated public DOFOperation.Subscribe beginSubscribe(DOFInterface.Property property, int minPeriod, int timeout, DOFObject.SubscribeOperationListener operationListener, java.lang.Object context)
DOFSystem.createSubscription(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterface.Property, int, org.opendof.core.oal.DOFSubscription.Listener, java.lang.Object)
DOFSystem.beginInterest(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.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 DOFOperation.Control
response level
includes exceptions, then see DOFObject.SubscribeOperationListener.propertyChanged(org.opendof.core.oal.DOFOperation.Subscribe, org.opendof.core.oal.DOFProviderInfo, org.opendof.core.oal.DOFValue, org.opendof.core.oal.DOFException)
for what to do.property
- The property. Must not be null.minPeriod
- The minimum time, in milliseconds, that should elapse between property update notifications. Must be >= 0.timeout
- Time, in milliseconds, that the subscription should remain active (the duration of the subscription). Use DOF.TIMEOUT_NEVER to
subscribe indefinitely. Then use DOFOperation.cancel()
to cancel the subscription. Must be >= 0.operationListener
- Listener to receive property changed notifications. Should not be null (or change notifications
cannot be received).context
- An optional, user-definable object that will be passed back in listeners as a member of
DOFOperation. May be null.@Deprecated public DOFOperation.Subscribe beginSubscribe(DOFInterface.Property property, int minPeriod, DOFOperation.Control control, int timeout, DOFObject.SubscribeOperationListener operationListener, java.lang.Object context)
DOFSystem.createSubscription(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterface.Property, int, org.opendof.core.oal.DOFSubscription.Listener, java.lang.Object)
DOFOperation.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(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.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 DOFOperation.Control
response level
includes exceptions, then see DOFObject.SubscribeOperationListener.propertyChanged(org.opendof.core.oal.DOFOperation.Subscribe, org.opendof.core.oal.DOFProviderInfo, org.opendof.core.oal.DOFValue, org.opendof.core.oal.DOFException)
for what to do.property
- The property. Must not be null.minPeriod
- The minimum time, in milliseconds, that should elapse between property update notifications. Must be >= 0.control
- The control to use for the request.timeout
- Time, in milliseconds, that the subscription should remain active (the duration of the subscription). Use DOF.TIMEOUT_NEVER to
subscribe indefinitely. Then use DOFOperation.cancel()
to cancel the subscription. Must be >= 0.operationListener
- Listener to receive property changed notifications. Should not be null (or change notifications cannot be received).context
- An optional, user-definable object that will be passed back in listeners as a member of
DOFOperation. May be null.@Deprecated public DOFOperation.Register beginRegister(DOFInterface.Event event, int timeout, DOFObject.EventOperationListener operationListener, java.lang.Object context)
DOFSystem.createRegistration(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterface.Event, org.opendof.core.oal.DOFRegistration.Listener, java.lang.Object)
DOFSystem.beginInterest(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.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 DOFOperation.Control
response level
includes exceptions, then see DOFObject.EventOperationListener.eventSignaled(org.opendof.core.oal.DOFOperation.Register, org.opendof.core.oal.DOFProviderInfo, java.util.List<org.opendof.core.oal.DOFValue>, org.opendof.core.oal.DOFException)
for what to do.event
- The event. Must not be null.timeout
- Time, in milliseconds, for the event handler to remain active (the duration of the event handler). Use DOF.TIMEOUT_NEVER
to be notified of events indefinitely. Then use DOFOperation.cancel()
to unregister the handler. Must be >= 0.operationListener
- Listener to receive event notifications. Should not be null (or events cannot be reported).context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.@Deprecated public DOFOperation.Register beginRegister(DOFInterface.Event event, DOFOperation.Control control, int timeout, DOFObject.EventOperationListener operationListener, java.lang.Object context)
DOFSystem.createRegistration(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterface.Event, org.opendof.core.oal.DOFRegistration.Listener, java.lang.Object)
DOFOperation.Control
, to be notified whenever an event occurs.
NOTE: Interest is required (through DOFSystem.beginInterest(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.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 DOFOperation.Control
response level
includes exceptions, then see DOFObject.EventOperationListener.eventSignaled(org.opendof.core.oal.DOFOperation.Register, org.opendof.core.oal.DOFProviderInfo, java.util.List<org.opendof.core.oal.DOFValue>, org.opendof.core.oal.DOFException)
for what to do.event
- The event. Must not be null.control
- The control to use for the request.timeout
- Time, in milliseconds, for the event handler to remain active (the duration of the event handler). Use DOF.TIMEOUT_NEVER
to be notified of events indefinitely. Then use DOFOperation.cancel()
to unregister the handler. Must be >= 0.operationListener
- Listener to receive event notifications. Should not be null (or events cannot be reported).context
- An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object