Modifier and Type | Field and Description |
---|---|
private long |
elapsed
Elapsed time in milliseconds.
|
private Session |
session
Represents our network session.
|
private int |
timeout
Timeout in milliseconds.
|
Constructor and Description |
---|
Invoker(Session session,
int timeout)
Construct an instance that can make an invocation of an echo
transaction using the given queue.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
describe()
Return a text description of the method being invoked.
|
long |
getElapsed()
Returns the number of milliseconds of elapsed time during ping
invocation.
|
java.lang.Object |
invoke(java.lang.Object[] args)
Execute or "run" the object's functionality.
|
private Session session
private int timeout
private long elapsed
public Invoker(Session session, int timeout)
session
- The connection to test.timeout
- The maximum number of milliseconds to wait for a reply.public java.lang.String describe()
public long getElapsed()
public java.lang.Object invoke(java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface Invocable
args
- The method arguments or null
for no arguments.null
if
there is no return value. Note that this design does not
allow the caller to determine the difference between a
void
return and a return of a genuine
null
.java.lang.Throwable
- If the called method generates any exception or error.