Class DefaultRemoteDrain
- java.lang.Object
-
- de.hybris.platform.mediaconversion.os.process.impl.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 underlyingProcessContextRegistryand theProcessContextassociated with the givenpid.
-
-
Field Summary
-
Fields inherited from interface de.hybris.platform.mediaconversion.os.process.rmi.RemoteDrain
SERVICE_NAME
-
-
Constructor Summary
Constructors Constructor Description DefaultRemoteDrain()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Unregisters this service from the rmi registry.voiddrain(int pid, DrainType type, java.lang.String message)Adapts and delegates the given message to a registeredProcessContextidentified by the givenpid.ProcessContextRegistrygetProcessContextRegistry()RMIRegistryServicegetRmiRegistryService()voidinit()Registers this service to the wired rmiRegistry.voidsetProcessContextRegistry(ProcessContextRegistry processContextRegistry)voidsetRmiRegistryService(RMIRegistryService rmiRegistryService)
-
-
-
Method Detail
-
drain
public void drain(int pid, DrainType type, java.lang.String message) throws java.rmi.RemoteExceptionAdapts and delegates the given message to a registeredProcessContextidentified by the givenpid.Callback method to handle a line of std err/out output of an process.
- Specified by:
drainin interfaceRemoteDrain- 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 rmiRegistry.
-
destroy
public void destroy()
Unregisters this service from the rmi registry.
-
getRmiRegistryService
public RMIRegistryService getRmiRegistryService()
-
setRmiRegistryService
public void setRmiRegistryService(RMIRegistryService rmiRegistryService)
-
getProcessContextRegistry
public ProcessContextRegistry getProcessContextRegistry()
-
setProcessContextRegistry
public void setProcessContextRegistry(ProcessContextRegistry processContextRegistry)
-
-