|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjimm.twice.ice.DeliveryRule
A delivery rule describes how a subscription gets delivered.
Implementation note: the transport and packaging lists must be ordered so that the subscription GUI can work. It needs to be able to display them to the user and let the user select from among them. In order to do this, we have to guarantee that we can specify the n'th element of thoses lists. This requirement of ordering has nothing to do with the ICE spec, but it does no harm to enforce it here.
Subscription
,
Offer
,
Transport
,
Packaging
Field Summary | |
protected java.lang.String |
mode
|
static java.lang.String |
MODE_PULL
|
static java.lang.String |
MODE_PUSH
|
protected java.util.List |
packagings
|
protected java.util.List |
transports
|
Constructor Summary | |
DeliveryRule(java.lang.String mode)
|
Method Summary | |
void |
addPackaging(Packaging p)
|
void |
addTransport(Transport t)
|
DeliveryRule |
asXML()
|
DeliveryRule |
deepClone()
|
java.lang.String |
findURLForModeAndProtocol(java.lang.String m,
java.lang.String p)
Returns the first URL (delivery endpoint) for the specified mode (push/pull) and protocol (get, soap, ftp, etc.). |
java.lang.String |
getGetURL()
Returns the first get URL found in any transport, or null
if none is found. |
java.lang.String |
getMode()
|
Packaging |
getPackaging(int i)
|
java.lang.String |
getPullURL()
Returns the first pull URL found in any transport, or null
if none is found. |
java.lang.String |
getPushURL()
Returns the first push URL found in any transport, or null
if none is found. |
Transport |
getTransport(int i)
|
boolean |
hasTransportWithProtocol(java.lang.String protocol)
|
boolean |
isPull()
|
boolean |
isPush()
|
int |
numPackagings()
|
int |
numTransports()
|
java.util.Iterator |
packagings()
|
void |
removePackaging(int i)
|
void |
removeTransport(int i)
|
boolean |
requiresAcceptance()
Returns true if this rule requires a subscribe response
back to the syndicator. |
void |
setTransportWithProtocolEndpoint(java.lang.String protocol,
java.lang.String endpoint)
|
java.util.Iterator |
transports()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MODE_PUSH
public static final java.lang.String MODE_PULL
protected java.lang.String mode
protected java.util.List transports
protected java.util.List packagings
Constructor Detail |
public DeliveryRule(java.lang.String mode)
Method Detail |
public DeliveryRule deepClone()
public java.lang.String getMode()
public boolean isPush()
public boolean isPull()
public void addTransport(Transport t)
public java.util.Iterator transports()
public int numTransports()
public Transport getTransport(int i)
public void removeTransport(int i)
public boolean hasTransportWithProtocol(java.lang.String protocol)
public void setTransportWithProtocolEndpoint(java.lang.String protocol, java.lang.String endpoint)
public boolean requiresAcceptance()
true
if this rule requires a subscribe response
back to the syndicator. This will return false
, for example,
if this rule only contains GET transports.
true
if this rule requires a subscribe response
back to the syndicatorpublic void addPackaging(Packaging p)
public java.util.Iterator packagings()
public int numPackagings()
public Packaging getPackaging(int i)
public void removePackaging(int i)
public java.lang.String getPushURL()
null
if none is found.
null
if none foundpublic java.lang.String getPullURL()
null
if none is found.
null
if none foundpublic java.lang.String getGetURL()
null
if none is found.
null
if none foundpublic java.lang.String findURLForModeAndProtocol(java.lang.String m, java.lang.String p)
null
if nothing matches.
null
if not foundpublic DeliveryRule asXML()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |