public static interface DOF.InterestListener
DOFInterestLevel.ACTIVATE
interest,
use DOFSystem.ActivateInterestListener
instead.DOFInterestLevel.CONNECT
,
use DOFConnection.StreamRequestListener
instead.Modifier and Type | Method and Description |
---|---|
void |
interestAdded(DOF dof,
DOFRequest request,
DOFObjectID objectID,
DOFInterfaceID interfaceID,
DOFInterestLevel level)
Called when the node receives any level of interest for a binding.
|
void |
interestRemoved(DOF dof,
DOFRequest request,
DOFObjectID objectID,
DOFInterfaceID interfaceID,
DOFInterestLevel level)
Called when an interest request is canceled or times out.
|
void |
removed(DOF dof,
DOFException exception)
Called when the InterestListener is removed from the DOF.
|
void interestAdded(DOF dof, DOFRequest request, DOFObjectID objectID, DOFInterfaceID interfaceID, DOFInterestLevel level)
DOFRequest
is passed in this method for informational purposes, but this method should not be used to
respond to the request.dof
- The DOF where this listener was added. This will never be null.request
- An object that contains information about the request. This will never be null.objectID
- The DOFObjectID the requestor has expressed interest in. This will never be null. This may be DOFObjectID.BROADCAST
,
indicating that the interest is for the specified interface on all objects. It will not be DOFObjectID.BROADCAST if the
interfaceID parameter is DOFInterfaceID.WILDCARD
.interfaceID
- The DOFInterfaceID the requestor has expressed interest in. This may be null or DOFInterfaceID.WILDCARD, indicating
that the interest is for all interfaces on the specified object. It will not be DOFInterfaceID.WILDCARD if the
objectID parameter is DOFObjectID.BROADCAST.level
- The level of interest. This will never be null.void interestRemoved(DOF dof, DOFRequest request, DOFObjectID objectID, DOFInterfaceID interfaceID, DOFInterestLevel level)
DOFSystem.isInterestRequested(org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterfaceID, org.opendof.core.oal.DOFInterestLevel)
to check if interest
is still requested.
This callback is primarily for monitoring; no action needs to be taken, and the request should not be
completed in this callback.dof
- The DOF where this listener was added. This will never be null.request
- The interest request that was canceled. This will never be null.objectID
- The DOFObjectID associated with the original interest request. This may be DOFObjectID.BROADCAST
. This will never be null.interfaceID
- The DOFInterfaceID associated with the original interest request. This may be DOFInterfaceID.WILDCARD
. This will never be null.level
- The level of interest that was canceled. This will never be null.void removed(DOF dof, DOFException exception)
interestRemoved(org.opendof.core.oal.DOF, org.opendof.core.oal.DOFRequest, org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterfaceID, org.opendof.core.oal.DOFInterestLevel)
callback will not be called after the listener is removed, so it may be necessary to clean up
resources associated with interestAdded(org.opendof.core.oal.DOF, org.opendof.core.oal.DOFRequest, org.opendof.core.oal.DOFObjectID, org.opendof.core.oal.DOFInterfaceID, org.opendof.core.oal.DOFInterestLevel)
calls for which no interestRemoved call was received when the listener is
removed.dof
- The DOF where this listener was added. This will never be null.exception
- An exception that caused the listener to be removed prematurely. This will be null if the application removed the listener normally.