com.neeve.link
Class LnkRequest.Result

java.lang.Object
  extended by com.neeve.link.LnkRequest.Result
Enclosing class:
LnkRequest

public final class LnkRequest.Result
extends Object

Contains the result for the request.

This class contains the result for a sent request. The result consist of the status of the request-reply exchange as well as the responses that were received for the request. There can be more than one reply per request. The reply count is set upon receipt of the first reply.

Threading:
A result object is not safe for concurrent access by multiple threads. Since sender threads are accessing the result object while the container request object is active, the user must not access the result object while it's request object is active.

Method Summary
 com.neeve.util.UtlList getReplies()
          Get the set of received replies.
 int getReplyCount()
          Get the reply count.
 ELnkOpFailedException getStatus()
          Get the request's completion status.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStatus

public final ELnkOpFailedException getStatus()
Get the request's completion status.

Returns:
Returns a non-null value in case the request-reply operation encountered an error. Returns null otherwise.

This method returns the completion status of a request-reply operation. The user should note that the value returned from here only makes sense for a completed request operation i.e. one whose request object's state is LnkRequest.State.COMPLETE


getReplyCount

public final int getReplyCount()
Get the reply count.

Returns:
This method returns the total number of reply packets that comprise the reply for a request. This field is set upon receipt of the first reply. A value of -1 is returned in case the first reply was not received. Note that this return value may be different than the number of packets in the reply list. The number of packets in the reply list is the number of replies that were actually received while this method returns the total number of replies that, once received, would deem the request-reply exchange complete.

getReplies

public final com.neeve.util.UtlList getReplies()
Get the set of received replies.

This method will return the set of replies received for the request corresponding to this result object. A non-empty set of replies does not indicate a successful completion of the request. The user should invoke getStatus() to check if the request completed successfully or not since it is possible for a partial set of replies to be received and then a failure encountered.



Copyright © 2015 Neeve Research, LLC. All Rights Reserved.