xmlBlaster 2.2.0 API

org.xmlBlaster.util.qos
Class TopicProperty

java.lang.Object
  extended by org.xmlBlaster.util.qos.TopicProperty
All Implemented Interfaces:
java.io.Serializable

public final class TopicProperty
extends java.lang.Object
implements java.io.Serializable

Data container handling properties of a message topic.

QoS Informations sent from the client to the server via the publish() method
They are needed to control xmlBlaster topics.

This data holder is accessible through decorators, each of them allowing a specialized view on the data

Author:
xmlBlaster@marcelruff.info
See Also:
MsgQosSaxFactory, MsgQosFactoryTest, Serialized Form

Field Summary
private  PropBoolean createDomEntry
           
static boolean DEFAULT_readonly
          Is readonly allows only one initial message
private  PropLong destroyDelay
          A topic is destroyed 60 sec after state=UNREFERENCED is reached This is the configured destroyDelay in millis
static long destroyDelay_DEFAULT
           
private static long destroyDelay_DEFAULT_DEFAULT
          A topic is destroyed 60 sec after state=UNREFERENCED is reached This default can be modified in xmlBlaster.properties:
private  Global glob
           
private  HistoryQueueProperty historyQueueProperty
           
private  PropString msgDistributor
           
private  MsgUnitStoreProperty msgUnitStoreProperty
           
private  PropBoolean readonly
           
private static long serialVersionUID
           
 
Constructor Summary
TopicProperty(Global glob)
          Constructs the specialized quality of service object for a publish() or update() call.
 
Method Summary
 boolean createDomEntry()
          Is the topic available in the internal DOM tree?
 long getDestroyDelay()
          The life time of the message topic in state UNREFERENCED
 HistoryQueueProperty getHistoryQueueProperty()
           
 java.lang.String getMsgDistributor()
           
 MsgUnitStoreProperty getMsgUnitStoreProperty()
           
 boolean hasHistoryQueueProperty()
           
 boolean hasMsgUnitStoreProperty()
           
 boolean isMsgDistributorModified()
           
 boolean isReadonly()
           
 void setCreateDomEntry(boolean createDomEntry)
          Set if the topic is available in the internal DOM tree.
 void setDestroyDelay(long destroyDelay)
          The life time of the message topic in state UNREFERENCED
 void setGlobal(Global glob)
          Sets the global object (used when deserializing the object)
 void setHistoryQueueProperty(HistoryQueueProperty historyQueueProperty)
           
 void setMsgDistributor(java.lang.String typeVersion)
          Tells the server which plugin to use (if any) for the distribution of the message entries for this topic
 void setMsgUnitStoreProperty(MsgUnitStoreProperty msgUnitStoreProperty)
           
 void setReadonly(boolean readonly)
           
 java.lang.String toXml()
          Dump state of this object into a XML ASCII string.
 java.lang.String toXml(java.lang.String extraOffset)
          Dump state of this object into a XML ASCII string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

glob

private transient Global glob

msgUnitStoreProperty

private transient MsgUnitStoreProperty msgUnitStoreProperty

historyQueueProperty

private transient HistoryQueueProperty historyQueueProperty

destroyDelay_DEFAULT_DEFAULT

private static final long destroyDelay_DEFAULT_DEFAULT
A topic is destroyed 60 sec after state=UNREFERENCED is reached This default can be modified in xmlBlaster.properties:
    topic.destroyDelay=3600000 # One hour [millisec]
 
Every message can set the destroyDelay value between 1 and destroyDelay_DEFAULT, -1L sets the life cycle on forever.

See Also:
Constant Field Values

destroyDelay_DEFAULT

public static final long destroyDelay_DEFAULT

DEFAULT_readonly

public static boolean DEFAULT_readonly
Is readonly allows only one initial message


readonly

private PropBoolean readonly

destroyDelay

private PropLong destroyDelay
A topic is destroyed 60 sec after state=UNREFERENCED is reached This is the configured destroyDelay in millis


createDomEntry

private PropBoolean createDomEntry

msgDistributor

private PropString msgDistributor
Constructor Detail

TopicProperty

public TopicProperty(Global glob)
Constructs the specialized quality of service object for a publish() or update() call.

Method Detail

setReadonly

public void setReadonly(boolean readonly)

isReadonly

public boolean isReadonly()
Returns:
true/false

getDestroyDelay

public long getDestroyDelay()
The life time of the message topic in state UNREFERENCED

Parameters:
The - destroy delay in milliseconds

setDestroyDelay

public void setDestroyDelay(long destroyDelay)
The life time of the message topic in state UNREFERENCED

Parameters:
destroyDelay: - > 0 The topic is automatically destroyed after the given millis in state UNREFERENCED
< 0 The topic is only erased by an explicit erase() invocation
== 0 The topic is destroyed immediately when reaching state==UNREFERENCED

createDomEntry

public boolean createDomEntry()
Is the topic available in the internal DOM tree?

Returns:
true This is default and the topic is queryable with XPATH
false: No DOM tree is created for the topic and the topic is onvisible to XPATH queries

setCreateDomEntry

public void setCreateDomEntry(boolean createDomEntry)
Set if the topic is available in the internal DOM tree.

Parameters:
true - This is default and the topic is queryable with XPATH
false: No DOM tree is created for the topic and the topic is onvisible to XPATH queries

hasMsgUnitStoreProperty

public boolean hasMsgUnitStoreProperty()

getMsgUnitStoreProperty

public MsgUnitStoreProperty getMsgUnitStoreProperty()
Returns:
the configuration of the message store, is never null

setMsgUnitStoreProperty

public void setMsgUnitStoreProperty(MsgUnitStoreProperty msgUnitStoreProperty)

hasHistoryQueueProperty

public boolean hasHistoryQueueProperty()

getHistoryQueueProperty

public HistoryQueueProperty getHistoryQueueProperty()
Returns:
the configuration of the history queue, is never null

setHistoryQueueProperty

public void setHistoryQueueProperty(HistoryQueueProperty historyQueueProperty)

setMsgDistributor

public void setMsgDistributor(java.lang.String typeVersion)
Tells the server which plugin to use (if any) for the distribution of the message entries for this topic

Parameters:
type - the type of the plugin to use (default "undef")
version - the version of the plugin to use (default "1.0")
See Also:
I_MsgDistributor

getMsgDistributor

public java.lang.String getMsgDistributor()
Returns:
the comma separated type and version like "undef,1.0"

isMsgDistributorModified

public boolean isMsgDistributorModified()

toXml

public java.lang.String toXml()
Dump state of this object into a XML ASCII string.

Returns:
internal state of the message QoS as a XML ASCII string

toXml

public java.lang.String toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string.

Parameters:
extraOffset - indenting of tags for nice output
Returns:
internal state of the message QoS as a XML ASCII string, never null but "" if all values are default

setGlobal

public void setGlobal(Global glob)
Sets the global object (used when deserializing the object)


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.