DOFObjectbeginRegister Method (DOFInterfaceEvent, Int32, DOFObjectEventOperationListener, Object)OpenDOF Object Access Library

Note: This API is now obsolete.

Used by a Requestor to register an event handler to be notified whenever an event occurs.

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

C#
[ObsoleteAttribute("Replaced by DOFSystem.createRegistration(DOFObjectID, Event, Listener)")]
public DOFOperationRegister beginRegister(
	DOFInterfaceEvent event_Renamed,
	int timeout,
	DOFObjectEventOperationListener operationListener,
	Object context
)

Parameters

event_Renamed
Type: org.opendof.core.oalDOFInterfaceEvent
The event. Must not be null.
timeout
Type: SystemInt32
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
Type: org.opendof.core.oalDOFObjectEventOperationListener
Listener to receive event notifications. Should not be null (or events cannot be reported).
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: DOFOperationRegister
The register operation that may be used to cancel the event handler, extend its lifetime, etc. Will not be null.
Remarks

Used by a Requestor to register an event handler 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.

See Also

Reference