xmlBlaster 2.1.0 API

org.xmlBlaster.authentication.plugins
Class PluginManager

java.lang.Object
  extended by org.xmlBlaster.util.plugin.PluginManagerBase
      extended by org.xmlBlaster.authentication.plugins.PluginManager
All Implemented Interfaces:
I_PluginManager

public class PluginManager
extends PluginManagerBase

Title: PluginManager Description: Loads security plugin

Version:
1.0
Author:
W. Kleinertz (wkl)

Field Summary
private  Authenticate auth
           
private static java.lang.String defaultPluginName
           
private  java.lang.String defaultPluginType
           
private  java.lang.String defaultPluginVersion
           
private  ServerScope glob
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
 
Fields inherited from class org.xmlBlaster.util.plugin.PluginManagerBase
NO_PLUGIN_TYPE
 
Constructor Summary
PluginManager(ServerScope glob)
           
 
Method Summary
 java.lang.String getDefaultPluginName(java.lang.String type, java.lang.String version)
           
 I_Manager getDummyManager()
          Tries to return an instance of the default security manager, which simulates the old xmlBlaster behavior.
 I_Manager getManager(SessionInfo sessionInfo)
          Returns the security manager, responsible for given session.
 I_Manager getManager(java.lang.String sessionId)
          Returns the security manager, responsible for given session.
 I_Manager getManager(java.lang.String type, java.lang.String version)
          Return a specific SecurityManager, suitable to handle the requested security mechanisms.
protected  java.lang.String getPluginPropertyName()
           
 void init(Authenticate auth)
          Initialize the PluginManager

 void postInstantiate(I_Plugin plugin, PluginInfo pluginInfo)
          Is called after a plugin in instantiated, allows the base class to do specific actions.
 
Methods inherited from class org.xmlBlaster.util.plugin.PluginManagerBase
createPluginPropertyKey, getDummyPlugin, getFromPluginCache, getGlobal, getName, getPluginObject, getPluginObject, getPluginObject, ignorePlugin, instantiatePlugin, instantiatePlugin, removeFromPluginCache, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private final java.lang.String ME

defaultPluginName

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

defaultPluginType

private java.lang.String defaultPluginType

defaultPluginVersion

private java.lang.String defaultPluginVersion

auth

private Authenticate auth

glob

private final ServerScope glob

log

private static java.util.logging.Logger log
Constructor Detail

PluginManager

public PluginManager(ServerScope glob)
Method Detail

init

public void init(Authenticate auth)
Initialize the PluginManager


getManager

public I_Manager getManager(java.lang.String type,
                            java.lang.String version)
                     throws XmlBlasterException
Return a specific SecurityManager, suitable to handle the requested security mechanisms.

Only one instance is created, further requests return the cached instance

Parameters:
String - The type of the requested plugin.
String - The version of the requested plugin.
Returns:
I_Manager The security manager which is suitable to handle the request.
Throws:
XmlBlasterException - Thrown if to suitable security manager has been found.

getManager

public I_Manager getManager(java.lang.String sessionId)
                     throws XmlBlasterException
Returns the security manager, responsible for given session.

NOTE: This method authenticates when getting the SessionInfo object with the sessionId

Parameters:
String - sessionId
I_Manager -
Throws:
Thrown, - if the session is unknown.
XmlBlasterException

postInstantiate

public void postInstantiate(I_Plugin plugin,
                            PluginInfo pluginInfo)
Description copied from class: PluginManagerBase
Is called after a plugin in instantiated, allows the base class to do specific actions. Is NOT called when plugin got from cache.

Overrides:
postInstantiate in class PluginManagerBase

getPluginPropertyName

protected java.lang.String getPluginPropertyName()
Overrides:
getPluginPropertyName in class PluginManagerBase
Returns:
The name of the property in xmlBlaster.property, e.g. "Security.Server.Plugin" for "Security.Server.Plugin[simple][1.0]"

getDefaultPluginName

public java.lang.String getDefaultPluginName(java.lang.String type,
                                             java.lang.String version)
Specified by:
getDefaultPluginName in interface I_PluginManager
Overrides:
getDefaultPluginName in class PluginManagerBase
Parameters:
type - can be null
version - can be null
Returns:
please return your default plugin classname or null if not specified

getManager

public I_Manager getManager(SessionInfo sessionInfo)
                     throws XmlBlasterException
Returns the security manager, responsible for given session.

Parameters:
String - sessionId
I_Manager -
Throws:
Thrown, - if the session is unknown.
XmlBlasterException

getDummyManager

public I_Manager getDummyManager()
                          throws XmlBlasterException
Tries to return an instance of the default security manager, which simulates the old xmlBlaster behavior.

Throws:
XmlBlasterException

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.