public final class DOFSubscription
extends java.lang.Object
DOFObjectID
to subscribe to just one provider.
The subscribe operation is not flooded.
Interest is required because this case uses an internal query to find the provider.DOFObjectID.BROADCAST
to subscribe to all providers of the specified DOFInterface
.
The subscribe operation is flooded.
Interest is not required because no internal query is used.DOFQuery
to specify what to subscribe to. Only one subscription is maintained at a time.Modifier and Type | Class and Description |
---|---|
static interface |
DOFSubscription.Listener
This interface is implemented by requestors to receive updates.
|
static class |
DOFSubscription.State
This is a snapshot of the DOFSubscription's state.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(DOFSubscription.Listener listener)
Add a listener that will receive an update every time the subscribed property changes.
|
void |
destroy()
Destroy the DOFSubscription.
|
java.lang.Object |
getContext() |
int |
getMinPeriod() |
DOFObjectID |
getObjectID() |
DOFInterface.Property |
getProperty() |
DOFQuery |
getQuery() |
DOFSubscription.State |
getState() |
void |
removeListener(DOFSubscription.Listener listener)
Remove a previously added listener.
|
public void destroy()
DOFSubscription.Listener
s will not be called once this method returns.public DOFSubscription.State getState()
public DOFObjectID getObjectID()
public DOFQuery getQuery()
public DOFInterface.Property getProperty()
public java.lang.Object getContext()
public int getMinPeriod()
public void addListener(DOFSubscription.Listener listener)
listener
- The listener to add.public void removeListener(DOFSubscription.Listener listener)
listener
- The listener to remove.