|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.grinder.console.communication.ConsoleCommunicationImplementation
public final class ConsoleCommunicationImplementation
Handles communication for the console.
| Constructor Summary | |
|---|---|
ConsoleCommunicationImplementation(Resources resources,
ConsoleProperties properties,
ErrorHandler errorHandler,
TimeAuthority timeAuthority)
Constructor that uses a default idlePollDelay. |
|
ConsoleCommunicationImplementation(Resources resources,
ConsoleProperties properties,
ErrorHandler errorHandler,
TimeAuthority timeAuthority,
long idlePollDelay,
long inactiveClientTimeOut)
Constructor. |
|
| Method Summary | |
|---|---|
MessageDispatchRegistry |
getMessageDispatchRegistry()
Returns the message dispatch registry which callers can use to register new message handlers. |
int |
getNumberOfConnections()
The number of connections that have been accepted and are still active. |
boolean |
processOneMessage()
Wait to receive a message, then process it. |
void |
sendToAddressedAgents(Address address,
Message message)
Send the given message to the given agent processes (which may pass it on to its workers). |
void |
sendToAgents(Message message)
Send the given message to the agent processes (which may pass it on to their workers). |
void |
shutdown()
Shut down communication. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConsoleCommunicationImplementation(Resources resources,
ConsoleProperties properties,
ErrorHandler errorHandler,
TimeAuthority timeAuthority)
throws DisplayMessageConsoleException
resources - Resources.properties - Console properties.errorHandler - Error handler.timeAuthority - Knows the time
DisplayMessageConsoleException - If properties are invalid.
public ConsoleCommunicationImplementation(Resources resources,
ConsoleProperties properties,
ErrorHandler errorHandler,
TimeAuthority timeAuthority,
long idlePollDelay,
long inactiveClientTimeOut)
throws DisplayMessageConsoleException
resources - Resources.properties - Console properties.errorHandler - Error handler.timeAuthority - Knows the timeidlePollDelay - Time in milliseconds that our ServerReceiver threads should sleep
for if there's no incoming messages.inactiveClientTimeOut - How long before we consider a client connection that presents no
data to be inactive.
DisplayMessageConsoleException - If properties are invalid.| Method Detail |
|---|
public MessageDispatchRegistry getMessageDispatchRegistry()
getMessageDispatchRegistry in interface ConsoleCommunication@PreDestroy public void shutdown()
shutdown in interface ConsoleCommunicationpublic boolean processOneMessage()
processOneMessage in interface ConsoleCommunicationtrue if we processed a message successfully;
false if we've been shut down.shutdown()public int getNumberOfConnections()
public void sendToAgents(Message message)
Any errors that occur will be handled with the error handler.
sendToAgents in interface ConsoleCommunicationmessage - The message to send.
public void sendToAddressedAgents(Address address,
Message message)
Any errors that occur will be handled with the error handler.
sendToAddressedAgents in interface ConsoleCommunicationaddress - The address to which the message should be sent.message - The message to send.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||