DOFObjectbeginSubscribe Method (DOFInterfaceProperty, Int32, DOFOperationControl, Int32, DOFObjectSubscribeOperationListener, Object)OpenDOF Object Access Library

Note: This API is now 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.

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

C#
[ObsoleteAttribute("Replaced by DOFSystem.createSubscription(DOFObjectID, Property, int, Listener)")]
public DOFOperationSubscribe beginSubscribe(
	DOFInterfaceProperty property,
	int minPeriod,
	DOFOperationControl control,
	int timeout,
	DOFObjectSubscribeOperationListener operationListener,
	Object context
)

Parameters

property
Type: org.opendof.core.oalDOFInterfaceProperty
The property. Must not be null.
minPeriod
Type: SystemInt32
The minimum time, in milliseconds, that should elapse between property update notifications. Must be >= 0.
control
Type: org.opendof.core.oalDOFOperationControl
The control to use for the request.
timeout
Type: SystemInt32
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
Type: org.opendof.core.oalDOFObjectSubscribeOperationListener
Listener to receive property changed notifications. Should not be null (or change notifications cannot be received).
context
Type: SystemObject
An optional, user-definable object that will be passed back in listeners as a member of DOFOperation. May be null.

Return Value

Type: DOFOperationSubscribe
The subscribe operation that may be used to cancel the subscription, extend it, etc. Will not be null.
See Also

Reference