|
xmlBlaster 2.1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xmlBlaster.client.qos.SubscribeQos
public final class SubscribeQos
This class encapsulates the QoS (quality of service) of a subscribe() request.
A full specified subscribe qos could look like this:<qos> <id>__subId:/node/heron/client/joe/3/34</id> < Force a subscription ID from client side --> <meta>false</meta> <!-- Don't send me the xmlKey meta data on updates --> <content>false</content> <!-- Don't send me the content data on updates (notify only) --> <multiSubscribe>false</multiSubscribe> <!-- Ignore a second subscribe on same oid or XPATH --> <local>false</local> <!-- Inhibit the delivery of messages to myself if i have published it --> <initialUpdate>false</initialUpdate>; <filter type='myPlugin' version='1.0'>a!=100</filter> <!-- Filters messages i have subscribed as implemented in your plugin --> <history numEntries='20'/> <!-- Default is to deliver the current entry (numEntries='1'), '-1' deliver all --> </qos>see xmlBlaster/src/dtd/XmlQoS.xml
QueryQosData
,
QueryQosSaxFactory
,
subscribe interface,
MIME access filter requirementField Summary | |
---|---|
private Global |
glob
|
private QueryQosData |
queryQosData
|
Constructor Summary | |
---|---|
SubscribeQos(Global glob)
Constructor for default qos (quality of service). |
|
SubscribeQos(Global glob,
QueryQosData queryQosData)
Constructor for internal use. |
Method Summary | |
---|---|
void |
addAccessFilter(AccessFilterQos filter)
Adds your supplied subscribe filter. |
void |
addClientProperty(java.lang.String key,
java.lang.Object value)
Sets a client property (an application specific property) to the given value |
void |
addQuerySpec(QuerySpecQos querySpec)
Adds your supplied get querySpec. |
java.lang.Object |
clone()
Returns a deep clone, you can change savely all basic or immutable types like boolean, String, int and also the ClientProperties and RouteInfo. |
ClientProperty |
getClientProperty(java.lang.String key)
Read back a property. |
QueryQosData |
getData()
Access the wrapped data holder. |
boolean |
getPersistent()
Gets the persistent flag for this subscription. |
static void |
main(java.lang.String[] args)
For testing: java org.xmlBlaster.client.qos.SubscribeQos |
void |
setHistoryQos(HistoryQos historyQos)
Query historical messages. |
void |
setMultiSubscribe(boolean multiSubscribe)
Are multiple subscribes allowed? Defaults to true. |
void |
setPersistent(boolean persistent)
Mark the subscription request to be persistent. |
void |
setSubscriptionId(java.lang.String subId)
Force the identifier (unique handle) for this subscription. |
void |
setWantContent(boolean content)
If false, the update contains not the content (it is a notify of change only) This may be useful if you have huge contents, and you only want to be informed about a change TODO: Implement in server!!! |
void |
setWantInitialUpdate(boolean initialUpdate)
Do we want to have an initial update on subscribe if the message exists already? Defaults to true. |
void |
setWantLocal(boolean local)
false Inhibit the delivery of messages to myself if i have published it. |
void |
setWantNotify(boolean notify)
If set to true (which is default) an erase notification message is sent to the subscriber when the topic is erased. |
void |
setWantUpdateOneway(boolean updateOneway)
Do we want the callback messages of this subscription as oneway with updateOneway() or with the acknowledged update(). |
java.lang.String |
toString()
Converts the data into a valid XML ASCII string. |
java.lang.String |
toXml()
Converts the data into a valid XML ASCII string. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final Global glob
private QueryQosData queryQosData
Constructor Detail |
---|
public SubscribeQos(Global glob)
public SubscribeQos(Global glob, QueryQosData queryQosData)
queryQosData
- The struct holding the dataMethod Detail |
---|
public QueryQosData getData()
public void setSubscriptionId(java.lang.String subId)
subId
- Must follow the syntax "__subId:" followed by your relative sessionName followed by a unique postfix token
for example "__subId:client/joe/session/1-[your-unqiue-postfix]"QueryQosData.setSubscriptionId(String)
public void setMultiSubscribe(boolean multiSubscribe)
public void setWantInitialUpdate(boolean initialUpdate)
initialUpdate
- true if initial update wanted
false if only updates on new publishes are sentQueryQosData.setWantInitialUpdate(boolean)
public void setWantUpdateOneway(boolean updateOneway)
updateOneway
- Defaults to false.QueryQosData.setWantUpdateOneway(boolean)
public void setWantLocal(boolean local)
QueryQosData.setWantLocal(boolean)
public void setWantContent(boolean content)
QueryQosData.setWantContent(boolean)
public void setWantNotify(boolean notify)
notify
- true - notify subscriber when the topic is erased (default is true)public void addAccessFilter(AccessFilterQos filter)
public void addQuerySpec(QuerySpecQos querySpec)
public void setHistoryQos(HistoryQos historyQos)
public void addClientProperty(java.lang.String key, java.lang.Object value)
key
- value
- public ClientProperty getClientProperty(java.lang.String key)
public void setPersistent(boolean persistent)
Sets the persistent flag for this subscription. If this flag is set, the subscription will persist a server crash.
persistent
- public boolean getPersistent()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toXml()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public static void main(java.lang.String[] args)
|
xmlBlaster 2.1.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |