xmlBlaster 2.2.0 API

org.xmlBlaster.client.qos
Class ConnectReturnQos

java.lang.Object
  extended by org.xmlBlaster.client.qos.ConnectReturnQos

public class ConnectReturnQos
extends java.lang.Object

This class wraps the return string of org.xmlBlaster.authentication.Authenticate.connect(...).

It is used on the server side to wrap the return, and on the client side to parse the returned ASCII xml string. Please see documentation at ConnectQos which implements all features.

The only thing you may be interested in is the returned sessionId, and the flag if you have reconnected to your previous setting:

<qos>

   <securityService type='htpasswd' version='1.0'>
      <![CDATA[
      <user>joe</user>
      <passwd>secret</passwd>
      ]]>
   </securityService>

   <ptp>true</ptp>

   <session name='/node/heron/client/joe/2' timeout='86400000'
               maxSessions='10' clearSessions='false'
               sessionId='sessionId:192.168.1.2-null-1018875420070--582319444-3'/>

   <reconnected>false</reconnected>  <!-- Has the client reconnected to an existing session? -->

   <!-- CbQueueProperty -->
   <queue relating='callback'>
      <callback type='SOCKET'>
         192.168.1.2:33301
      </callback>
   </queue>

</qos>
 

See Also:
ConnectQos, connect interface

Field Summary
private  ConnectQosData connectQosData
           
private  Global glob
           
static java.lang.String ME
           
 
Constructor Summary
ConnectReturnQos(Global glob, ConnectQosData connectQosData)
           
ConnectReturnQos(Global glob, java.lang.String xmlQos)
           
 
Method Summary
 ConnectQosData getData()
          Access the wrapped data holder (for internal use only).
 ConnectionStateEnum getInitialConnectionState()
          Returns the connection state directly after the connect() method returns.
 java.lang.String getSecretSessionId()
          The secret sessionId which you need to use for further communication
 java.lang.String getServerInstanceId()
          Unique id of the xmlBlaster server, changes on each restart.
 ServerRef getServerRef()
          The address of the xmlBlaster server to which we are connected.
 CbQueueProperty getSessionCbQueueProperty()
          The callback queue exists exactly once per login session, it is used to hold the callback messages for the session.
 SessionName getSessionName()
          The object holding the unique connection name of the client.
 SessionQos getSessionQos()
          The object holding all session specific information.
 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()
          The user ID as used by the security framework.
 boolean isReconnected()
           
 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

ME

public static final java.lang.String ME
See Also:
Constant Field Values

glob

private Global glob

connectQosData

private ConnectQosData connectQosData
Constructor Detail

ConnectReturnQos

public ConnectReturnQos(Global glob,
                        ConnectQosData connectQosData)
                 throws XmlBlasterException
Throws:
XmlBlasterException

ConnectReturnQos

public ConnectReturnQos(Global glob,
                        java.lang.String xmlQos)
                 throws XmlBlasterException
Throws:
XmlBlasterException
Method Detail

getData

public ConnectQosData getData()
Access the wrapped data holder (for internal use only).


getServerRef

public final ServerRef getServerRef()
The address of the xmlBlaster server to which we are connected.


getSecretSessionId

public java.lang.String getSecretSessionId()
The secret sessionId which you need to use for further communication

See Also:
SessionQos.getSecretSessionId()

getSessionName

public SessionName getSessionName()
The object holding the unique connection name of the client.

See Also:
SessionQos.getSessionName()

getSessionQos

public SessionQos getSessionQos()
The object holding all session specific information.


getUserId

public java.lang.String getUserId()
The user ID as used by the security framework.


getSessionCbQueueProperty

public CbQueueProperty getSessionCbQueueProperty()
The callback queue exists exactly once per login session, it is used to hold the callback messages for the session.

Returns:
never null.

getSubjectQueueProperty

public 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.

The subjectQueue has never callback addresses, the addresses of the sessions are used if configured.

Returns:
never null.

getInitialConnectionState

public ConnectionStateEnum getInitialConnectionState()
Returns the connection state directly after the connect() method returns.

Returns:
Usually ConnectionStateEnum.ALIVE or ConnectionStateEnum.POLLING

isReconnected

public boolean isReconnected()
Returns:
true A client has reconnected to an existing session

getServerInstanceId

public java.lang.String getServerInstanceId()
Unique id of the xmlBlaster server, changes on each restart. If 'node/heron' is restarted, the instanceId changes.

Returns:
nodeId + timestamp, '/node/heron/instanceId/33470080380'

toXml

public final java.lang.String toXml()

toXml

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

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.