|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.engine.SessionPersistencePlugin
public class SessionPersistencePlugin
SessionPersistencePlugin provides the persistent storage for both sessions and subscriptions.
Field Summary | |
---|---|
private AddressServer |
addressServer
|
private int |
duplicateCounter
|
private int |
errorCounter
|
private ServerScope |
global
|
private PluginInfo |
info
|
private boolean |
isOK
flag indicating the status: true means initialized and not yet shut down) |
private static java.util.logging.Logger |
log
|
private static java.lang.String |
ME
|
private static java.lang.String |
ORIGINAL_INITIAL_UPDATES
when recovering all subscriptions must be 'noInitialUpdate' because otherwise we would get messages which we already got in the past |
private StorageId |
sessionStorageId
|
private I_Map |
sessionStore
|
private StorageId |
subscribeStorageId
|
private I_Map |
subscribeStore
|
private java.lang.Object |
sync
|
Fields inherited from interface org.xmlBlaster.engine.I_SessionPersistencePlugin |
---|
ID |
Fields inherited from interface org.xmlBlaster.engine.I_SubscriptionListener |
---|
PRIO_01, PRIO_05, PRIO_10 |
Constructor Summary | |
---|---|
SessionPersistencePlugin()
|
Method Summary | |
---|---|
private void |
addOrUpdateSession(SessionInfo sessionInfo)
A new session is added, checks if it shall be persisted. |
java.lang.Integer |
getPriority()
The priority by which it will be invoked. |
java.lang.String |
getType()
returns the plugin type |
java.lang.String |
getVersion()
returns the plugin version |
void |
init(Global glob,
PluginInfo pluginInfo)
Initializes the plugin |
private java.util.HashMap |
recoverSessions()
|
private void |
recoverSubscriptions(java.util.HashMap sessionIds)
When recovering due to a run level change (without shutting down the application) this will not work. |
private void |
removeAssociatedSubscriptions(SessionInfo sessionInfo)
|
boolean |
removeSession(long uniqueId,
ConnectQosData connectQosData)
|
void |
sessionAdded(ClientEvent e)
Invoked on successful client login |
void |
sessionPreRemoved(ClientEvent e)
Invoked before a client does a logout |
void |
sessionRemoved(ClientEvent e)
Invoked when client does a logout |
void |
sessionUpdated(ClientEvent e)
Invoked on successful client re-login (interface I_ClientListener) |
void |
shutdown()
Shutsdown the plugin |
void |
subjectAdded(ClientEvent e)
does nothing |
void |
subjectRemoved(ClientEvent e)
does nothing |
void |
subscriptionAdd(SubscriptionEvent e)
This event is invoked even by child subscriptions. |
void |
subscriptionRemove(SubscriptionEvent e)
Invoked when subscription does a logout |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ME
private static final java.lang.String ORIGINAL_INITIAL_UPDATES
private PluginInfo info
private ServerScope global
private static java.util.logging.Logger log
private boolean isOK
private I_Map sessionStore
private I_Map subscribeStore
private StorageId sessionStorageId
private StorageId subscribeStorageId
private AddressServer addressServer
private java.lang.Object sync
private int duplicateCounter
private int errorCounter
Constructor Detail |
---|
public SessionPersistencePlugin()
Method Detail |
---|
private java.util.HashMap recoverSessions() throws XmlBlasterException
XmlBlasterException
private void recoverSubscriptions(java.util.HashMap sessionIds) throws XmlBlasterException
XmlBlasterException
private void removeAssociatedSubscriptions(SessionInfo sessionInfo) throws XmlBlasterException
XmlBlasterException
public void init(Global glob, PluginInfo pluginInfo) throws XmlBlasterException
init
in interface I_Plugin
XmlBlasterException
I_Plugin.init(org.xmlBlaster.util.Global, org.xmlBlaster.util.plugin.PluginInfo)
public java.lang.String getType()
getType
in interface I_Plugin
I_Plugin.getType()
public java.lang.String getVersion()
getVersion
in interface I_Plugin
I_Plugin.getVersion()
public void shutdown() throws XmlBlasterException
shutdown
in interface I_Plugin
XmlBlasterException
- if an exception occurs. The exception is
handled by the RunLevelManager depending on how the plugin has been
configured with the action:
<action do='STOP' onShutdownRunlevel='2' sequence='5'
onFail='resource.configuration.pluginFailed'>
If onFail is defined to something, the RunLevelManager will stop.I_Plugin.shutdown()
private void addOrUpdateSession(SessionInfo sessionInfo) throws XmlBlasterException
XmlBlasterException
public void sessionAdded(ClientEvent e) throws XmlBlasterException
I_ClientListener
sessionAdded
in interface I_ClientListener
XmlBlasterException
I_ClientListener.sessionAdded(org.xmlBlaster.authentication.ClientEvent)
public void sessionUpdated(ClientEvent e) throws XmlBlasterException
sessionUpdated
in interface I_ClientListener
XmlBlasterException
public void sessionRemoved(ClientEvent e) throws XmlBlasterException
I_ClientListener
sessionRemoved
in interface I_ClientListener
XmlBlasterException
public void sessionPreRemoved(ClientEvent e) throws XmlBlasterException
I_ClientListener
sessionPreRemoved
in interface I_ClientListener
XmlBlasterException
I_ClientListener.sessionRemoved(org.xmlBlaster.authentication.ClientEvent)
public boolean removeSession(long uniqueId, ConnectQosData connectQosData)
public void subscriptionAdd(SubscriptionEvent e) throws XmlBlasterException
subscriptionAdd
in interface I_SubscriptionListener
XmlBlasterException
I_SubscriptionListener.subscriptionAdd(org.xmlBlaster.engine.SubscriptionEvent)
public void subscriptionRemove(SubscriptionEvent e) throws XmlBlasterException
I_SubscriptionListener
subscriptionRemove
in interface I_SubscriptionListener
XmlBlasterException
I_SubscriptionListener.subscriptionRemove(org.xmlBlaster.engine.SubscriptionEvent)
public void subjectAdded(ClientEvent e) throws XmlBlasterException
subjectAdded
in interface I_ClientListener
XmlBlasterException
public void subjectRemoved(ClientEvent e) throws XmlBlasterException
subjectRemoved
in interface I_ClientListener
XmlBlasterException
public java.lang.Integer getPriority()
I_SubscriptionListener
getPriority
in interface I_SubscriptionListener
I_SubscriptionListener.getPriority()
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |