Class ProcessExecutorServer

java.lang.Object
de.hybris.platform.mediaconversion.os.process.rmi.ProcessExecutorServer
All Implemented Interfaces:
RemoteProcessExecutor, Remote

public final class ProcessExecutorServer extends Object implements RemoteProcessExecutor
ProcessExecutor implementation to run in a separate JVM. The communication with this ProcessExecutor is encapsulated in various RMI calls.
  • Field Details

    • LOOPBACK_CONFIG_KEY

      public static final String LOOPBACK_CONFIG_KEY
      The Loopback address to connect to the localhost only.
      See Also:
    • START_CONFIRMATION

      public static final String START_CONFIRMATION
      Message printed to System.out to notify a successfull startup and registration of the RMI services.
      See Also:
    • DEFAULT_PORT

      public static final int DEFAULT_PORT
      The default port to use (if no other port was specified.
      See Also:
  • Method Details

    • execute

      public int execute(RemoteProcessContext context) throws IOException
      Description copied from interface: RemoteProcessExecutor
      Synchronously executes the process as specified in the passed context.
      Specified by:
      execute in interface RemoteProcessExecutor
      Parameters:
      context - the process description to execute.
      Returns:
      the exit code of the process
      Throws:
      IOException - on any error
    • quit

      public void quit() throws IOException
      Description copied from interface: RemoteProcessExecutor
      Shutdown the remote process executor.
      Specified by:
      quit in interface RemoteProcessExecutor
      Throws:
      IOException - on any error (e.g. communication failed).
    • main

      public static void main(String[] args)
      Main method starting a ProcessExecutorServer and 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.