jimm.twice.ice
Class Subscription

java.lang.Object
  extended byjimm.twice.ice.Subscription

public class Subscription
extends java.lang.Object

Instances of this class hold everything that an ICE machine needs to know about a subscription. Subscriptions are also useful to store offers.

Subscribers will typically load and save subscriptions. This is the responsibility of subclasses because we don't want to know about persistence in this layer of the system. Syndicators will typically load a set of prototypical subscriptions and use these prototype instances to generate new subscription ids for subscribers. Again, this behavior must lie in subclasses.

Author:
Jim Menard, jimm@io.com

Field Summary
protected  java.lang.String currentState
          Current state.
protected  Offer offer
           
 
Constructor Summary
Subscription(Offer o)
          Constructor.
 
Method Summary
 java.lang.String getCurrentState()
          Returns the current state or "ICE-ANY" if it is null.
 java.lang.String getIdentifier()
           
 java.lang.String getName()
           
 Offer getOffer()
           
 java.lang.String getPushURL()
           
 void setCurrentState(java.lang.String val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offer

protected Offer offer

currentState

protected java.lang.String currentState
Current state. If null, getCurrentState will return "ICE-ANY".

Constructor Detail

Subscription

public Subscription(Offer o)
Constructor.

Method Detail

getOffer

public Offer getOffer()

getIdentifier

public java.lang.String getIdentifier()

getName

public java.lang.String getName()

getPushURL

public java.lang.String getPushURL()

getCurrentState

public java.lang.String getCurrentState()
Returns the current state or "ICE-ANY" if it is null.

Returns:
the current state or "ICE-ANY" if it is null

setCurrentState

public void setCurrentState(java.lang.String val)