public class Echo
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
Echo.Invoker
Helper class to delegate execution of the
transactEcho
method. |
| Modifier and Type | Field and Description |
|---|---|
private static CentralLogger |
LOG
Logger (safe as a JVM-wide value rather than as context-local).
|
private static boolean |
tracing
Tracing flag (enabled at logging level
FINEST). |
| Constructor and Description |
|---|
Echo() |
| Modifier and Type | Method and Description |
|---|---|
static long |
ping(java.io.Serializable payload)
Test a do-nothing round trip to the other side of this session and
back with the given data as a payload.
|
static long |
ping(java.io.Serializable payload,
int timeout)
Test a do-nothing round trip to the other side of this session and
back with the given data as a payload.
|
private static final CentralLogger LOG
private static final boolean tracing
FINEST).public static long ping(java.io.Serializable payload)
FINEST level, then details of the payload and the
elapsed time will be logged.
The protocol's built-in support for ECHO and
ECHO_REPLY messages is used to implement this feature.
No special server registration is needed on the other side as long
as there is a valid session open.
payload - The data to send (and which will be sent back unchanged).
It may be null (which represents an empty
payload).public static long ping(java.io.Serializable payload,
int timeout)
FINEST level, then details of the payload and the
elapsed time will be logged.
The protocol's built-in support for ECHO and
ECHO_REPLY messages is used to implement this feature.
No special server registration is needed on the other side as long
as there is a valid session open.
payload - The data to send (and which will be sent back unchanged).
It may be null (which represents an empty
payload).timeout - Maximum number of milliseconds to wait for a response. Use
0 for an indefinite wait.