|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.teleal.cling.model.gena.GENASubscription<LocalService>
org.teleal.cling.model.gena.LocalGENASubscription
public abstract class LocalGENASubscription
An incoming subscription to a local service.
Uses the ServiceManager
to read the initial state of
the LocalService
on instantation. Typically, the
registerOnService()
method is called next, and from this point forward all
ServiceManager.EVENTED_STATE_VARIABLES
property change
events are detected by this subscription. After moderation of state variable values
(frequency and range of changes), the GENASubscription.eventReceived()
method is called.
Delivery of the event message to the subscriber is not part of this class, but the
implementor of GENASubscription.eventReceived()
.
Field Summary |
---|
Fields inherited from class org.teleal.cling.model.gena.GENASubscription |
---|
actualDurationSeconds, currentSequence, currentValues, requestedDurationSeconds, service, subscriptionId |
Constructor Summary | |
---|---|
|
LocalGENASubscription(LocalService service,
Integer requestedDurationSeconds,
List<URL> callbackURLs)
|
protected |
LocalGENASubscription(LocalService service,
List<URL> callbackURLs)
|
Method Summary | |
---|---|
void |
end(CancelReason reason)
Removes a property change listener on the ServiceManager . |
abstract void |
ended(CancelReason reason)
|
void |
establish()
|
List<URL> |
getCallbackURLs()
|
void |
incrementSequence()
|
protected Set<String> |
moderateStateVariables(long currentTime,
Collection<StateVariableValue> values)
Checks whether a state variable is moderated, and if this change is within the maximum rate and range limits. |
void |
propertyChange(PropertyChangeEvent e)
Moderates ServiceManager.EVENTED_STATE_VARIABLES events and state variable
values, calls GENASubscription.eventReceived() . |
void |
registerOnService()
Adds a property change listener on the ServiceManager . |
void |
setSubscriptionDuration(Integer requestedDurationSeconds)
|
Methods inherited from class org.teleal.cling.model.gena.GENASubscription |
---|
established, eventReceived, getActualDurationSeconds, getCurrentSequence, getCurrentValues, getRequestedDurationSeconds, getService, getSubscriptionId, setActualSubscriptionDurationSeconds, setSubscriptionId, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected LocalGENASubscription(LocalService service, List<URL> callbackURLs) throws Exception
Exception
public LocalGENASubscription(LocalService service, Integer requestedDurationSeconds, List<URL> callbackURLs) throws Exception
Exception
Method Detail |
---|
public List<URL> getCallbackURLs()
public void registerOnService()
ServiceManager
.
public void establish()
public void end(CancelReason reason)
ServiceManager
.
public void propertyChange(PropertyChangeEvent e)
ServiceManager.EVENTED_STATE_VARIABLES
events and state variable
values, calls GENASubscription.eventReceived()
.
propertyChange
in interface PropertyChangeListener
protected Set<String> moderateStateVariables(long currentTime, Collection<StateVariableValue> values)
currentTime
- The current unix time.values
- The state variable values to moderate.
public void incrementSequence()
public void setSubscriptionDuration(Integer requestedDurationSeconds)
public abstract void ended(CancelReason reason)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |