DOFSystemcreateRegistration Method (DOFObjectID, DOFInterfaceEvent, DOFOperationControl, DOFRegistrationListener, Object)OpenDOF Object Access Library
Used by a Requestor to begin and maintain an event registration, as specified using a Control and context, to be notified of events and associated value(s). If oid is DOFObjectID.BROADCAST , DOFRegistration will register for all matching providers at the time the registration is created. Otherwise, it will select one matching provider and register for its matching event. If there is no matching provider, then DOFRegistration will wait for one. If the provider goes away, then the search will resume for a matching provider.

To cancel the registration, call DOFRegistration.destroy() .

NOTE: The listener should be notified very soon through the Listener.stateChanged(DOFRegistration, State) method that the registration is active, but until an event actually occurs, Listener.eventSignaled(DOFRegistration, DOFObjectID, System.Collections.Generic.IList<E>) won't be called.

NOTE: An application must first express interest by calling beginInterest(DOFObjectID, DOFInterestLevel) for unicast registrations in order to determine the primary provider. If no interest is specified, then no non-local providers will be found.

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

C#
public DOFRegistration createRegistration(
	DOFObjectID oid,
	DOFInterfaceEvent event_Renamed,
	DOFOperationControl control,
	DOFRegistrationListener listener,
	Object context
)

Parameters

oid
Type: org.opendof.core.oalDOFObjectID
The identifier of the object. This must not be null. May be DOFObjectID.BROADCAST.
event_Renamed
Type: org.opendof.core.oalDOFInterfaceEvent
The event. Must not be null.
control
Type: org.opendof.core.oalDOFOperationControl
The control to use for the request.
listener
Type: org.opendof.core.oalDOFRegistrationListener
Listener to receive state-changed and event-occurred notifications. Should not be null (or 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: DOFRegistration
The DOFRegistration that may be used to destroy the registration. Will not be null.
Exceptions

ExceptionCondition
DOFErrorExceptionIf parameters fail validation.
DOFErrorException
See Also

Reference