Used by a Requestor to begin and maintain an event registration, as specified using a
DOFQuery
,
Control
, and a context, to be notified of events and associated value(s).
DOFRegistration 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)
.
Interest goes out on the network and looks for matching providers. The query, on the other hand, searches through
the local set of known providers (those already found through interest).
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( DOFQuery query, DOFInterfaceEvent event_Renamed, DOFOperationControl control, DOFRegistrationListener listener )
Parameters
- query
- Type: org.opendof.core.oalDOFQuery
The query to use to find the provider. This must not be null. - 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).
Return Value
Type: DOFRegistrationThe DOFRegistration that may be used to destroy the registration. Will not be null.
Exceptions
Exception | Condition |
---|---|
DOFErrorException | If parameters fail validation. |
DOFErrorException |
See Also