DOFSystemcreateRegistration Method (DOFObjectID, DOFInterfaceEvent, DOFRegistrationListener)OpenDOF Object Access Library
Used by a Requestor to begin and maintain an event registration, as specified using a context, to be notified of events and associated value(s).

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,
	DOFRegistrationListener listener
)

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.
listener
Type: org.opendof.core.oalDOFRegistrationListener
Listener to receive state-changed and event-occurred notifications. Should not be null (or notifications cannot be received).

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
Remarks

Used by a Requestor to begin and maintain an event registration, as specified using a 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.

See Also

Reference