org.teleal.cling.model.gena
Class GENASubscription<S extends Service>

java.lang.Object
  extended by org.teleal.cling.model.gena.GENASubscription<S>
Direct Known Subclasses:
LocalGENASubscription, RemoteGENASubscription

public abstract class GENASubscription<S extends Service>
extends Object

An established subscription, with identifer, expiration duration, sequence handling, and state variable values.

For every subscription, no matter if it's an incoming subscription to a local service, or a local control point subscribing to a remote servce, an instance is maintained by the Registry.

Author:
Christian Bauer

Field Summary
protected  int actualDurationSeconds
           
protected  UnsignedIntegerFourBytes currentSequence
           
protected  Map<String,StateVariableValue<S>> currentValues
           
protected  int requestedDurationSeconds
           
protected  S service
           
protected  String subscriptionId
           
 
Constructor Summary
protected GENASubscription(S service)
          Defaults to Constants.DEFAULT_SUBSCRIPTION_DURATION_SECONDS.
  GENASubscription(S service, int requestedDurationSeconds)
           
 
Method Summary
abstract  void established()
           
abstract  void eventReceived()
           
 int getActualDurationSeconds()
           
 UnsignedIntegerFourBytes getCurrentSequence()
           
 Map<String,StateVariableValue<S>> getCurrentValues()
           
 int getRequestedDurationSeconds()
           
 S getService()
           
 String getSubscriptionId()
           
 void setActualSubscriptionDurationSeconds(int seconds)
           
 void setSubscriptionId(String subscriptionId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

service

protected S extends Service service

subscriptionId

protected String subscriptionId

requestedDurationSeconds

protected int requestedDurationSeconds

actualDurationSeconds

protected int actualDurationSeconds

currentSequence

protected UnsignedIntegerFourBytes currentSequence

currentValues

protected Map<String,StateVariableValue<S extends Service>> currentValues
Constructor Detail

GENASubscription

protected GENASubscription(S service)
Defaults to Constants.DEFAULT_SUBSCRIPTION_DURATION_SECONDS.


GENASubscription

public GENASubscription(S service,
                        int requestedDurationSeconds)
Method Detail

getService

public S getService()

getSubscriptionId

public String getSubscriptionId()

setSubscriptionId

public void setSubscriptionId(String subscriptionId)

getRequestedDurationSeconds

public int getRequestedDurationSeconds()

getActualDurationSeconds

public int getActualDurationSeconds()

setActualSubscriptionDurationSeconds

public void setActualSubscriptionDurationSeconds(int seconds)

getCurrentSequence

public UnsignedIntegerFourBytes getCurrentSequence()

getCurrentValues

public Map<String,StateVariableValue<S>> getCurrentValues()

established

public abstract void established()

eventReceived

public abstract void eventReceived()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.