|
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.util.qos.QosData org.xmlBlaster.util.qos.ConnectQosData
public final class ConnectQosData
This class encapsulates the qos of a login() or connect().
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.
ConnectQosSaxFactory
,
org.xmlBlaster.test.classtest.ConnectQosTest
,
Serialized FormField Summary | |
---|---|
protected org.xmlBlaster.authentication.plugins.I_ClientPlugin |
clientPlugin
|
protected java.util.ArrayList |
clientQueuePropertyList
Holding queue properties for the client side invocation queue |
protected PropBoolean |
clusterNode
Allows to mark that we are an xmlBlaster cluster node. |
protected PropBoolean |
duplicateUpdates
If duplicateUpdates=false we will send only one update, even if the same client subscribed multiple times on the same message. |
protected I_ConnectQosFactory |
factory
|
protected PluginLoader |
pMgr
|
protected PropBoolean |
ptpAllowed
PtP messages wanted? True is default |
protected PropBoolean |
reconnected
Used for ConnetReturnQos only: If reconnected==true a client has reconnected to an existing session |
protected PropBoolean |
refreshSession
If the client automatically notifies xmlBlaster that it is alive and the login session is extended |
protected org.xmlBlaster.authentication.plugins.I_SecurityQos |
securityQos
|
protected java.lang.String |
serverInstanceId
|
protected ServerRef[] |
serverRefArr
The server reference, e.g. |
protected java.util.Vector |
serverRefVec
|
Fields inherited from class org.xmlBlaster.util.qos.QosData |
---|
DEFAULT_persistent, glob, rcvTimestamp, routeNodeList, routeNodes, serialData |
Constructor Summary | |
---|---|
ConnectQosData(Global glob)
Constructor for client side. |
|
ConnectQosData(Global glob,
I_ConnectQosFactory factory,
java.lang.String serialData,
NodeId nodeId)
Constructs the specialized quality of service object for a connect() or connect-return call. |
|
ConnectQosData(Global glob,
NodeId nodeId)
Constructor for cluster server. |
Method Summary | |
---|---|
void |
addAddress(Address address)
|
void |
addCallbackAddress(CallbackAddress callback)
Add a callback address where to send the message Creates a default CbQueueProperty object to hold the callback address argument. |
boolean |
addClientQueueProperty(ClientQueueProperty prop)
Adds a queue description. |
void |
addServerRef(ServerRef addr)
Adds a server reference, we check for identical addresses to no contain duplicates. |
java.lang.Object |
clone()
Returns a shallow clone, you can change safely all basic or immutable types like boolean, String, int. |
boolean |
contains(Address other)
Does the given address belong to this client connection setup? |
boolean |
duplicateUpdates()
|
PropBoolean |
duplicateUpdatesProp()
|
void |
eraseClientQueueProperty()
Usually done on server side as the server is not interested in it |
Address |
getAddress()
The current connection address and properties of the xmlBlaster server we want connect to. |
Address[] |
getAddresses(boolean forceCbAddressCreation)
The connection address and properties of the xmlBlaster server we want connect to. |
protected org.xmlBlaster.authentication.plugins.I_ClientPlugin |
getClientPlugin(java.lang.String type,
java.lang.String version)
Load a client side security plugin (for internal use only), is needed to create the security QoS string. |
java.lang.String |
getClientPluginType()
Return the type of the referenced security plugin. |
java.lang.String |
getClientPluginVersion()
Return the version of the referenced security plugin. |
ClientQueueProperty |
getClientQueueProperty()
The current used (or the default) queue property |
ClientQueueProperty[] |
getClientQueuePropertyArr()
At least one entry is delivered |
PropBoolean |
getClusterNodeProp()
|
CallbackAddress |
getCurrentCallbackAddress()
Access the currently used callback address. |
ConnectionStateEnum |
getInitialConnectionState()
Returns the connection state directly after the connect() method returns (client side only). |
java.lang.String |
getInstanceId()
Unique id of the xmlBlaster server (or a client), changes on each restart. |
PropBoolean |
getReconnectedProp()
|
boolean |
getRefreshSession()
|
PropBoolean |
getRefreshSessionProp()
|
org.xmlBlaster.authentication.plugins.I_SecurityQos |
getSecurityQos()
|
ServerRef |
getServerRef()
Accessing the ServerRef address of the xmlBlaster server this may be a CORBA-IOR or email or URL ... |
ServerRef[] |
getServerRefs()
Accessing the ServerRef addresses of the xmlBlaster server this may be a CORBA-IOR or email or URL ... |
CbQueueProperty |
getSessionCbQueueProperty()
Returns never null |
SessionName |
getSessionName()
Get our unique SessionName. |
SessionQos |
getSessionQos()
|
CbQueueProperty |
getSubjectQueueProperty()
The subjectQueue is exactly one instance for a subjectId (a loginName), it is used to hold the PtP messages send to this subject. |
java.lang.String |
getUserId()
|
boolean |
hasAddress()
|
boolean |
hasCallbackAddress()
|
boolean |
hasSessionCbQueueProperty()
|
boolean |
hasSubjectQueueProperty()
|
boolean |
isClusterNode()
|
boolean |
isPtpAllowed()
|
PropBoolean |
isPtpAllowedProp()
|
boolean |
isReconnected()
Used for ConnetReturnQos only. |
org.xmlBlaster.authentication.plugins.I_ClientPlugin |
loadClientPlugin(java.lang.String type,
java.lang.String version,
java.lang.String userId,
java.lang.String credential)
Allows to set or overwrite the client side security plugin. |
boolean |
removeServerRef(ServerRef addr)
|
boolean |
removeServerRef(java.lang.String type)
|
void |
setAddress(Address address)
Add an address to which we want to connect, with all the configured parameters. |
void |
setClusterNode(boolean clusterNode)
|
void |
setDuplicateUpdates(boolean duplicateUpdates)
|
void |
setInitialConnectionState(ConnectionStateEnum initialConnectionState)
Set the connection state directly after the connect() (client side only). |
void |
setInstanceId(java.lang.String instanceId)
Unique id of the xmlBlaster server (or a client), changes on each restart. |
void |
setPtpAllowed(boolean ptpAllowed)
|
void |
setReconnected(boolean reconnected)
Used for ConnetReturnQos only: If reconnected==true a client has reconnected to an existing session |
void |
setRefreshSession(boolean refreshSession)
|
void |
setSecurityQos(org.xmlBlaster.authentication.plugins.I_SecurityQos securityQos)
Force a security configuration. |
void |
setSessionCbQueueProperty(CbQueueProperty sessionCbQueueProperty)
|
void |
setSessionName(SessionName sessionName)
Set our unique SessionName. |
void |
setSubjectQueueProperty(CbQueueProperty subjectQueueProperty)
|
void |
setUserId(java.lang.String userId)
Allows to set or overwrite the login name for I_SecurityQos. |
int |
size()
The number of bytes of stringified qos |
java.lang.String |
toString()
Converts the data into a valid XML ASCII string. |
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. |
java.lang.String |
toXml(java.lang.String extraOffset,
boolean forceReadable)
|
java.lang.String |
toXml(java.lang.String extraOffset,
java.util.Properties props)
Dump state of this object into a XML ASCII string. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient I_ConnectQosFactory factory
protected PropBoolean ptpAllowed
<ptp>false<ptp/>
protected PropBoolean clusterNode
protected PropBoolean refreshSession
protected PropBoolean duplicateUpdates
protected PropBoolean reconnected
protected java.lang.String serverInstanceId
protected transient PluginLoader pMgr
protected org.xmlBlaster.authentication.plugins.I_ClientPlugin clientPlugin
protected org.xmlBlaster.authentication.plugins.I_SecurityQos securityQos
protected transient ServerRef[] serverRefArr
protected java.util.Vector serverRefVec
protected transient java.util.ArrayList clientQueuePropertyList
Constructor Detail |
---|
public ConnectQosData(Global glob) throws XmlBlasterException
XmlBlasterException
public ConnectQosData(Global glob, I_ConnectQosFactory factory, java.lang.String serialData, NodeId nodeId) throws XmlBlasterException
factory
- The factory which knows how to serialize and parse meserialData
- The XML based ASCII string (syntax is described in requirement interface.connect)nodeId
- The node id with stripped special characters (see Global#getStrippedId)
XmlBlasterException
public ConnectQosData(Global glob, NodeId nodeId) throws XmlBlasterException
nodeId
- The the unique cluster node id, supports configuration per node
XmlBlasterException
Method Detail |
---|
public CbQueueProperty getSubjectQueueProperty()
The subjectQueue has never callback addresses, the addresses of the sessions are used if configured.
public void setSubjectQueueProperty(CbQueueProperty subjectQueueProperty)
public boolean hasSubjectQueueProperty()
public CbQueueProperty getSessionCbQueueProperty()
public void setSessionCbQueueProperty(CbQueueProperty sessionCbQueueProperty)
public boolean hasSessionCbQueueProperty()
public void setSecurityQos(org.xmlBlaster.authentication.plugins.I_SecurityQos securityQos)
You can use loadClientPlugin() or setUserId() instead which loads the given/default security plugin and does a lookup in the environment.
public org.xmlBlaster.authentication.plugins.I_ClientPlugin loadClientPlugin(java.lang.String type, java.lang.String version, java.lang.String userId, java.lang.String credential) throws XmlBlasterException
Security.Client.DefaultPlugin=gui,1.0 Security.Client.Plugin[gui][1.0]=org.xmlBlaster.authentication.plugins.gui.ClientSecurityHelper<securityService type='simple' version='1.0'>...</securityService>
credential
- passwd If null the environment -passwd is checked
XmlBlasterException
public void setUserId(java.lang.String userId) throws XmlBlasterException
userId
- The unique user id (loginName)
XmlBlasterException
protected org.xmlBlaster.authentication.plugins.I_ClientPlugin getClientPlugin(java.lang.String type, java.lang.String version) throws XmlBlasterException
type
- If null, the current plugin is used
XmlBlasterException
public SessionQos getSessionQos()
public SessionName getSessionName()
public void setSessionName(SessionName sessionName)
public ServerRef[] getServerRefs()
public ServerRef getServerRef()
public void addServerRef(ServerRef addr)
public boolean removeServerRef(ServerRef addr)
public boolean removeServerRef(java.lang.String type)
public void setPtpAllowed(boolean ptpAllowed)
Set
- if we accept point to point messagespublic boolean isPtpAllowed()
public PropBoolean isPtpAllowedProp()
public void setClusterNode(boolean clusterNode)
Set
- if we are a cluster node.public boolean isClusterNode()
public PropBoolean getClusterNodeProp()
public final boolean getRefreshSession()
public final void setRefreshSession(boolean refreshSession)
refreshSession
- true: The client automatically notifies xmlBlaster that it is alive
and the login session is extendedpublic PropBoolean getRefreshSessionProp()
public void setDuplicateUpdates(boolean duplicateUpdates)
Set
- if we allow multiple updates for the same message if we have subscribed multiple times to it.public boolean duplicateUpdates()
public PropBoolean duplicateUpdatesProp()
public void setReconnected(boolean reconnected)
public boolean isReconnected()
public PropBoolean getReconnectedProp()
public void addAddress(Address address)
public void setAddress(Address address)
address
- An object containing the protocol (e.g. EMAIL) the address (e.g. hugo@welfare.org) and the connection propertiespublic Address getAddress()
public Address[] getAddresses(boolean forceCbAddressCreation)
public boolean addClientQueueProperty(ClientQueueProperty prop)
prop
- The property object of the client side queue which shall be established.
Address
public ClientQueueProperty getClientQueueProperty()
public boolean hasAddress()
public ClientQueueProperty[] getClientQueuePropertyArr()
public boolean contains(Address other)
public void eraseClientQueueProperty()
public void addCallbackAddress(CallbackAddress callback)
callback
- An object containing the protocol (e.g. EMAIL) and the address (e.g. hugo@welfare.org)public boolean hasCallbackAddress()
public CallbackAddress getCurrentCallbackAddress()
public org.xmlBlaster.authentication.plugins.I_SecurityQos getSecurityQos()
public java.lang.String getClientPluginType()
public java.lang.String getClientPluginVersion()
public java.lang.String getUserId()
public ConnectionStateEnum getInitialConnectionState()
public void setInitialConnectionState(ConnectionStateEnum initialConnectionState)
public int size()
size
in class QosData
public java.lang.String getInstanceId()
public void setInstanceId(java.lang.String instanceId)
instanceId
- e.g. '/node/heron/instanceId/33470080380'public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toXml()
toXml
in class QosData
public java.lang.String toXml(java.lang.String extraOffset)
extraOffset
- indenting of tags for nice output
public java.lang.String toXml(java.lang.String extraOffset, java.util.Properties props)
QosData
toXml
in class QosData
extraOffset
- indenting of tags for nice output
public java.lang.String toXml(java.lang.String extraOffset, boolean forceReadable)
public java.lang.Object clone()
clone
in class QosData
|
xmlBlaster 2.2.0 client API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |