Package org.jupnp.model.gena
Klasse LocalGENASubscription
- Alle implementierten Schnittstellen:
PropertyChangeListener
public abstract class LocalGENASubscription
extends GENASubscription<LocalService>
implements PropertyChangeListener
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().
- Autor:
- Christian Bauer, Jochen Hiller - Changed to use Compact2 compliant Java Beans
-
Feldübersicht
Von Klasse geerbte Felder org.jupnp.model.gena.GENASubscription
actualDurationSeconds, currentSequence, currentValues, requestedDurationSeconds, service, subscriptionId -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedLocalGENASubscription(LocalService service, Integer requestedDurationSeconds, List<URL> callbackURLs) protectedLocalGENASubscription(LocalService service, List<URL> callbackURLs) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidend(CancelReason reason) Removes a property change listener on theServiceManager.abstract voidended(CancelReason reason) voidvoidmoderateStateVariables(long currentTime, Collection<StateVariableValue> values) Checks whether a state variable is moderated, and if this change is within the maximum rate and range limits.voidModeratesServiceManager.EVENTED_STATE_VARIABLESevents and state variable values, callsGENASubscription.eventReceived().voidAdds a property change listener on theServiceManager.voidsetSubscriptionDuration(Integer requestedDurationSeconds) Von Klasse geerbte Methoden org.jupnp.model.gena.GENASubscription
established, eventReceived, getActualDurationSeconds, getCurrentSequence, getCurrentValues, getRequestedDurationSeconds, getService, getSubscriptionId, setActualSubscriptionDurationSeconds, setSubscriptionId, toString
-
Konstruktordetails
-
Methodendetails
-
getCallbackURLs
-
registerOnService
public void registerOnService()Adds a property change listener on theServiceManager. -
establish
public void establish() -
end
Removes a property change listener on theServiceManager. -
propertyChange
ModeratesServiceManager.EVENTED_STATE_VARIABLESevents and state variable values, callsGENASubscription.eventReceived().- Angegeben von:
propertyChangein SchnittstellePropertyChangeListener
-
moderateStateVariables
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.- Parameter:
currentTime- The current unix time.values- The state variable values to moderate.- Gibt zurück:
- A collection of state variable values that although they might have changed, are excluded from the event.
-
incrementSequence
public void incrementSequence() -
setSubscriptionDuration
- Parameter:
requestedDurationSeconds- Ifnulldefaults toUserConstants.DEFAULT_SUBSCRIPTION_DURATION_SECONDS
-
ended
-