xmlBlaster 2.2.0 API

org.xmlBlaster.authentication
Class SessionInfo

java.lang.Object
  extended by org.xmlBlaster.authentication.SessionInfo
All Implemented Interfaces:
I_Timeout, I_StorageSizeListener

public final class SessionInfo
extends java.lang.Object
implements I_Timeout, I_StorageSizeListener

SessionInfo stores all known session data about a client.

One client (SubjectInfo) may have multiple login sessions. Each session has its callback queue to deliver subscribed messages to the client.

We distinguish two different unique ID for each login session:

  1. sessionId: This is the unique, secret session Id which is passed by the client on every method invocation to allow authentication
  2. instanceId: This is a unique counter (with respect to one virtual machine JVM). It allows 'public' addressing of a session

Author:
Marcel Ruff
See Also:
The engine.qos.login requirement

Field Summary
private  boolean acceptWrongSenderAddress
           
private  java.lang.Object authorizationCache
          Can be optionally used by authorization frameworks
private  boolean blockClientSessionLogin
           
private  ConnectQosServer connectQos
          The current connection address from the protocol plugin
private  ContextNode contextNode
           
private  ServerDispatchManager dispatchManager
          manager for sending callback messages
private  java.lang.Object EXPIRY_TIMER_MONITOR
          Protects timerKey refresh
private  Timeout expiryTimer
           
private  ServerScope glob
           
private  boolean initialized
           
private static long instanceCounter
           
private  long instanceId
           
private  boolean isShutdown
           
private  long lastNumEntries
           
private  java.util.concurrent.locks.ReentrantLock lock
           
private static java.util.logging.Logger log
           
private  JmxMBeanHandle mbeanHandle
          My JMX registration
private  java.lang.String ME
           
private  MsgErrorHandler msgErrorHandler
          Do error recovery if message can't be delivered and we give it up
private  QueueQueryPlugin queueQueryPlugin
          this is used for administrative gets (queries on callback queue)
private  ClientPropertiesInfo remoteProperties
          Holding properties send by our remote client via the topic __sys__sessionProperties
private  I_Session securityCtx
           
private  SessionInfoProtector sessionInfoProtector
           
private  SessionName sessionName
          The cluster wide unique identifier of the session e.g.
private  I_Queue sessionQueue
          All MsgUnit which shall be delivered to the current session of the client are queued here to be ready to deliver.
private  long startupTime
          Incarnation time of this object instance in millis
private  DispatchStatistic statistic
          Statistic about send/received messages, can be null if there is a DispatchManager around
private  SubjectInfo subjectInfo
           
private  Timestamp timerKey
           
private  boolean transientWarn
          To prevent noisy warnings
private  XmlBlasterException transportConnectFail
           
private  java.util.Map<java.lang.String,java.lang.Object> userMap
          Map to store arbitrary info for this client, is cleaned up automatically when session dies Useful for example for plugins
 
Constructor Summary
SessionInfo(ServerScope glob, SessionName sessionName)
          Create this instance when a client did a login.
 
Method Summary
 ClientProperty addRemoteProperty(java.lang.String key, java.lang.String value)
          Add a remote property.
 void changed(I_Storage storage, long numEntries, long numBytes, boolean isShutdown)
          We register for queue size changes and notify the subject queue if we are willing to accept messages again.
 long clearCallbackQueue()
           
 void clearLastCallbackException()
           
 int clearRemoteProperties(java.lang.String prefix)
          Clear remote properties.
 java.lang.String disconnectClientKeepSession()
           
 void finalize()
           
 AddressServer getAddressServer()
          The address information got from the protocol plugin.
 java.lang.String getAliveSinceDate()
           
 java.lang.Object getAuthorizationCache()
          Can be optionally used by the current authorization plugin.
 MsgUnit[] getCallbackQueueEntries(java.lang.String query)
           
 long getCbQueueBytes()
           
 long getCbQueueBytesCache()
           
 long getCbQueueMaxMsgs()
           
 long getCbQueueMaxMsgsCache()
           
 long getCbQueueNumMsgs()
           
 long getCbQueueNumMsgsCache()
           
 java.lang.String getConnectionState()
           
 ConnectQosServer getConnectQos()
           
 ContextNode getContextNode()
          The unique name of this session instance.
 boolean getDispatcherActive()
           
 ServerDispatchManager getDispatchManager()
           
 DispatchStatistic getDispatchStatistic()
           
 java.lang.String getId()
          Cluster wide unique identifier: /node/heron/client//, e.g.
 long getInstanceId()
          This is a unique instance id per JVM (it is the pubSessionId if the client hasn't specified its own).
 java.lang.String getLastCallbackException()
           
 java.util.concurrent.locks.ReentrantLock getLock()
          Access the synchronization object of this SessionInfo instance.
 java.lang.String getLoginDate()
           
 java.lang.String getLoginName()
          Access the unique login name of a client.
 I_MsgErrorHandler getMsgErrorHandler()
           
 int getNumCallbackExceptions()
           
 long getNumErase()
           
 long getNumGet()
           
 long getNumPublish()
           
 long getNumSubscribe()
           
 long getNumUnSubscribe()
           
 long getNumUpdate()
           
 long getNumUpdateOneway()
           
 long getPersistenceUniqueId()
          Gets the uniqueId for the persistence of this session.
 long getPingRoundTripDelay()
           
 java.lang.String getPollingSinceDate()
           
 long getPublicSessionId()
          This is the publicSessionId which is unique in the subject scope.
 java.lang.String getQos()
           
 ClientPropertiesInfo getRemoteProperties()
           
 java.util.Map<java.lang.String,ClientProperty> getRemotePropertiesMap()
           
 ClientProperty[] getRemotePropertyArr()
           
 java.lang.String[] getRootSubscriptions()
           
 long getRoundTripDelay()
           
 java.lang.String getSecretSessionId()
           
 I_Session getSecuritySession()
           
 SessionInfoProtector getSessionInfoProtector()
          The protector prevents direct access to this sessionInfo instance.
 SessionName getSessionName()
           
 I_Queue getSessionQueue()
          This queue holds all messages which where addressed to this session
 java.lang.String getSessionTimeoutExpireDate()
           
 SubjectInfo getSubjectInfo()
          Accessing the SubjectInfo object

 java.lang.String[] getSubscribedTopics()
           
 java.lang.String getSubscriptionDump()
           
 java.lang.String[] getSubscriptions()
           
 XmlBlasterException getTransportConnectFail()
          If the connection failed the reason is stored here, like this cleanup code knows what happened.
 long getUptime()
           
 java.lang.String getUsageUrl()
          JMX
 java.lang.Object getUserObject(java.lang.String key, java.lang.Object defaultValue)
          Map to store arbitrary info for this client, is cleaned up automatically when session dies Useful for example for plugins
 java.util.Map<java.lang.String,java.lang.Object> getUserObjectMap()
          Use carefully to not harm other plugins.
 boolean hasAddress(AddressBase addr)
          Is the given address the same as our?
 boolean hasCallback()
          Check if a callback was configured (if client has passed a callback address on connect).
 boolean hasUserObject(java.lang.String key)
           
(package private)  void init(SubjectInfo subjectInfo, I_Session securityCtx, ConnectQosServer connectQos)
           
 boolean isAcceptWrongSenderAddress()
          Configure server with '-xmlBlaster/acceptWrongSenderAddress true' or "-xmlBlaster/acceptWrongSenderAddress/joe true".
 boolean isAlive()
           
 boolean isBlockClientSessionLogin()
           
 boolean isCallbackConfigured()
           
(package private)  boolean isInitialized()
           
 boolean isSameSession(SessionInfo sessionInfo)
          Check cluster wide if the sessions are identical
 boolean isShutdown()
           
 boolean isStalled()
           
 java.lang.String killSession()
           
 void lostClientConnection()
          Can be called when client connection is lost (NOT the callback connection).
 void mergeRemoteProperties(java.util.Map map)
          Update properties send by our client.
 java.lang.String[] peekCallbackMessages(int numOfEntries)
           
 java.lang.String[] peekCallbackMessagesToFile(int numOfEntries, java.lang.String path)
          Peek messages from callback queue and dump them to a file, they are not removed.
 java.lang.String pingClientCallbackServer()
           
 void queueMessage(MsgQueueEntry entry)
          Put the given message entry into the queue
 java.lang.String reactivateDispatcherThread(boolean force)
           
 void refreshSession()
          Call this to reactivate the session expiry to full value
 long releaseLockAssertOne(java.lang.String errorInfo)
          Freeing sessionInfo lock with test/assert code.
 void removeExpiryTimer()
           
 long removeFromCallbackQueue(long numOfEntries)
           
 void setAcceptWrongSenderAddress(boolean acceptWrongSenderAddress)
           
 void setAuthorizationCache(java.lang.Object authorizationCache)
           
 java.lang.String setBlockClientSessionLogin(boolean blockClient)
           
 void setDispatcherActive(boolean dispatcherActive)
          Sets the DispachManager belonging to this session to active or inactive.
 void setPersistenceUniqueId(long persistenceId)
          Sets the uniqueId used to retrieve this session from the persistence
 void setRemoteProperties(java.util.Map map)
          Set properties send by our client.
 void setSecuritySession(I_Session ctx)
           
 void setSessionTimeout(long timeout)
          JMX Enforced by ConnectQosDataMBean interface.
 void setTransportConnectFail(XmlBlasterException transportConnectFail)
           
 void setUsageUrl(java.lang.String url)
           
 java.lang.Object setUserObject(java.lang.String key, java.lang.Object value)
          The key should use a prefix to not collide with other users / plugins.
 void shutdown()
           
 java.lang.String subscribe(java.lang.String url, java.lang.String qos)
           
 void timeout(java.lang.Object userData)
          We are notified when this session expires.
 java.lang.String toString()
           
 java.lang.String toXml()
          Dump state of this object into a XML ASCII string.
 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[] unSubscribe(java.lang.String url, java.lang.String qos)
           
 java.lang.String[] unSubscribeByIndex(int index, java.lang.String qos)
           
 void updateConnectQos(ConnectQosServer newConnectQos)
           
 java.lang.String usage()
          JMX
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ME

private java.lang.String ME

contextNode

private ContextNode contextNode

sessionName

private final SessionName sessionName
The cluster wide unique identifier of the session e.g. "/node/heron/client/joe/2"


subjectInfo

private SubjectInfo subjectInfo

securityCtx

private I_Session securityCtx

instanceCounter

private static long instanceCounter

instanceId

private long instanceId

connectQos

private ConnectQosServer connectQos
The current connection address from the protocol plugin


expiryTimer

private Timeout expiryTimer

timerKey

private Timestamp timerKey

glob

private ServerScope glob

log

private static java.util.logging.Logger log

msgErrorHandler

private MsgErrorHandler msgErrorHandler
Do error recovery if message can't be delivered and we give it up


dispatchManager

private ServerDispatchManager dispatchManager
manager for sending callback messages


statistic

private volatile DispatchStatistic statistic
Statistic about send/received messages, can be null if there is a DispatchManager around


isShutdown

private boolean isShutdown

EXPIRY_TIMER_MONITOR

private final java.lang.Object EXPIRY_TIMER_MONITOR
Protects timerKey refresh


sessionInfoProtector

private SessionInfoProtector sessionInfoProtector

mbeanHandle

private JmxMBeanHandle mbeanHandle
My JMX registration


transientWarn

private boolean transientWarn
To prevent noisy warnings


authorizationCache

private java.lang.Object authorizationCache
Can be optionally used by authorization frameworks


blockClientSessionLogin

private boolean blockClientSessionLogin

transportConnectFail

private XmlBlasterException transportConnectFail

remoteProperties

private ClientPropertiesInfo remoteProperties
Holding properties send by our remote client via the topic __sys__sessionProperties


acceptWrongSenderAddress

private boolean acceptWrongSenderAddress

sessionQueue

private I_Queue sessionQueue
All MsgUnit which shall be delivered to the current session of the client are queued here to be ready to deliver.

Node objects = MsgQueueEntry


lastNumEntries

private long lastNumEntries

startupTime

private long startupTime
Incarnation time of this object instance in millis


lock

private java.util.concurrent.locks.ReentrantLock lock

queueQueryPlugin

private volatile QueueQueryPlugin queueQueryPlugin
this is used for administrative gets (queries on callback queue)


initialized

private boolean initialized

userMap

private java.util.Map<java.lang.String,java.lang.Object> userMap
Map to store arbitrary info for this client, is cleaned up automatically when session dies Useful for example for plugins

Constructor Detail

SessionInfo

SessionInfo(ServerScope glob,
            SessionName sessionName)
Create this instance when a client did a login.

You need to call init()!

Method Detail

init

void init(SubjectInfo subjectInfo,
          I_Session securityCtx,
          ConnectQosServer connectQos)
    throws XmlBlasterException
Parameters:
subjectInfo - the SubjectInfo with the login informations for this client
Throws:
XmlBlasterException

isInitialized

final boolean isInitialized()

isAlive

public final boolean isAlive()

getContextNode

public final ContextNode getContextNode()
The unique name of this session instance.

Returns:
Never null, for example "/xmlBlaster/node/heron/client/joe/session/-2"

isAcceptWrongSenderAddress

public boolean isAcceptWrongSenderAddress()
Configure server with '-xmlBlaster/acceptWrongSenderAddress true' or "-xmlBlaster/acceptWrongSenderAddress/joe true". Is available using JMX.

Returns:
true: We accept wrong sender address in PublishQos.getSender() (not myself)

setAcceptWrongSenderAddress

public void setAcceptWrongSenderAddress(boolean acceptWrongSenderAddress)
Parameters:
acceptWrongSenderAddress - the acceptWrongSenderAddress to set

getAddressServer

public AddressServer getAddressServer()
The address information got from the protocol plugin.

Returns:
Can be null

getSessionInfoProtector

public final SessionInfoProtector getSessionInfoProtector()
The protector prevents direct access to this sessionInfo instance.


getInstanceId

public final long getInstanceId()
This is a unique instance id per JVM (it is the pubSessionId if the client hasn't specified its own).

It is NOT the secret sessionId and may be published with PtP messages without security danger


getLock

public java.util.concurrent.locks.ReentrantLock getLock()
Access the synchronization object of this SessionInfo instance.


releaseLockAssertOne

public long releaseLockAssertOne(java.lang.String errorInfo)
Freeing sessionInfo lock with test/assert code.

Parameters:
errorInfo -
Returns:
number of holds released

hasCallback

public final boolean hasCallback()
Check if a callback was configured (if client has passed a callback address on connect).


getMsgErrorHandler

public final I_MsgErrorHandler getMsgErrorHandler()

getPublicSessionId

public final long getPublicSessionId()
This is the publicSessionId which is unique in the subject scope.

It is NOT the secret sessionId and may be published with PtP messages without security danger

Returns:
The same as getInstanceId()
See Also:
getInstanceId()

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

isShutdown

public boolean isShutdown()

removeExpiryTimer

public void removeExpiryTimer()

shutdown

public void shutdown()

getDispatchManager

public final ServerDispatchManager getDispatchManager()
Returns:
null if no callback is configured, can change to null on reconfiguration

getDispatchStatistic

public final DispatchStatistic getDispatchStatistic()
Returns:
never null but empty if no callback is configured

refreshSession

public final void refreshSession()
                          throws XmlBlasterException
Call this to reactivate the session expiry to full value

Throws:
XmlBlasterException

timeout

public final void timeout(java.lang.Object userData)
We are notified when this session expires.

Specified by:
timeout in interface I_Timeout
Parameters:
userData - You get bounced back your userData which you passed with Timeout.addTimeoutListener()

hasAddress

public final boolean hasAddress(AddressBase addr)
Is the given address the same as our?


queueMessage

public final void queueMessage(MsgQueueEntry entry)
                        throws XmlBlasterException
Put the given message entry into the queue

Throws:
XmlBlasterException

getConnectQos

public final ConnectQosServer getConnectQos()

updateConnectQos

public final void updateConnectQos(ConnectQosServer newConnectQos)
                            throws XmlBlasterException
Throws:
XmlBlasterException

getLoginName

public final java.lang.String getLoginName()
Access the unique login name of a client.

Returns:
loginName

getSubjectInfo

public final SubjectInfo getSubjectInfo()
Accessing the SubjectInfo object

Returns:
SubjectInfo

getSecretSessionId

public java.lang.String getSecretSessionId()
Returns:
The secret sessionId of this login session

getSecuritySession

public I_Session getSecuritySession()

setSecuritySession

public void setSecuritySession(I_Session ctx)

getSessionQueue

public I_Queue getSessionQueue()
This queue holds all messages which where addressed to this session

Returns:
null if no callback was configured

getId

public final java.lang.String getId()
Cluster wide unique identifier: /node/heron/client//, e.g. for logging only

Returns:
e.g. "/node/heron/client/joe/2

getSessionName

public final SessionName getSessionName()

isSameSession

public boolean isSameSession(SessionInfo sessionInfo)
Check cluster wide if the sessions are identical


changed

public void changed(I_Storage storage,
                    long numEntries,
                    long numBytes,
                    boolean isShutdown)
We register for queue size changes and notify the subject queue if we are willing to accept messages again. Enforced by I_StorageSizeListener

Specified by:
changed in interface I_StorageSizeListener
Parameters:
storage - The queue which fires the change event
numEntries - the number of entries in the queue after the change has taken place
numBytes - number of bytes in the queue after the change has taken change.
isShutdown - Is set to true if queue.shutdown() was executed

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
getId()

toXml

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

Returns:
internal state of SessionInfo as a XML ASCII string

toXml

public final java.lang.String toXml(java.lang.String extraOffset,
                                    java.util.Properties props)
Dump state of this object into a XML ASCII string.

Parameters:
extraOffset - indenting of tags for nice output
Returns:
internal state of SessionInfo as a XML ASCII string

getQos

public java.lang.String getQos()

isCallbackConfigured

public final boolean isCallbackConfigured()

getUptime

public final long getUptime()

getConnectionState

public final java.lang.String getConnectionState()

getLoginDate

public final java.lang.String getLoginDate()

getSessionTimeoutExpireDate

public final java.lang.String getSessionTimeoutExpireDate()

getAliveSinceDate

public final java.lang.String getAliveSinceDate()

getPollingSinceDate

public final java.lang.String getPollingSinceDate()

getLastCallbackException

public final java.lang.String getLastCallbackException()

clearLastCallbackException

public final void clearLastCallbackException()

getNumCallbackExceptions

public final int getNumCallbackExceptions()

getNumPublish

public final long getNumPublish()

getNumSubscribe

public final long getNumSubscribe()

getNumUnSubscribe

public final long getNumUnSubscribe()

getNumGet

public final long getNumGet()

getNumErase

public final long getNumErase()

getNumUpdateOneway

public final long getNumUpdateOneway()

getNumUpdate

public final long getNumUpdate()

getCbQueueNumMsgs

public final long getCbQueueNumMsgs()

getCbQueueBytes

public final long getCbQueueBytes()

getCbQueueBytesCache

public final long getCbQueueBytesCache()

getCbQueueNumMsgsCache

public final long getCbQueueNumMsgsCache()

getCbQueueMaxMsgs

public final long getCbQueueMaxMsgs()

getCbQueueMaxMsgsCache

public final long getCbQueueMaxMsgsCache()

pingClientCallbackServer

public java.lang.String pingClientCallbackServer()

getPingRoundTripDelay

public long getPingRoundTripDelay()

getRoundTripDelay

public long getRoundTripDelay()

getSubscribedTopics

public final java.lang.String[] getSubscribedTopics()

subscribe

public final java.lang.String subscribe(java.lang.String url,
                                        java.lang.String qos)
                                 throws XmlBlasterException
Throws:
XmlBlasterException

unSubscribeByIndex

public java.lang.String[] unSubscribeByIndex(int index,
                                             java.lang.String qos)
                                      throws XmlBlasterException
Throws:
XmlBlasterException

unSubscribe

public final java.lang.String[] unSubscribe(java.lang.String url,
                                            java.lang.String qos)
                                     throws XmlBlasterException
Throws:
XmlBlasterException

getSubscriptions

public final java.lang.String[] getSubscriptions()
                                          throws XmlBlasterException
Throws:
XmlBlasterException

getRootSubscriptions

public final java.lang.String[] getRootSubscriptions()
                                              throws XmlBlasterException
Throws:
XmlBlasterException

getSubscriptionDump

public final java.lang.String getSubscriptionDump()
                                           throws XmlBlasterException
Throws:
XmlBlasterException

killSession

public final java.lang.String killSession()
                                   throws XmlBlasterException
Throws:
XmlBlasterException

getPersistenceUniqueId

public final long getPersistenceUniqueId()
Gets the uniqueId for the persistence of this session.

Returns:
the uniqueId used to identify this session as an entry in the queue where it is stored (for persistent subscriptions). If the session is not persistent it returns -1L.

setPersistenceUniqueId

public final void setPersistenceUniqueId(long persistenceId)
Sets the uniqueId used to retrieve this session from the persistence

Parameters:
persistenceId -

setDispatcherActive

public void setDispatcherActive(boolean dispatcherActive)
Sets the DispachManager belonging to this session to active or inactive. It is initially active. Setting it to false temporarly inhibits dispatch of messages which are in the callback queue. Setting it to true starts the dispatch again.

Parameters:
dispatchActive -

getDispatcherActive

public boolean getDispatcherActive()

reactivateDispatcherThread

public java.lang.String reactivateDispatcherThread(boolean force)

peekCallbackMessages

public java.lang.String[] peekCallbackMessages(int numOfEntries)
                                        throws XmlBlasterException
Throws:
XmlBlasterException

peekCallbackMessagesToFile

public java.lang.String[] peekCallbackMessagesToFile(int numOfEntries,
                                                     java.lang.String path)
                                              throws java.lang.Exception
Peek messages from callback queue and dump them to a file, they are not removed.

Parameters:
numOfEntries - The number of messages to peek, taken from the front
path - The path to dump the messages to, it is automatically created if missing.
Returns:
The file names of the dumped messages
Throws:
java.lang.Exception

clearCallbackQueue

public long clearCallbackQueue()

removeFromCallbackQueue

public long removeFromCallbackQueue(long numOfEntries)
                             throws XmlBlasterException
Throws:
XmlBlasterException

getCallbackQueueEntries

public MsgUnit[] getCallbackQueueEntries(java.lang.String query)
                                  throws XmlBlasterException
Throws:
XmlBlasterException

setSessionTimeout

public final void setSessionTimeout(long timeout)
JMX Enforced by ConnectQosDataMBean interface.


usage

public java.lang.String usage()
JMX


getUsageUrl

public java.lang.String getUsageUrl()
JMX


setUsageUrl

public void setUsageUrl(java.lang.String url)

getRemoteProperties

public ClientPropertiesInfo getRemoteProperties()
Returns:
Returns the remoteProperties or null

getRemotePropertyArr

public ClientProperty[] getRemotePropertyArr()
Returns:
never null

getRemotePropertiesMap

public java.util.Map<java.lang.String,ClientProperty> getRemotePropertiesMap()

setRemoteProperties

public void setRemoteProperties(java.util.Map map)
Set properties send by our client.

Parameters:
remoteProperties - The remoteProperties to set, pass null to reset. The key is of type String and the value of type ClientProperty

clearRemoteProperties

public int clearRemoteProperties(java.lang.String prefix)
Clear remote properties.

Parameters:
prefix - if not null only keys starting with are removed
Returns:
number of removed entries

mergeRemoteProperties

public void mergeRemoteProperties(java.util.Map map)
Update properties send by our client.

Parameters:
remoteProperties - The remoteProperties to set, if a property exists its value is overwritten, passing null does nothing The key is of type String and the value of type ClientProperty

addRemoteProperty

public ClientProperty addRemoteProperty(java.lang.String key,
                                        java.lang.String value)
Add a remote property. Usually this is done by a publish of a client, but for testing reasons we can to it here manually. If the key exists, its value is overwritten

Parameters:
key - The unique key (no multimap)
value - The value, it is assumed to be of type "String"
Returns:
The old ClientProperty if existed, else null
See Also:
The admin.events requirement

isStalled

public boolean isStalled()

lostClientConnection

public void lostClientConnection()
Can be called when client connection is lost (NOT the callback connection). Currently only detected by the SOCKET protocol plugin. Others can only detect lost clients with their callback protocol pings


getTransportConnectFail

public XmlBlasterException getTransportConnectFail()
If the connection failed the reason is stored here, like this cleanup code knows what happened.

Returns:
the transportConnectFail

setTransportConnectFail

public void setTransportConnectFail(XmlBlasterException transportConnectFail)
Parameters:
transportConnectFail - the transportConnectFail to set

getAuthorizationCache

public java.lang.Object getAuthorizationCache()
Can be optionally used by the current authorization plugin.


setAuthorizationCache

public void setAuthorizationCache(java.lang.Object authorizationCache)

isBlockClientSessionLogin

public boolean isBlockClientSessionLogin()

setBlockClientSessionLogin

public java.lang.String setBlockClientSessionLogin(boolean blockClient)

disconnectClientKeepSession

public java.lang.String disconnectClientKeepSession()

getUserObject

public java.lang.Object getUserObject(java.lang.String key,
                                      java.lang.Object defaultValue)
Map to store arbitrary info for this client, is cleaned up automatically when session dies Useful for example for plugins


hasUserObject

public boolean hasUserObject(java.lang.String key)

setUserObject

public java.lang.Object setUserObject(java.lang.String key,
                                      java.lang.Object value)
The key should use a prefix to not collide with other users / plugins.

Parameters:
key -
value -
Returns:
the previous or null

getUserObjectMap

public java.util.Map<java.lang.String,java.lang.Object> getUserObjectMap()
Use carefully to not harm other plugins.

Returns:
of type Collections.synchronizedMap(new HashMap()

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.