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 additionalCommandsName, int port)Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidend()Signals to the remote object that the client is done with it (i.e.CmsShellCommandResultexecuteCommand(java.lang.String cmd, java.util.List<java.lang.String> params)Executes a shell command .java.lang.StringgetPrompt()Returns the initial prompt to use.static voidunregisterAll()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 additionalCommandsName, int port) throws CmsException, java.rmi.RemoteException
Creates a new instance.- Parameters:
additionalCommandsName- a class name for an additional shell commands class (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_CmsRemoteShellSignals to the remote object that the client is done with it (i.e. it can be disposed).- Specified by:
endin 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_CmsRemoteShellExecutes a shell command .- Specified by:
executeCommandin 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_CmsRemoteShellReturns the initial prompt to use.- Specified by:
getPromptin interfaceI_CmsRemoteShell- Returns:
- the prompt
- See Also:
I_CmsRemoteShell.getPrompt()
-
-