xmlBlaster 2.2.0 API

org.xmlBlaster.authentication.plugins.demo
Class Manager

java.lang.Object
  extended by org.xmlBlaster.authentication.plugins.demo.Manager
All Implemented Interfaces:
I_Manager, I_Plugin

public class Manager
extends java.lang.Object
implements I_Manager

This example pops up a GUI, and a user has to confirm all logins and authorize messages manually.


Field Summary
private  PluginGUI frame
           
private  Global glob
           
private static java.util.logging.Logger log
           
private static java.lang.String ME
           
private  boolean packFrame
           
private  java.util.Hashtable sessions
           
private static java.lang.String TYPE
           
private static java.lang.String VERSION
           
 
Constructor Summary
Manager()
           
 
Method Summary
(package private)  void changeSecretSessionId(java.lang.String oldSessionId, java.lang.String newSessionId)
           
 Global getGlobal()
           
(package private)  PluginGUI getGUI()
           
 I_Session getSessionById(java.lang.String id)
          Get the I_Session which corresponds to the given sessionId

(package private)  Subject getSubject(java.lang.String name)
           
 java.lang.String getType()
           
 java.lang.String getVersion()
           
 void init(Global glob, PluginInfo pluginInfo)
          This method is called by the PluginManager (enforced by I_Plugin).
 void releaseSession(java.lang.String sessionId, java.lang.String qos_literal)
          Releases a reserved I_Session.
 I_Session reserveSession(java.lang.String sessionId)
          The session handling.
 void shutdown()
          Cleans up the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

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

glob

private Global glob

log

private static java.util.logging.Logger log

TYPE

private static final java.lang.String TYPE
See Also:
Constant Field Values

VERSION

private static final java.lang.String VERSION
See Also:
Constant Field Values

sessions

private java.util.Hashtable sessions

packFrame

private boolean packFrame

frame

private PluginGUI frame
Constructor Detail

Manager

public Manager()
Method Detail

init

public void init(Global glob,
                 PluginInfo pluginInfo)
This method is called by the PluginManager (enforced by I_Plugin).

Specified by:
init in interface I_Plugin
See Also:
I_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)

getType

public java.lang.String getType()
Specified by:
getType in interface I_Manager
Specified by:
getType in interface I_Plugin

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface I_Manager
Specified by:
getVersion in interface I_Plugin

getGlobal

public final Global getGlobal()

reserveSession

public I_Session reserveSession(java.lang.String sessionId)
Description copied from interface: I_Manager
The session handling. org.xmlBlaster.authentication.Authenticate.connect(...) and login(...) calls this method to get a new I_Session and bind it to the session.

Specified by:
reserveSession in interface I_Manager

releaseSession

public void releaseSession(java.lang.String sessionId,
                           java.lang.String qos_literal)
Description copied from interface: I_Manager
Releases a reserved I_Session.

Specified by:
releaseSession in interface I_Manager

changeSecretSessionId

void changeSecretSessionId(java.lang.String oldSessionId,
                           java.lang.String newSessionId)
                     throws XmlBlasterException
Throws:
XmlBlasterException

getSessionById

public I_Session getSessionById(java.lang.String id)
Get the I_Session which corresponds to the given sessionId

Specified by:
getSessionById in interface I_Manager
Parameters:
String - The sessionId
Returns:
I_Session

getSubject

Subject getSubject(java.lang.String name)
             throws XmlBlasterException
Throws:
XmlBlasterException

getGUI

PluginGUI getGUI()

shutdown

public void shutdown()
              throws XmlBlasterException
Description copied from interface: I_Plugin
Cleans up the resource.

Specified by:
shutdown in interface I_Plugin
Throws:
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.


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.