Package net.sf.basedb.clients.jobagent
Class AgentSignalReceiver
java.lang.Object
net.sf.basedb.core.signal.AbstractSignalReceiver
net.sf.basedb.core.signal.SocketSignalReceiver
net.sf.basedb.clients.jobagent.AgentSignalReceiver
- All Implemented Interfaces:
SignalReceiver
Signal receiver implementation for job agents that is compatible with
the
SocketSignalReceiver
. This implementation will however not
open a port of it's own, but uses the regular job agent control port.
Incoming signals will first be handled by a SignalRequestHandler
which forwards signals to this class by calling processSignalMessage(String)
.- Version:
- 2.6
- Author:
- nicklas
- Last modified
- $Date: 2008-09-11 22:05:50 +0200 (to, 11 sep 2008) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Initialise the receiver.protected void
Do not open any socket.void
processSignalMessage
(String message) Make this method public soSignalRequestHandler
can call it.Methods inherited from class net.sf.basedb.core.signal.SocketSignalReceiver
close, forwardSignalMessageIfNeeded, getGlobalSignalId, getSignalTransporterClass, isAllowedHost, parseInitParameters
Methods inherited from class net.sf.basedb.core.signal.AbstractSignalReceiver
getLocalSignalHandlerId, getReceiverId, getSignalHandler, registerSignalHandler, sendToAll, unregisterSignalHandler
-
Field Details
-
agent
-
-
Constructor Details
-
AgentSignalReceiver
-
-
Method Details
-
init
Initialise the receiver. No parameters are needed. Port number will be taken from job agent configuration.- Specified by:
init
in interfaceSignalReceiver
- Overrides:
init
in classSocketSignalReceiver
- Parameters:
params
- The ID of the signal receiver, needed if the default ID generation should be used
-
listenOnSocket
protected void listenOnSocket()Do not open any socket. Signals will be sent to aJobAgentServerConnection
and routed to this class via aSignalRequestHandler
.- Overrides:
listenOnSocket
in classSocketSignalReceiver
-
processSignalMessage
Make this method public soSignalRequestHandler
can call it.- Overrides:
processSignalMessage
in classSocketSignalReceiver
- Parameters:
message
- The message to process, the format of the message must be compatible with the message thatAbstractSignalTransporter.generateSignalMessage(Signal)
generates
-