|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.util.qos.QosData
Base class for the various QoS implementations. Contains routing informations for cluster traversal
MsgUnit,
Serialized Form| Field Summary | |
private java.util.Map |
clientProperties
|
static boolean |
DEFAULT_persistent
|
private boolean |
fromPersistenceRecovery
Marker if message comes from persistent store and is recovered after a server restart. |
protected Global |
glob
|
private static java.util.logging.Logger |
log
|
private MethodName |
methodName
|
private PropBoolean |
persistent
|
protected Timestamp |
rcvTimestamp
The receive timestamp (UTC time), when message arrived in requestBroker.publish() method. In nanoseconds elapsed since midnight, January 1, 1970 UTC |
private static RouteInfo[] |
ROUTE_INFO_ARR_DUMMY
|
protected java.util.ArrayList |
routeNodeList
ArrayList containing RouteInfo objects |
protected RouteInfo[] |
routeNodes
Cache for RouteInfo in an array |
private SessionName |
sender
The sender (publisher) of this message (unique loginName), is set by server on arrival, and delivered with UpdateQos (with XML). |
protected java.lang.String |
serialData
|
private java.lang.String |
state
the state of the message, defaults to "OK" if no state is returned |
private java.lang.String |
stateInfo
Human readable information |
| Constructor Summary | |
QosData(Global glob,
java.lang.String serialData,
MethodName methodName)
Constructor, it does not parse the data, use a factory for this. |
|
| Method Summary | |
void |
addClientProperty(ClientProperty clientProperty)
Sets the client property to the given value |
void |
addClientProperty(java.lang.String key,
boolean value)
Sets the client property to the given value |
void |
addClientProperty(java.lang.String key,
byte value)
Sets the client property to the given value |
void |
addClientProperty(java.lang.String key,
double value)
Sets the client property to the given value |
void |
addClientProperty(java.lang.String key,
float value)
Sets the client property to the given value |
void |
addClientProperty(java.lang.String key,
int value)
Sets the client property to the given value |
void |
addClientProperty(java.lang.String key,
long value)
Sets the client property to the given value |
void |
addClientProperty(java.lang.String key,
java.lang.Object value)
Sets the client property to the given value |
void |
addClientProperty(java.lang.String key,
short value)
Sets the client property to the given value |
void |
addClientProperty(java.lang.String key,
java.lang.String type,
java.lang.Object value)
Sets the client property to the given value |
void |
addRouteInfo(RouteInfo routeInfo)
Adds a new route hop to the QoS of this message. |
void |
clearRoutes()
|
java.lang.Object |
clone()
Returns a deep clone, you can change savely all mutable types. |
int |
count(NodeId nodeId)
Check if the message has already been at the given node (circulating message). |
boolean |
dirtyRead(NodeId nodeId)
Check if the message has already been at the given node (circulating message). |
java.util.Map |
getClientProperties()
Access all client properties. |
ClientProperty |
getClientProperty(java.lang.String name)
Access the client property. |
boolean |
getClientProperty(java.lang.String name,
boolean defaultValue)
Access the boolean client property. |
byte |
getClientProperty(java.lang.String name,
byte defaultValue)
Access the byte client property. |
byte[] |
getClientProperty(java.lang.String name,
byte[] defaultValue)
Access the byte[] client property. |
double |
getClientProperty(java.lang.String name,
double defaultValue)
Access the double client property. |
float |
getClientProperty(java.lang.String name,
float defaultValue)
Access the float client property. |
int |
getClientProperty(java.lang.String name,
int defaultValue)
Access the integer client property. |
long |
getClientProperty(java.lang.String name,
long defaultValue)
Access the long client property. |
short |
getClientProperty(java.lang.String name,
short defaultValue)
Access the short client property. |
java.lang.String |
getClientProperty(java.lang.String name,
java.lang.String defaultValue)
Access the String client property. |
ClientProperty[] |
getClientPropertyArr()
|
Global |
getGlobal()
|
MethodName |
getMethod()
|
int |
getNumRouteNodes()
The number of hops |
PropBoolean |
getPersistentProp()
|
java.lang.String |
getRcvTime()
Deprecated. Use getXmlRcvTimestamp() |
Timestamp |
getRcvTimestamp()
The approximate receive timestamp (UTC time), when message arrived in requestBroker.publish() method. In milliseconds elapsed since midnight, January 1, 1970 UTC |
RouteInfo[] |
getRouteNodes()
|
SessionName |
getSender()
Access sender unified naming object. |
java.lang.String |
getState()
Access state of message on update(). |
java.lang.String |
getStateInfo()
Access state of message on update(). |
boolean |
hasStateInfo()
|
boolean |
isAtMaster()
Check if this message is at its master cluster location |
boolean |
isErase()
|
boolean |
isErased()
True if the message was erased by timer or by a client invoking erase(). |
boolean |
isForwardError()
True on cluster forward problems |
boolean |
isFromPersistenceRecovery()
Flag if the message comes from persistent store after recovery. |
void |
isFromPersistenceRecovery(boolean fromPersistenceRecovery)
Marker if the message comes from persistent store after recovery. |
boolean |
isGet()
|
boolean |
isOk()
True if the message is OK on update(). |
boolean |
isPersistent()
|
boolean |
isPublish()
|
boolean |
isSubscribe()
|
boolean |
isTimeout()
True if a timeout on this message occurred. |
boolean |
isUnSubscribe()
|
boolean |
isUpdate()
|
boolean |
propertyExists(java.lang.String name)
Check for client property. |
void |
setGlobal(Global glob)
Sets the global object (used when deserializing the object) |
void |
setMethod(MethodName methodName)
|
void |
setPersistent(boolean persistent)
|
void |
setRcvTimestamp(Timestamp rcvTimestamp)
The approximate receive timestamp (UTC time), when message arrived in requestBroker.publish() method. In milliseconds elapsed since midnight, January 1, 1970 UTC |
void |
setSender(SessionName senderSessionName)
Access sender name. |
void |
setState(java.lang.String state)
|
void |
setStateInfo(java.lang.String stateInfo)
|
int |
size()
The data size for persistence |
void |
touchRcvTimestamp()
Set timestamp to current time. |
abstract java.lang.String |
toXml()
The literal XML string of the QoS |
abstract java.lang.String |
toXml(java.lang.String extraOffset,
java.util.Properties props)
Dump state of this object into a XML ASCII string. |
java.lang.String |
writePropertiesXml(java.lang.String offset)
|
java.lang.String |
writePropertiesXml(java.lang.String offset,
boolean forceReadable)
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected transient Global glob
private static java.util.logging.Logger log
protected final transient java.lang.String serialData
private java.lang.String state
private java.lang.String stateInfo
private boolean fromPersistenceRecovery
protected Timestamp rcvTimestamp
public static final transient boolean DEFAULT_persistent
private PropBoolean persistent
private SessionName sender
protected java.util.ArrayList routeNodeList
protected transient RouteInfo[] routeNodes
private static RouteInfo[] ROUTE_INFO_ARR_DUMMY
private MethodName methodName
private java.util.Map clientProperties
| Constructor Detail |
public QosData(Global glob,
java.lang.String serialData,
MethodName methodName)
| Method Detail |
public void setGlobal(Global glob)
public void setState(java.lang.String state)
state - The state of an update messagepublic java.lang.String getState()
public void setStateInfo(java.lang.String stateInfo)
public java.lang.String getStateInfo()
public boolean hasStateInfo()
public boolean isOk()
public boolean isErased()
public final boolean isTimeout()
public final boolean isForwardError()
public void isFromPersistenceRecovery(boolean fromPersistenceRecovery)
public boolean isFromPersistenceRecovery()
public SessionName getSender()
public void setSender(SessionName senderSessionName)
public void setRcvTimestamp(Timestamp rcvTimestamp)
public Timestamp getRcvTimestamp()
This timestamp is unique for a message instance published and may be used to identify this message. For example a publisher and a receiver of a message can identify this message by its topic (key oid) and its receive timestamp.
To get a human readable view on the timestamp try:
String time = qos.getRcvTimestamp().toString(); -> "2002-02-10 10:52:40.879456789"
public void touchRcvTimestamp()
public java.lang.String getRcvTime()
public void setPersistent(boolean persistent)
persistent - mark a message as persistentpublic boolean isPersistent()
public PropBoolean getPersistentProp()
public final void addRouteInfo(RouteInfo routeInfo)
public final int getNumRouteNodes()
public final RouteInfo[] getRouteNodes()
public final void clearRoutes()
public int count(NodeId nodeId)
public final boolean isAtMaster()
public boolean dirtyRead(NodeId nodeId)
public int size()
public abstract java.lang.String toXml()
public abstract java.lang.String toXml(java.lang.String extraOffset,
java.util.Properties props)
extraOffset - indenting of tags for nice output
public final Global getGlobal()
public final MethodName getMethod()
public final void setMethod(MethodName methodName)
public final boolean isPublish()
public final boolean isSubscribe()
public final boolean isUnSubscribe()
public final boolean isErase()
public final boolean isGet()
public final boolean isUpdate()
public java.lang.Object clone()
public final void addClientProperty(ClientProperty clientProperty)
public final void addClientProperty(java.lang.String key,
java.lang.String type,
java.lang.Object value)
key - type - For example Constants.TYPE_FLOATvalue - Of any type, it will be forced to the given type
public final void addClientProperty(java.lang.String key,
java.lang.Object value)
key - value - for example a Float or Integer value
public final void addClientProperty(java.lang.String key,
boolean value)
key - value -
public final void addClientProperty(java.lang.String key,
int value)
key - value -
public final void addClientProperty(java.lang.String key,
byte value)
key - value -
public final void addClientProperty(java.lang.String key,
long value)
key - value -
public final void addClientProperty(java.lang.String key,
short value)
key - value -
public final void addClientProperty(java.lang.String key,
double value)
key - value -
public final void addClientProperty(java.lang.String key,
float value)
key - value - public final ClientProperty getClientProperty(java.lang.String name)
name - The property key
public final boolean propertyExists(java.lang.String name)
name - The property key
public final java.lang.String getClientProperty(java.lang.String name,
java.lang.String defaultValue)
name - The property keydefaultValue - The value to return if the property is not known
public final int getClientProperty(java.lang.String name,
int defaultValue)
name - The property keydefaultValue - The value to return if the property is not known
public final boolean getClientProperty(java.lang.String name,
boolean defaultValue)
name - The property keydefaultValue - The value to return if the property is not known
public final double getClientProperty(java.lang.String name,
double defaultValue)
name - The property keydefaultValue - The value to return if the property is not known
public final float getClientProperty(java.lang.String name,
float defaultValue)
name - The property keydefaultValue - The value to return if the property is not known
public final byte getClientProperty(java.lang.String name,
byte defaultValue)
name - The property keydefaultValue - The value to return if the property is not known
public final byte[] getClientProperty(java.lang.String name,
byte[] defaultValue)
name - The property keydefaultValue - The value to return if the property is not known
public final long getClientProperty(java.lang.String name,
long defaultValue)
name - The property keydefaultValue - The value to return if the property is not known
public final short getClientProperty(java.lang.String name,
short defaultValue)
name - The property keydefaultValue - The value to return if the property is not knownpublic final java.util.Map getClientProperties()
ClientPropertypublic final ClientProperty[] getClientPropertyArr()
public final java.lang.String writePropertiesXml(java.lang.String offset)
public final java.lang.String writePropertiesXml(java.lang.String offset,
boolean forceReadable)
|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||