|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jimm.twice.ice.Offer
An offer from a syndicator. These offers are created when a catalog is parsed by a subscriber. The subscriber can then set the pushWanted, pullWanted, and getWanted flags. An offer knows how to generate itself as a message, either for a catalog or for a subscribe request
Implementation note: the rule list must be ordered so that the subscription GUI can work. It needs to be able to display the rules to the user. Wwe have to guarantee that we can specify the n'th element of that list. This requirement of ordering has nothing to do with the ICE spec, but it does no harm to enforce it here.
Field Summary | |
protected java.util.List |
deliveryRules
|
protected java.lang.String |
description
|
protected java.lang.String |
identifier
|
protected java.lang.String |
name
|
Constructor Summary | |
Offer(java.lang.String offerId,
java.lang.String name)
Constructor |
Method Summary | |
void |
addDeliveryRule(DeliveryRule rule)
|
Offer |
asXML()
Returns this subscription as an XML offer message suitable for sending as part of a catalog or a subscribe message. |
Offer |
deepClone()
Performs a deep copy. |
java.util.Iterator |
deliveryRules()
|
java.lang.String |
generateIdentifier(java.lang.String syndicatorDomain,
java.lang.String subscriberId)
Creates, saves, and returns a new identifier. |
DeliveryRule |
getDeliveryRule(int i)
|
java.lang.String |
getDescription()
|
java.lang.String |
getGetURL()
Returns the first get URL found in any delivery rule, or null
if none is found. |
java.lang.String |
getIdentifier()
|
java.lang.String |
getName()
|
java.lang.String |
getPullURL()
Returns the first pull URL found in any delivery rule, or null
if none is found. |
java.lang.String |
getPushURL()
Returns the first push URL found in any delivery rule, or null
if none is found. |
boolean |
isGet()
|
boolean |
isPull()
|
boolean |
isPush()
|
int |
numDeliveryRules()
|
boolean |
requiresAcceptance()
Returns true if this offer requires a subscribe response
back to the syndicator. |
void |
setDescription(java.lang.String val)
|
void |
setIdentifier(java.lang.String id)
|
void |
setName(java.lang.String val)
|
void |
setPushURL(java.lang.String url)
Sets the delivery endpoint URL of the first push SOAP transport. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String identifier
protected java.lang.String name
protected java.lang.String description
protected java.util.List deliveryRules
Constructor Detail |
public Offer(java.lang.String offerId, java.lang.String name)
name
- an optional string useful for subscription id generation;
may be null
Method Detail |
public Offer deepClone()
public java.lang.String getIdentifier()
public void setIdentifier(java.lang.String id)
public java.lang.String generateIdentifier(java.lang.String syndicatorDomain, java.lang.String subscriberId)
syndicatorDomain
- the syndicator's domain stringsubscriberId
- the subscriber's UUID; used to generate a numeric key
public java.lang.String getName()
public void setName(java.lang.String val)
public java.lang.String getDescription()
public void setDescription(java.lang.String val)
public void addDeliveryRule(DeliveryRule rule)
public java.util.Iterator deliveryRules()
public int numDeliveryRules()
public DeliveryRule getDeliveryRule(int i)
public java.lang.String getPushURL()
null
if none is found.
null
if none foundpublic boolean isPush()
public void setPushURL(java.lang.String url)
public java.lang.String getPullURL()
null
if none is found.
null
if none foundpublic boolean isPull()
public java.lang.String getGetURL()
null
if none is found.
null
if none foundpublic boolean isGet()
public boolean requiresAcceptance()
true
if this offer requires a subscribe response
back to the syndicator. This will return false
, for example,
if this offer is only a GET offer.
true
if this offer requires a subscribe response
back to the syndicatorpublic Offer asXML()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |