Class PendingReply

java.lang.Object
cl.netswitch.lib.server.PendingReply

public final class PendingReply extends Object
Pending reply that can be received and dispatched by any server channel.
  • Method Details

    • isStale

      public boolean isStale(long currentTimeMS, long maxTimeoutMS)
      Returns true 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

      public ServerChannel getServerChannel()
      Returns the server channel of this pending reply. It may return null 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

      public String getReplyKey()
      Returns the reply key of this pending reply.
      Returns:
      the reply key of this pending reply.
    • getReplyPath

      public String getReplyPath()
      Returns the reply path of this pending reply.
      Returns:
      the reply path of this pending reply.