|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jimm.twice.ice.IceMachine jimm.twice.ice.Subscriber
The subscriber class implements behavior common to all subscribers. Subclasses need to manage subscriptions and worry about HTTP.
Field Summary | |
protected static java.lang.String |
LOG_FILE_PREFIX
|
protected java.util.ArrayList |
offers
Presumably, subclasses will add offers to this list. |
protected java.util.ArrayList |
subscriptions
Presumably, subclasses will add subscriptions to this list. |
Fields inherited from class jimm.twice.ice.IceMachine |
DEFAULT_LOGGER_PREFIX, domain, loggerPrefix, party, PING_RESPONSE_STRING |
Constructor Summary | |
Subscriber(java.lang.String domain,
Party party)
Constructor. |
Method Summary | |
SubscriptionType |
findSubscription(java.lang.String subId)
Returns the subscription with the specified identifier, or null if there is no such subscription. |
abstract void |
handlePing()
|
boolean |
hasSubscription(java.lang.String subId)
Returns true if we have the specified subscription. |
boolean |
hasSubscriptions()
Returns true if this subscriber has any subscriptions. |
abstract OK |
receiveCancellation(Cancellation cancellationResp)
|
abstract PackageConfirmationsType |
receivePackage(PackageType packageResp)
|
abstract PackageConfirmationsType |
receivePackages(Packages packagesResp)
|
abstract OK |
receiveStatus(StatusType statusResp)
|
abstract OK |
receiveSubscription(SubscriptionType subscriptionResp)
|
java.util.Iterator |
subscriptions()
Returns an iterator over the collection of subscriptions. |
Methods inherited from class jimm.twice.ice.IceMachine |
createIceHeader, getDomain, getLocationURL, getName, getParty, getRole, getUuid |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String LOG_FILE_PREFIX
protected java.util.ArrayList subscriptions
protected java.util.ArrayList offers
Constructor Detail |
public Subscriber(java.lang.String domain, Party party)
LOG_FILE_PREFIX
.
domain
- the machine's domain, used for generating ids 'n stuffparty
- this machine's syndicator or subscriber informationMethod Detail |
public boolean hasSubscriptions()
true
if this subscriber has any subscriptions.
true
if this subscriber has any subscriptionspublic java.util.Iterator subscriptions()
public SubscriptionType findSubscription(java.lang.String subId)
null
if there is no such subscription.
subId
- a subscription id
null
if not foundpublic boolean hasSubscription(java.lang.String subId)
true
if we have the specified subscription.
public abstract void handlePing() throws StatusCode
StatusCode
public abstract PackageConfirmationsType receivePackage(PackageType packageResp) throws StatusCode
StatusCode
public abstract PackageConfirmationsType receivePackages(Packages packagesResp) throws StatusCode
StatusCode
public abstract OK receiveCancellation(Cancellation cancellationResp) throws StatusCode
StatusCode
public abstract OK receiveSubscription(SubscriptionType subscriptionResp) throws StatusCode
StatusCode
public abstract OK receiveStatus(StatusType statusResp) throws StatusCode
StatusCode
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |