DOFObjectProvidersubscribe Method OpenDOF Object Access Library
Process a subscribe request.

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

C#
void subscribe(
	DOFOperationProvide operation,
	DOFRequestSubscribe request,
	DOFInterfaceProperty property,
	int minPeriod
)

Parameters

operation
Type: org.opendof.core.oalDOFOperationProvide
Information about the corresponding provide operation. This will never be null.
request
Type: org.opendof.core.oalDOFRequestSubscribe
Information about the subscribe request. This will never be null. Use this to return, indicating that the 'subscribe' is accepted (use
request.respond()
) or to throw exceptions (use
request.respond(...)
).

DOFErrorException should be thrown for any error condition that falls outside of the exceptions defined in the DOFInterface, the subscribe is not supported for the property, or the minPeriod is unacceptable.

property
Type: org.opendof.core.oalDOFInterfaceProperty
The property being subscribed to. This will never be null.
minPeriod
Type: SystemInt32
The minimum time, in milliseconds, that should elapse between property update notifications.
Remarks

Process a subscribe request. This method is called when a 'Subscribe' Property is requested.

NOTE: You MUST call one of the Subscribe.respond() methods when you have finished processing the request. The request is kept in a "pending" status until one of these calls is made. This means that you may spawn a thread which could finish processing this request after returning from this method.

See Also

Reference

Subscribe.respond(DOFErrorException)
Listener