Class DefaultRemoteDrain

  • All Implemented Interfaces:
    RemoteDrain, java.rmi.Remote

    public class DefaultRemoteDrain
    extends java.lang.Object
    implements RemoteDrain
    Default implementation of the RemoteDrain. This spring bean registers itself to the RMI Registry to accept all incoming 'drain requests'. It then adapts and delegates the callback to the underlying ProcessContextRegistry and the ProcessContext associated with the given pid.
    • Constructor Detail

      • DefaultRemoteDrain

        public DefaultRemoteDrain()
    • Method Detail

      • drain

        public void drain​(int pid,
                          DrainType type,
                          java.lang.String message)
                   throws java.rmi.RemoteException
        Adapts and delegates the given message to a registered ProcessContext identified by the given pid.

        Callback method to handle a line of std err/out output of an process.

        Specified by:
        drain in interface RemoteDrain
        Parameters:
        pid - the unique id of a process.
        type - the type of output we are talking about.
        message - the actual payload: one line of output.
        Throws:
        java.rmi.RemoteException - on any technical communication error.
        See Also:
        RemoteDrain.drain(int, DrainType, String)
      • init

        public void init()
        Registers this service to the wired rmi Registry.
      • destroy

        public void destroy()
        Unregisters this service from the rmi registry.
      • setRmiRegistryService

        public void setRmiRegistryService​(RMIRegistryService rmiRegistryService)
      • setProcessContextRegistry

        public void setProcessContextRegistry​(ProcessContextRegistry processContextRegistry)