ikrs.yuccasrv.commandline
Class YuccaCommandFactory

java.lang.Object
  extended by ikrs.util.AbstractCommandFactory<Command>
      extended by ikrs.util.DefaultCommandFactory
          extended by ikrs.yuccasrv.commandline.YuccaCommandFactory
All Implemented Interfaces:
CommandFactory<Command>

public class YuccaCommandFactory
extends DefaultCommandFactory
implements CommandFactory<Command>


Constructor Summary
YuccaCommandFactory(Yucca server)
          The constructor.
 
Method Summary
static java.lang.String[] getImplementedCommands()
          Deprecated.  
protected  Yucca getServer()
          Get the factories server instance.
 Command make(java.lang.String name, BasicType[] params)
          Make a new Command with the given name and params.
 
Methods inherited from class ikrs.util.DefaultCommandFactory
addSupportedCommand, getSupportedCommands
 
Methods inherited from class ikrs.util.AbstractCommandFactory
getParentFactory, make, make, parse, setParentFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ikrs.util.CommandFactory
getParentFactory, getSupportedCommands, make, parse, setParentFactory
 

Constructor Detail

YuccaCommandFactory

public YuccaCommandFactory(Yucca server)
The constructor. The server instanced will be delegated to all commands that are made with this factory.

Parameters:
server - If available pass the server instance; if not available, just pass null.
Method Detail

getServer

protected Yucca getServer()
Get the factories server instance. Warning: it is not guaranteed that the server is set; in this case the method returns null.

Returns:
The YuccaServer instance or null if not set.

make

public Command make(java.lang.String name,
                    BasicType[] params)
             throws UnknownCommandException,
                    CommandStringIncompleteException
Make a new Command with the given name and params.

Specified by:
make in interface CommandFactory<Command>
Overrides:
make in class DefaultCommandFactory
Parameters:
name - The command's name.
params - The command's params - in BasicType representation.
Returns:
The new command.
Throws:
UnknownCommandException
CommandStringIncompleteException

getImplementedCommands

public static java.lang.String[] getImplementedCommands()
Deprecated. 

This method should NOT be used any more. It was replaced by CommandFactory.getSupportedCommands().