xmlBlaster 2.1.0 API

org.xmlBlaster.engine.qos
Class PublishQosServer

java.lang.Object
  extended by org.xmlBlaster.engine.qos.PublishQosServer

public final class PublishQosServer
extends java.lang.Object

Handling of publish() quality of services in the server core.

This decorator hides the real qos data object and gives us a server specific view on it.

Author:
xmlBlaster@marcelruff.info
See Also:
MsgQosData, MsgQosSaxFactory

Field Summary
private  ServerScope glob
           
private  boolean isClusterUpdate
           
private  MsgQosData msgQosData
           
private  TopicEntry topicEntry
           
 
Constructor Summary
PublishQosServer(ServerScope glob, MsgQosData msgQosData, boolean fromPersistenceStore)
          Constructor which accepts parsed object.
PublishQosServer(ServerScope glob, QosData msgQosData)
          Constructor which accepts parsed object.
PublishQosServer(ServerScope glob, java.lang.String xmlQos)
          Constructs the specialized quality of service object for a publish() call, and parses the given XML string.
PublishQosServer(ServerScope glob, java.lang.String xmlQos, boolean fromPersistenceStore)
          Constructs the specialized quality of service object for a publish() call.
 
Method Summary
 void addRouteInfo(RouteInfo routeInfo)
           
 void clearRoutes()
           
private  void completeDestinations()
          Checks for relative destination names and completes them with our cluster node id
 int count(NodeId nodeId)
           
 boolean dirtyRead(NodeId nodeId)
           
 MsgQosData getData()
          Access the internal data struct
 Destination[] getDestinationArr()
           
 java.util.ArrayList getDestinations()
           
 SessionName getFirstDestination()
          Currently xmlBlaster handles only one Destination
 long getLifeTime()
           
 int getNumDestinations()
           
 PriorityEnum getPriority()
           
 Timestamp getRcvTimestamp()
           
 long getRemainingLife()
           
 RouteInfo[] getRouteNodes()
           
 SessionName getSender()
           
 java.lang.String getState()
           
 TopicEntry getTopicEntry()
           
 TopicProperty getTopicProperty()
           
 java.lang.String getXmlRcvTimestamp()
           
 boolean hasTopicProperty()
           
 boolean isClusterUpdate()
           
 boolean isExpired()
           
 boolean isForceUpdate()
           
 boolean isFromPersistenceStore()
          Internal use only, is this message sent from the persistence layer?
 boolean isPersistent()
           
 boolean isPtp()
           
 boolean isReadonly()
           
 boolean isSubscribable()
           
 boolean isVolatile()
           
 void removeDestination(Destination destination)
           
 void setClusterUpdate(boolean isClusterUpdate)
          The PublishQosServer supports to transport information about cluster callbacks
 void setFromPersistenceStore(boolean fromPersistenceStore)
          Internal use only, set if this message sent from the persistence layer
 void setLifeTime(long lifeTime)
           
 void setPriority(PriorityEnum priority)
           
 void setSender(SessionName sender)
           
 void setSubscribable(boolean isSubscribable)
           
 void setTopicEntry(TopicEntry topicEntry)
          The PublishQosServer supports to transport a topicEntry instance
 void touchRcvTimestamp()
           
 java.lang.String toXml()
           
 java.lang.String toXml(java.lang.String extraOffset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

glob

private final ServerScope glob

msgQosData

private final MsgQosData msgQosData

isClusterUpdate

private boolean isClusterUpdate

topicEntry

private TopicEntry topicEntry
Constructor Detail

PublishQosServer

public PublishQosServer(ServerScope glob,
                        QosData msgQosData)
                 throws XmlBlasterException
Constructor which accepts parsed object.

Throws:
XmlBlasterException

PublishQosServer

public PublishQosServer(ServerScope glob,
                        MsgQosData msgQosData,
                        boolean fromPersistenceStore)
                 throws XmlBlasterException
Constructor which accepts parsed object.

Parameters:
fromPersistenceStore - true if recovered from persistency
Throws:
XmlBlasterException

PublishQosServer

public PublishQosServer(ServerScope glob,
                        java.lang.String xmlQos)
                 throws XmlBlasterException
Constructs the specialized quality of service object for a publish() call, and parses the given XML string.

Parameters:
the - XML based ASCII string
Throws:
XmlBlasterException

PublishQosServer

public PublishQosServer(ServerScope glob,
                        java.lang.String xmlQos,
                        boolean fromPersistenceStore)
                 throws XmlBlasterException
Constructs the specialized quality of service object for a publish() call. For internal use only, this message is sent from the persistence layer

Parameters:
xmlQos - The XML based ASCII string
fromPersistenceStore - true if recovered from persistency
Throws:
XmlBlasterException
Method Detail

completeDestinations

private void completeDestinations()
                           throws XmlBlasterException
Checks for relative destination names and completes them with our cluster node id

Throws:
XmlBlasterException

getData

public MsgQosData getData()
Access the internal data struct


isClusterUpdate

public boolean isClusterUpdate()

setClusterUpdate

public void setClusterUpdate(boolean isClusterUpdate)
The PublishQosServer supports to transport information about cluster callbacks


getTopicEntry

public TopicEntry getTopicEntry()
Returns:
Not null if administratice message which is recovered from persistency

setTopicEntry

public void setTopicEntry(TopicEntry topicEntry)
The PublishQosServer supports to transport a topicEntry instance


setSubscribable

public void setSubscribable(boolean isSubscribable)
Parameters:
isSubscribable - true if Publish/Subscribe style is used
false Only possible for PtP messages to keep PtP secret (you can't subscribe them)

isSubscribable

public boolean isSubscribable()

isPtp

public boolean isPtp()

isVolatile

public boolean isVolatile()

isPersistent

public boolean isPersistent()

isForceUpdate

public boolean isForceUpdate()

isReadonly

public boolean isReadonly()

getSender

public SessionName getSender()

setSender

public void setSender(SessionName sender)

getState

public java.lang.String getState()

addRouteInfo

public void addRouteInfo(RouteInfo routeInfo)
See Also:
QosData.addRouteInfo(RouteInfo)

getRouteNodes

public RouteInfo[] getRouteNodes()
Returns:
never null, but may have length==0

clearRoutes

public void clearRoutes()

count

public int count(NodeId nodeId)

dirtyRead

public boolean dirtyRead(NodeId nodeId)

getPriority

public PriorityEnum getPriority()

setPriority

public void setPriority(PriorityEnum priority)

isFromPersistenceStore

public boolean isFromPersistenceStore()
Internal use only, is this message sent from the persistence layer?

Returns:
true/false

setFromPersistenceStore

public void setFromPersistenceStore(boolean fromPersistenceStore)
Internal use only, set if this message sent from the persistence layer

Parameters:
true/false -

setLifeTime

public void setLifeTime(long lifeTime)

getLifeTime

public long getLifeTime()

isExpired

public boolean isExpired()

getRcvTimestamp

public Timestamp getRcvTimestamp()

getXmlRcvTimestamp

public java.lang.String getXmlRcvTimestamp()

touchRcvTimestamp

public void touchRcvTimestamp()

getRemainingLife

public long getRemainingLife()

getFirstDestination

public SessionName getFirstDestination()
Currently xmlBlaster handles only one Destination

Returns:
The destination if PtP, else null

getDestinations

public java.util.ArrayList getDestinations()

getDestinationArr

public Destination[] getDestinationArr()

removeDestination

public void removeDestination(Destination destination)

getNumDestinations

public int getNumDestinations()

hasTopicProperty

public boolean hasTopicProperty()

getTopicProperty

public TopicProperty getTopicProperty()

toXml

public java.lang.String toXml()

toXml

public java.lang.String toXml(java.lang.String extraOffset)

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.