org.crsh.plugin
Class CRaSHPlugin<P>

java.lang.Object
  extended by org.crsh.plugin.CRaSHPlugin<P>
Type Parameters:
P - the plugin type
Direct Known Subclasses:
CommandPlugin, JaasAuthenticationPlugin, JCRPlugin, ProcessorIOHandler, SimpleAuthenticationPlugin, SSHPlugin, TelnetPlugin

public abstract class CRaSHPlugin<P>
extends Object

Base class for a plugin, that consist of a subclass of this class and the implementation of the business interface of the plugin. The business interface of the plugin is simply represented by the P generic parameter and its associated class Class<P>>.

Version:
$Revision$
Author:
Julien Viet

Field Summary
private  List<PropertyDescriptor<?>> configurationCapabilities
          .
static int CONSTRUCTED
          .
(package private)  PluginContext context
          .
static int FAILED
          .
static int INITIALIZED
          .
static int INITIALIZING
          .
protected  org.slf4j.Logger log
          .
(package private)  int status
          .
private  Class<P> type
          .
 
Constructor Summary
protected CRaSHPlugin()
           
 
Method Summary
protected  Iterable<PropertyDescriptor<?>> createConfigurationCapabilities()
          Returns a list of PropertyDescriptor this plugin requires for its configuration.
 void destroy()
          Implement this method to know about destroy life cycle callback.
 Iterable<PropertyDescriptor<?>> getConfigurationCapabilities()
          Returns a list of PropertyDescriptor this plugin requires for its configuration.
protected  PluginContext getContext()
           
abstract  P getImplementation()
          Returns the implementation.
 int getStatus()
          Returns the current plugin status.
 Class<P> getType()
          Returns the plugin type.
 void init()
          Implement this method to know about init life cycle callback.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected final org.slf4j.Logger log
.


FAILED

public static final int FAILED
.

See Also:
Constant Field Values

CONSTRUCTED

public static final int CONSTRUCTED
.

See Also:
Constant Field Values

INITIALIZING

public static final int INITIALIZING
.

See Also:
Constant Field Values

INITIALIZED

public static final int INITIALIZED
.

See Also:
Constant Field Values

context

PluginContext context
.


status

int status
.


type

private final Class<P> type
.


configurationCapabilities

private List<PropertyDescriptor<?>> configurationCapabilities
.

Constructor Detail

CRaSHPlugin

protected CRaSHPlugin()
Method Detail

getContext

protected final PluginContext getContext()

getStatus

public int getStatus()
Returns the current plugin status.

Returns:
the plugin status

getType

public final Class<P> getType()
Returns the plugin type.

Returns:
the plugin type

createConfigurationCapabilities

protected Iterable<PropertyDescriptor<?>> createConfigurationCapabilities()
Returns a list of PropertyDescriptor this plugin requires for its configuration.

Returns:
the configuration capabilities

getConfigurationCapabilities

public final Iterable<PropertyDescriptor<?>> getConfigurationCapabilities()
Returns a list of PropertyDescriptor this plugin requires for its configuration.

Returns:
the configuration capabilities

getImplementation

public abstract P getImplementation()
Returns the implementation.

Returns:
the implementation

init

public void init()
Implement this method to know about init life cycle callback.


destroy

public void destroy()
Implement this method to know about destroy life cycle callback.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 eXo Platform SAS. All Rights Reserved.