Package org.ldaptive.async
Class FutureResponse<T>
- java.lang.Object
-
- org.ldaptive.Response<T>
-
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description private Future<Response<T>>
future
Future that will contain the response.-
Fields inherited from class org.ldaptive.Response
ENCODE_CNTRL_CHARS, encodeCntrlChars
-
-
Constructor Summary
Constructors Constructor Description FutureResponse(Future<Response<T>> f)
Creates a new future ldap response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
InvokesFuture.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
-
-
-
-
Method Detail
-
getResponse
protected Response<T> getResponse()
InvokesFuture.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()
Description copied from class:Response
Returns the result of the ldap operation.
-
getResultCode
public ResultCode getResultCode()
Description copied from class:Response
Returns the result code of the ldap operation.- Overrides:
getResultCode
in classResponse<T>
- Returns:
- operation result code
-
getMessage
public String getMessage()
Description copied from class:Response
Returns any error or diagnostic message produced by the ldap operation.- Overrides:
getMessage
in classResponse<T>
- Returns:
- message
-
getMatchedDn
public String getMatchedDn()
Description copied from class:Response
Returns the matched DN produced by the ldap operation.- Overrides:
getMatchedDn
in classResponse<T>
- Returns:
- matched DN
-
getControls
public ResponseControl[] getControls()
Description copied from interface:Message
Returns the controls for this message.- Specified by:
getControls
in interfaceMessage<T>
- Overrides:
getControls
in classResponse<T>
- Returns:
- controls
-
getReferralURLs
public String[] getReferralURLs()
Description copied from class:Response
Returns the referral URLs produced by the ldap operation.- Overrides:
getReferralURLs
in classResponse<T>
- Returns:
- referral urls
-
getMessageId
public int getMessageId()
Description copied from interface:ResponseMessage
Returns the message ID for this response message.- Specified by:
getMessageId
in interfaceResponseMessage
- Overrides:
getMessageId
in classResponse<T>
- Returns:
- message id
-
-