Class ProcessExecutorServer
java.lang.Object
de.hybris.platform.mediaconversion.os.process.rmi.ProcessExecutorServer
- All Implemented Interfaces:
RemoteProcessExecutor,Remote
ProcessExecutor implementation to run in a separate JVM. The communication with this ProcessExecutor is
encapsulated in various RMI calls.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default port to use (if no other port was specified.static final StringThe Loopback address to connect to the localhost only.static final StringMessage printed toSystem.outto notify a successfull startup and registration of the RMI services. -
Method Summary
Modifier and TypeMethodDescriptionintexecute(RemoteProcessContext context) Synchronously executes the process as specified in the passed context.static voidMain method starting aProcessExecutorServerand registering the RMI services.voidquit()Shutdown the remote process executor.
-
Field Details
-
LOOPBACK_CONFIG_KEY
The Loopback address to connect to the localhost only.- See Also:
-
START_CONFIRMATION
Message printed toSystem.outto notify a successfull startup and registration of the RMI services.- See Also:
-
DEFAULT_PORT
public static final int DEFAULT_PORTThe default port to use (if no other port was specified.- See Also:
-
-
Method Details
-
execute
Description copied from interface:RemoteProcessExecutorSynchronously executes the process as specified in the passed context.- Specified by:
executein interfaceRemoteProcessExecutor- Parameters:
context- the process description to execute.- Returns:
- the exit code of the process
- Throws:
IOException- on any error
-
quit
Description copied from interface:RemoteProcessExecutorShutdown the remote process executor.- Specified by:
quitin interfaceRemoteProcessExecutor- Throws:
IOException- on any error (e.g. communication failed).
-
main
Main method starting aProcessExecutorServerand registering the RMI services. There are two parameters passed:- a object code used to postfix the rmi service name to register. This is normally the tenant name to avoid clashes in multi-tenant systems.
- the port number of the RMI Registry service (on the localhost) to register the rmi service to.
- Parameters:
args- command line arguments as described above.
-