Package org.openas2.cmd
Class MultiCommand
- java.lang.Object
-
- org.openas2.BaseComponent
-
- org.openas2.cmd.BaseCommand
-
- org.openas2.cmd.MultiCommand
-
public class MultiCommand extends BaseCommand
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Command>
cmds
-
Fields inherited from class org.openas2.cmd.BaseCommand
PARAM_DESCRIPTION, PARAM_NAME, PARAM_USAGE
-
-
Constructor Summary
Constructors Constructor Description MultiCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandResult
execute(java.lang.Object[] params)
CommandResult
execute(java.lang.String name, java.lang.Object[] params)
Command
getCommand(java.lang.String name)
java.util.List<Command>
getCommands()
java.lang.String
getDefaultDescription()
java.lang.String
getDefaultName()
java.lang.String
getDefaultUsage()
java.lang.String
getDescription(java.lang.String name)
java.lang.String
getUsage(java.lang.String name)
void
init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters)
Component lifecycle hook.boolean
supports(java.lang.String name)
-
Methods inherited from class org.openas2.cmd.BaseCommand
getDescription, getName, getUsage, setDescription, setName, setUsage
-
Methods inherited from class org.openas2.BaseComponent
destroy, getParameter, getParameter, getParameterInt, getParameters, getSession, setParameter, setParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openas2.cmd.Command
getSession
-
Methods inherited from interface org.openas2.Component
destroy, getParameters
-
-
-
-
Field Detail
-
cmds
private java.util.List<Command> cmds
-
-
Method Detail
-
init
public void init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters) throws OpenAS2Exception
Description copied from interface:Component
Component lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.- Specified by:
init
in interfaceComponent
- Overrides:
init
in classBaseCommand
- Parameters:
session
- the component uses this object to access other componentsparameters
- configuration values for the component- Throws:
OpenAS2Exception
- If an error occurs while initializing the component- See Also:
Session
-
getCommand
public Command getCommand(java.lang.String name)
-
getCommands
public java.util.List<Command> getCommands()
-
getDescription
public java.lang.String getDescription(java.lang.String name)
-
getUsage
public java.lang.String getUsage(java.lang.String name)
-
execute
public CommandResult execute(java.lang.Object[] params)
- Specified by:
execute
in interfaceCommand
- Specified by:
execute
in classBaseCommand
-
execute
public CommandResult execute(java.lang.String name, java.lang.Object[] params) throws OpenAS2Exception
- Throws:
OpenAS2Exception
-
supports
public boolean supports(java.lang.String name)
-
getDefaultName
public java.lang.String getDefaultName()
- Specified by:
getDefaultName
in classBaseCommand
-
getDefaultDescription
public java.lang.String getDefaultDescription()
- Specified by:
getDefaultDescription
in classBaseCommand
-
getDefaultUsage
public java.lang.String getDefaultUsage()
- Specified by:
getDefaultUsage
in classBaseCommand
-
-