public abstract class MaestroWorkerManager extends AbstractMaestroPeer<MaestroEvent> implements MaestroEventListener
clientName
Constructor and Description |
---|
MaestroWorkerManager(String maestroURL,
String role,
String host,
MaestroDataServer dataServer)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
connect() |
protected MaestroReceiverClient |
getClient() |
protected WorkerOptions |
getWorkerOptions() |
void |
handle(AbnormalDisconnect note) |
void |
handle(DrainCompleteNotification note) |
void |
handle(FlushRequest note) |
void |
handle(GetRequest note) |
void |
handle(Halt note) |
abstract void |
handle(LogRequest note) |
protected void |
handle(LogRequest note,
File logDir)
Handle a log request note
|
void |
handle(PingRequest note) |
void |
handle(SetRequest note) |
void |
handle(StatsRequest note) |
void |
handle(TestFailedNotification note) |
void |
handle(TestSuccessfulNotification note) |
boolean |
isRunning() |
protected void |
noteArrived(MaestroEvent note)
The entry point for handling Maestro messages
|
connectComplete, connectionLost, deliveryComplete, disconnect, getClientName, getId, isConnected, messageArrived, reconnect, setClientName, subscribe, subscribe
public MaestroWorkerManager(String maestroURL, String role, String host, MaestroDataServer dataServer)
maestroURL
- Maestro broker URLrole
- Worker rolehost
- hostnamedataServer
- the data server instanceprotected WorkerOptions getWorkerOptions()
protected MaestroReceiverClient getClient()
public void connect() throws MaestroConnectionException
connect
in class AbstractMaestroPeer<MaestroEvent>
MaestroConnectionException
public boolean isRunning()
isRunning
in class AbstractMaestroPeer<MaestroEvent>
protected final void noteArrived(MaestroEvent note) throws MaestroConnectionException
AbstractMaestroPeer
noteArrived
in class AbstractMaestroPeer<MaestroEvent>
note
- the note that arrivedMaestroConnectionException
- for Maestro related errorspublic void handle(StatsRequest note)
handle
in interface MaestroEventListener
public void handle(FlushRequest note)
handle
in interface MaestroEventListener
public void handle(Halt note)
handle
in interface MaestroEventListener
public void handle(SetRequest note)
handle
in interface MaestroEventListener
public void handle(TestFailedNotification note)
handle
in interface MaestroEventListener
public void handle(TestSuccessfulNotification note)
handle
in interface MaestroEventListener
public void handle(AbnormalDisconnect note)
handle
in interface MaestroEventListener
public void handle(PingRequest note) throws MaestroConnectionException, MalformedNoteException
handle
in interface MaestroEventListener
MaestroConnectionException
MalformedNoteException
public void handle(GetRequest note)
handle
in interface MaestroEventListener
public void handle(DrainCompleteNotification note)
handle
in interface MaestroEventListener
protected void handle(LogRequest note, File logDir)
note
- the note to handlelogDir
- the log directorypublic abstract void handle(LogRequest note)
handle
in interface MaestroEventListener
This documentation was released into the public domain.