Package org.openas2.cmd
Class BaseCommand
- java.lang.Object
-
- org.openas2.BaseComponent
-
- org.openas2.cmd.BaseCommand
-
- Direct Known Subclasses:
AliasedCertCommand,AliasedLoggingCommand,AliasedPartnershipsCommand,MultiCommand,RefreshPartnershipsCommand,StorePartnershipsCommand
public abstract class BaseCommand extends BaseComponent implements Command
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPARAM_DESCRIPTIONstatic java.lang.StringPARAM_NAMEstatic java.lang.StringPARAM_USAGE
-
Constructor Summary
Constructors Constructor Description BaseCommand()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CommandResultexecute(java.lang.Object[] params)abstract java.lang.StringgetDefaultDescription()abstract java.lang.StringgetDefaultName()abstract java.lang.StringgetDefaultUsage()java.lang.StringgetDescription()java.lang.StringgetName()Returns a name for the component.java.lang.StringgetUsage()voidinit(Session session, java.util.Map<java.lang.String,java.lang.String> parameters)Component lifecycle hook.voidsetDescription(java.lang.String desc)voidsetName(java.lang.String name)voidsetUsage(java.lang.String usage)-
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
-
PARAM_NAME
public static final java.lang.String PARAM_NAME
- See Also:
- Constant Field Values
-
PARAM_DESCRIPTION
public static final java.lang.String PARAM_DESCRIPTION
- See Also:
- Constant Field Values
-
PARAM_USAGE
public static final java.lang.String PARAM_USAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters) throws OpenAS2Exception
Description copied from interface:ComponentComponent 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:
initin interfaceComponent- Overrides:
initin classBaseComponent- 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
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceCommand
-
setDescription
public void setDescription(java.lang.String desc)
- Specified by:
setDescriptionin interfaceCommand
-
getName
public java.lang.String getName()
Description copied from interface:ComponentReturns a name for the component. These names are not guaranteed to be unique, and are intended for display and logging. Generally this is the class name of the Component object, without package information.
-
getDefaultName
public abstract java.lang.String getDefaultName()
-
getDefaultDescription
public abstract java.lang.String getDefaultDescription()
-
getDefaultUsage
public abstract java.lang.String getDefaultUsage()
-
execute
public abstract CommandResult execute(java.lang.Object[] params)
-
-