java.lang.Object
cl.netswitch.lib.server.PendingReply
Pending reply that can be received and dispatched by any server channel.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the reply key of this pending reply.Returns the reply path of this pending reply.Returns the server channel of this pending reply.boolean
isStale
(long currentTimeMS, long maxTimeoutMS) Returnstrue
if this pending reply is stale.
-
Method Details
-
isStale
public boolean isStale(long currentTimeMS, long maxTimeoutMS) Returnstrue
if this pending reply is stale. A pending reply is stale if it has has reached it's timeout or the given maximum timeout. It is also stale if it's reference to the server channel has been cleared.- Parameters:
currentTimeMS
- the current time (milliseconds).maxTimeoutMS
- the maximum timeout (milliseconds).- Returns:
true
if this pending reply is stale.
-
getServerChannel
Returns the server channel of this pending reply. It may returnnull
if the weak reference to the server channel has been cleared by the Garbage Collector (GC).- Returns:
- the server channel or
null
if it was GC.
-
getReplyKey
Returns the reply key of this pending reply.- Returns:
- the reply key of this pending reply.
-
getReplyPath
Returns the reply path of this pending reply.- Returns:
- the reply path of this pending reply.
-