public static interface DOFSystem.ActivateInterestListener
DOFInterestLevel.ACTIVATE
-level interest (and higher) requests, used by Providers to react to interest being expressed by Requestor.
Requestors initiate interest requests with DOFSystem.beginInterest(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterestLevel)
. Providers react to ACTIVATE-level interest requests using this listener.Modifier and Type | Method and Description |
---|---|
void |
activate(DOFSystem system,
DOFRequest request,
DOFObjectID objectID,
DOFInterfaceID interfaceID)
This method is called when
DOFInterestLevel.ACTIVATE -level interest (and higher) is expressed
for an interface on an object. |
void |
cancelActivate(DOFSystem system,
DOFRequest request,
DOFObjectID objectID,
DOFInterfaceID interfaceID)
This method is called when
DOFInterestLevel.ACTIVATE -level interest (and higher) is complete (no longer desired)
for an interface on an object. |
void |
removed(DOFSystem system,
DOFException exception)
This method is called when this listener is removed from the DOFSystem.
|
void activate(DOFSystem system, DOFRequest request, DOFObjectID objectID, DOFInterfaceID interfaceID)
DOFInterestLevel.ACTIVATE
-level interest (and higher) is expressed
for an interface on an object. The provider should start
providing the binding. Guard against calling beginProvide multiple times for the same objectID
and interfaceID since this method will be called for every interest received at this level.system
- The system where this listener was added. This will never be null.request
- Request information. This will never be null.objectID
- Identifies the object of interest. If DOFObjectID.BROADCAST, then interest is for the specified interface on any/all objects. This will never be null.interfaceID
- Identifies the interface of interest. If DOFInterfaceID.WILDCARD, then interest is for all possible interfaces. This will never be null.void cancelActivate(DOFSystem system, DOFRequest request, DOFObjectID objectID, DOFInterfaceID interfaceID)
DOFInterestLevel.ACTIVATE
-level interest (and higher) is complete (no longer desired)
for an interface on an object. The provider should
stop providing the binding if there is no other ACTIVATE-level interest remaining. Call
DOFObject.isInterestRequested(DOFInterfaceID, DOFInterestLevel)
to determine if
any interest remains on this binding.system
- The system where this listener was added. This will never be null.request
- Request information. This will never be null.objectID
- Identifies the object to complete interest on. If DOFObjectID.BROADCAST, then complete interest for the specified interfaceID for any/all objects. This will never be null.interfaceID
- Identifies the interface to complete interest for. If DOFInterfaceID.WILDCARD, then complete interest for all possible interfacesvoid removed(DOFSystem system, DOFException exception)
system
- The system where this listener was added. This will never be null.exception
- The exception that caused this listener to be removed, null means it was removed normally.