org.ldaptive.async
Class FutureResponse<T>

java.lang.Object
  extended by org.ldaptive.Response<T>
      extended by org.ldaptive.async.FutureResponse<T>
Type Parameters:
T - type of ldap result contained in this response
All Implemented Interfaces:
Message<ResponseControl>, ResponseMessage

public class FutureResponse<T>
extends Response<T>

Response that blocks on each property until it is available.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.Response
ENCODE_CNTRL_CHARS, encodeCntrlChars
 
Constructor Summary
FutureResponse(Future<Response<T>> f)
          Creates a new future ldap response.
 
Method Summary
 ResponseControl[] getControls()
          Returns the controls for this message.
 String getMatchedDn()
          Returns the matched DN produced by the ldap operation.
 String getMessage()
          Returns any error or diagnostic message produced by the ldap operation.
 int getMessageId()
          Returns the message ID for this response message.
 String[] getReferralURLs()
          Returns the referral URLs produced by the ldap operation.
protected  Response<T> getResponse()
          Invokes Future.get(), waiting until the response is returned.
 T getResult()
          Returns the result of the ldap operation.
 ResultCode getResultCode()
          Returns the result code of the ldap operation.
 String toString()
          
 
Methods inherited from class org.ldaptive.Response
getControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FutureResponse

public FutureResponse(Future<Response<T>> f)
Creates a new future ldap response.

Parameters:
f - future response
Method Detail

getResponse

protected Response<T> getResponse()
Invokes Future.get(), waiting until the response is returned.

Returns:
response from the future
Throws:
IllegalStateException - if the future is interrupted or throws an execution exception

getResult

public T getResult()
Returns the result of the ldap operation.

Overrides:
getResult in class Response<T>
Returns:
operation result

getResultCode

public ResultCode getResultCode()
Returns the result code of the ldap operation.

Overrides:
getResultCode in class Response<T>
Returns:
operation result code

getMessage

public String getMessage()
Returns any error or diagnostic message produced by the ldap operation.

Overrides:
getMessage in class Response<T>
Returns:
message

getMatchedDn

public String getMatchedDn()
Returns the matched DN produced by the ldap operation.

Overrides:
getMatchedDn in class Response<T>
Returns:
matched DN

getControls

public ResponseControl[] getControls()
Returns the controls for this message.

Specified by:
getControls in interface Message<ResponseControl>
Overrides:
getControls in class Response<T>
Returns:
controls

getReferralURLs

public String[] getReferralURLs()
Returns the referral URLs produced by the ldap operation.

Overrides:
getReferralURLs in class Response<T>
Returns:
referral urls

getMessageId

public int getMessageId()
Returns the message ID for this response message.

Specified by:
getMessageId in interface ResponseMessage
Overrides:
getMessageId in class Response<T>
Returns:
message id

toString

public String toString()

Overrides:
toString in class Response<T>


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.