public class MonitorServer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.HashMap<java.lang.String,java.lang.Integer> |
failCount
Number of times a message is not processed.
|
protected MessageMediator |
mediator
Parent message mediator
|
protected MessageQueue |
messageQueue
The queue of messages to process
|
protected PasswordHandler |
passwordHandler
To retrieve some passwords for service types
|
protected java.util.ArrayList<java.lang.String> |
servicesInvoked
List of services currently invoked through a message
|
| Constructor and Description |
|---|
MonitorServer(PasswordHandler thePasswordHandler,
MessageMediator theMediator)
Create a new instance of MonitorServer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelMessage(java.lang.String ticket)
Remove the message with the specified ticket number from the queue.
|
boolean |
hasMessages()
Return true if there are messages waiting to be processed.
|
boolean |
messageToBus(MessageInfo ro)
Add the message to the message bus, with the following rules:
|
void |
processNextMessage()
Process the queue of messages and return the next one determined by resource allocation.
|
protected final MessageQueue messageQueue
protected java.util.ArrayList<java.lang.String> servicesInvoked
protected PasswordHandler passwordHandler
protected MessageMediator mediator
protected java.util.HashMap<java.lang.String,java.lang.Integer> failCount
public MonitorServer(PasswordHandler thePasswordHandler, MessageMediator theMediator)
thePasswordHandler - the server password handler.theMediator - the parent message mediator.public boolean hasMessages()
> 0.public boolean messageToBus(MessageInfo ro)
ro - message with full ServerHandler handler details in a BusEntity.public void processNextMessage()
throws java.lang.Exception
java.lang.Exception - any error.public void cancelMessage(java.lang.String ticket)
ticket - unique ticket number, equivalent to the communication ID.