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:
Serializable
,Remote
,I_CmsRemoteShell
RMI object which wraps a CmsShell and can be used for shell command execution.
- See Also:
-
Field Summary
Fields inherited from class java.rmi.server.RemoteObject
ref
-
Constructor Summary
ConstructorDescriptionCmsRemoteShell
(String additionalCommandsNames, int port) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
end()
Signals to the remote object that the client is done with it (i.e.executeCommand
(String cmd, List<String> params) Executes a shell command .Returns the initial prompt to use.static void
Removes and unexports all instances.Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
Constructor Details
-
CmsRemoteShell
public CmsRemoteShell(String additionalCommandsNames, int port) throws CmsException, 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 wrongRemoteException
- if RMI stuff goes wrong
-
-
Method Details
-
unregisterAll
Removes and unexports all instances. -
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:
-
executeCommand
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:
-
getPrompt
Description copied from interface:I_CmsRemoteShell
Returns the initial prompt to use.- Specified by:
getPrompt
in interfaceI_CmsRemoteShell
- Returns:
- the prompt
- See Also:
-