org.crsh.shell.impl.command
Class CRaSH

java.lang.Object
  extended by org.crsh.shell.impl.command.CRaSH

public class CRaSH
extends Object


Field Summary
(package private)  AbstractClassManager<? extends ShellCommand> commandManager
          .
(package private)  PluginContext context
          .
(package private)  AbstractClassManager<? extends GroovyScript> scriptManager
          .
 
Constructor Summary
CRaSH(PluginContext context)
          Create a new CRaSH.
CRaSH(PluginContext context, AbstractClassManager<ShellCommand> commandManager, AbstractClassManager<? extends GroovyScript> scriptManager)
           
 
Method Summary
 CRaSHSession createSession(Principal user)
           
 ShellCommand getCommand(String name)
          Attempt to obtain a command instance.
 PluginContext getContext()
          Returns the plugin context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandManager

final AbstractClassManager<? extends ShellCommand> commandManager
.


scriptManager

final AbstractClassManager<? extends GroovyScript> scriptManager
.


context

final PluginContext context
.

Constructor Detail

CRaSH

public CRaSH(PluginContext context)
      throws NullPointerException
Create a new CRaSH.

Parameters:
context - the plugin context
Throws:
NullPointerException - if the context argument is null

CRaSH

public CRaSH(PluginContext context,
             AbstractClassManager<ShellCommand> commandManager,
             AbstractClassManager<? extends GroovyScript> scriptManager)
Method Detail

createSession

public CRaSHSession createSession(Principal user)

getContext

public PluginContext getContext()
Returns the plugin context.

Returns:
the plugin context

getCommand

public ShellCommand getCommand(String name)
                        throws NoSuchCommandException,
                               NullPointerException
Attempt to obtain a command instance. Null is returned when such command does not exist.

Parameters:
name - the command name
Returns:
a command instance
Throws:
NoSuchCommandException - if an error occured preventing the command creation
NullPointerException - if the name argument is null


Copyright © 2014 eXo Platform SAS. All Rights Reserved.