|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.client.qos.PublishQos
public final class PublishQos
This class encapsulates the qos of a publish() message.
So you don't need to type the 'ugly' XML ASCII string by yourself. After construction access the ASCII-XML string with the toXml() method.<qos> <priority>5</priority> <expiration lifeTime='60000' forceDestroy='false'/> <persistent /> <!-- The message shall be recoverable if xmlBlaster crashes --> <forceUpdate>true</forceUpdate> <readonly /> </qos>A typical publish qos in PtP mode could look like this:
<qos> <destination queryType='EXACT' forceQueuing='true'> joe </destination> <destination> /node/heron/client/Tim/-2 </destination> </qos>see xmlBlaster/src/dtd/XmlQoS.xml
MsgQosSaxFactory
,
publish interfaceConstructor Summary | |
---|---|
PublishQos(Global glob)
Default constructor for transient messages. |
|
PublishQos(Global glob,
boolean persistent)
|
|
PublishQos(Global glob,
Destination destination)
Default constructor for transient PtP messages. |
|
PublishQos(Global glob,
java.lang.String serialData)
|
Method Summary | |
---|---|
void |
addClientProperty(java.lang.String key,
boolean value)
|
void |
addClientProperty(java.lang.String key,
byte value)
|
void |
addClientProperty(java.lang.String key,
double value)
|
void |
addClientProperty(java.lang.String key,
float value)
|
void |
addClientProperty(java.lang.String key,
int value)
|
void |
addClientProperty(java.lang.String key,
long value)
|
void |
addClientProperty(java.lang.String key,
java.lang.Object value)
Sets a client property (an application specific property) to the given value |
void |
addClientProperty(java.lang.String key,
short value)
|
void |
addDestination(Destination destination)
Add a destination where to send the message. |
ClientProperty |
getClientProperty(java.lang.String key)
Read back a property. |
MsgQosData |
getData()
|
PriorityEnum |
getPriority()
Message priority. |
SessionName |
getSender()
Access sender name. |
java.lang.String |
getState()
|
java.lang.String |
getStateInfo()
|
boolean |
isVolatile()
|
static void |
main(java.lang.String[] args)
For testing invoke: java org.xmlBlaster.client.PublishQos |
void |
setAdministrative(boolean administrative)
|
void |
setContentEncoding(java.lang.String encoding)
Sets the encoding in the client properties of the content of the message to be published. |
void |
setForceDestroy(boolean forceDestroy)
Control message life cycle on message expiry, defaults to false. |
void |
setForceUpdate(boolean force)
Send message to subscriber even if the content is the same as the previous? Default is that xmlBlaster does send messages to subscribed clients, even the content didn't change. |
void |
setLifeTime(long lifeTime)
The message expires after given milliseconds. |
void |
setPersistent(boolean persistent)
Mark a message to be persistent. |
void |
setPriority(PriorityEnum priority)
Set message priority value, PriorityEnum.NORM_PRIORITY (5) is default. |
void |
setReadonly(boolean readonly)
Mark a message to be readonly. |
void |
setSender(SessionName sender)
Access sender name. |
void |
setState(java.lang.String state)
|
void |
setStateInfo(java.lang.String stateInfo)
|
void |
setSubscribable(boolean isSubscribable)
As a default setting you can subscribe on all messages (PtP or PubSub). |
void |
setTopicProperty(TopicProperty topicProperty)
Administer/configure the message topic. |
void |
setVolatile(boolean volatileFlag)
Mark a message to be volatile or not. |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PublishQos(Global glob, java.lang.String serialData)
public PublishQos(Global glob)
public PublishQos(Global glob, Destination destination)
destination
- The object containing the destination address.public PublishQos(Global glob, boolean persistent)
persistent
- true = store the message persistentlyMethod Detail |
---|
public void setContentEncoding(java.lang.String encoding)
encoding
- like "cp1252"public MsgQosData getData()
public void setSubscribable(boolean isSubscribable)
isSubscribable
- true if Publish/Subscribe style is usedpublic PriorityEnum getPriority()
public void setPriority(PriorityEnum priority)
public void setForceUpdate(boolean force)
public void setReadonly(boolean readonly)
public void setVolatile(boolean volatileFlag)
public boolean isVolatile()
isVolatile()
public void setPersistent(boolean persistent)
public void setLifeTime(long lifeTime)
lifeTime
- in millisecondsMsgQosData.setLifeTime(long)
public void setForceDestroy(boolean forceDestroy)
forceDestroy
- true Force message destroy on message expirepublic void addDestination(Destination destination)
destination
- The loginName of a receiver or some destination XPath querypublic SessionName getSender()
public void setSender(SessionName sender)
loginName
- of senderpublic void setAdministrative(boolean administrative)
public void setState(java.lang.String state)
state
- The state to return to the server.
e.g. Contants.STATE_OK, see Constants.javapublic java.lang.String getState()
public void setStateInfo(java.lang.String stateInfo)
stateInfo
- The state info attribute to return to the server.public java.lang.String getStateInfo()
public void setTopicProperty(TopicProperty topicProperty)
public void addClientProperty(java.lang.String key, java.lang.Object value)
key
- value
- public void addClientProperty(java.lang.String key, boolean value)
public void addClientProperty(java.lang.String key, int value)
public void addClientProperty(java.lang.String key, byte value)
public void addClientProperty(java.lang.String key, long value)
public void addClientProperty(java.lang.String key, short value)
public void addClientProperty(java.lang.String key, double value)
public void addClientProperty(java.lang.String key, float value)
public ClientProperty getClientProperty(java.lang.String key)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toXml()
public static void main(java.lang.String[] args) throws XmlBlasterException
XmlBlasterException
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |