Package org.opencms.rmi
Class CmsRemoteShellClient
- java.lang.Object
-
- org.opencms.rmi.CmsRemoteShellClient
-
public class CmsRemoteShellClient extends java.lang.Object
Client application used to connect locally to the CmsShell server.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPARAM_ADDITIONALCommand parameter for passing an additional shell commands class name.static java.lang.StringPARAM_REGISTRY_HOSTCommand parameter for controlling the host to use for the initial RMI lookup.static java.lang.StringPARAM_REGISTRY_PORTCommand parameter for controlling the port to use for the initial RMI lookup.static java.lang.StringPARAM_SCRIPTCommand parameter for passing a shell script file name.
-
Constructor Summary
Constructors Constructor Description CmsRemoteShellClient(java.lang.String[] args)Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)Main method, which starts the shell client.java.util.Map<java.lang.String,java.lang.String>parseArgs(java.lang.String[] args)Validates, parses and returns the command line arguments.voidrun()Main loop of the shell server client.
-
-
-
Field Detail
-
PARAM_ADDITIONAL
public static final java.lang.String PARAM_ADDITIONAL
Command parameter for passing an additional shell commands class name.- See Also:
- Constant Field Values
-
PARAM_REGISTRY_PORT
public static final java.lang.String PARAM_REGISTRY_PORT
Command parameter for controlling the port to use for the initial RMI lookup.- See Also:
- Constant Field Values
-
PARAM_REGISTRY_HOST
public static final java.lang.String PARAM_REGISTRY_HOST
Command parameter for controlling the host to use for the initial RMI lookup.- See Also:
- Constant Field Values
-
PARAM_SCRIPT
public static final java.lang.String PARAM_SCRIPT
Command parameter for passing a shell script file name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsRemoteShellClient
public CmsRemoteShellClient(java.lang.String[] args) throws java.io.IOException
Creates a new instance.- Parameters:
args- the parameters- Throws:
java.io.IOException- if something goes wrong
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
Main method, which starts the shell client.- Parameters:
args- the command line arguments- Throws:
java.lang.Exception- if something goes wrong
-
parseArgs
public java.util.Map<java.lang.String,java.lang.String> parseArgs(java.lang.String[] args)
Validates, parses and returns the command line arguments.- Parameters:
args- the command line arguments- Returns:
- the map of parsed arguments
-
run
public void run() throws java.lang.Exception
Main loop of the shell server client.Reads commands from either stdin or a file, executes them remotely and displays the results.
- Throws:
java.lang.Exception- if something goes wrong
-
-