Package org.opencms.rmi
Class CmsRemoteShell
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- org.opencms.rmi.CmsRemoteShell
-
- All Implemented Interfaces:
java.io.Serializable
,java.rmi.Remote
,I_CmsRemoteShell
public class CmsRemoteShell extends java.rmi.server.UnicastRemoteObject implements I_CmsRemoteShell
RMI object which wraps a CmsShell and can be used for shell command execution.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CmsRemoteShell(java.lang.String additionalCommandsNames, int port)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end()
Signals to the remote object that the client is done with it (i.e.CmsShellCommandResult
executeCommand(java.lang.String cmd, java.util.List<java.lang.String> params)
Executes a shell command .java.lang.String
getPrompt()
Returns the initial prompt to use.static void
unregisterAll()
Removes and unexports all instances.-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
-
-
-
Constructor Detail
-
CmsRemoteShell
public CmsRemoteShell(java.lang.String additionalCommandsNames, int port) throws CmsException, java.rmi.RemoteException
Creates a new instance.- Parameters:
additionalCommandsNames
- comma separated list of full qualified names of classes with additional shell commands (may be null)port
- the port to use- Throws:
CmsException
- if something goes wrongjava.rmi.RemoteException
- if RMI stuff goes wrong
-
-
Method Detail
-
unregisterAll
public static void unregisterAll()
Removes and unexports all instances.
-
end
public void end()
Description copied from interface:I_CmsRemoteShell
Signals to the remote object that the client is done with it (i.e. it can be disposed).- Specified by:
end
in interfaceI_CmsRemoteShell
- See Also:
I_CmsRemoteShell.end()
-
executeCommand
public CmsShellCommandResult executeCommand(java.lang.String cmd, java.util.List<java.lang.String> params)
Description copied from interface:I_CmsRemoteShell
Executes a shell command .- Specified by:
executeCommand
in interfaceI_CmsRemoteShell
- Parameters:
cmd
- the commandparams
- the parameters- Returns:
- the shell command result
- See Also:
I_CmsRemoteShell.executeCommand(java.lang.String, java.util.List)
-
getPrompt
public java.lang.String getPrompt()
Description copied from interface:I_CmsRemoteShell
Returns the initial prompt to use.- Specified by:
getPrompt
in interfaceI_CmsRemoteShell
- Returns:
- the prompt
- See Also:
I_CmsRemoteShell.getPrompt()
-
-