org.ldaptive
Class Response<T>

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

public class Response<T>
extends Object
implements ResponseMessage

Wrapper class for all operation responses.

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

Constructor Summary
Response(T t, ResultCode rc)
          Creates a new ldap response.
Response(T t, ResultCode rc, String msg, String dn, ResponseControl[] c, String[] urls, int id)
          Creates a new ldap response.
 
Method Summary
 ResponseControl getControl(String oid)
          Returns the first response control with the supplied OID for this response message.
 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.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Response

public Response(T t,
                ResultCode rc)
Creates a new ldap response.

Parameters:
t - response type
rc - result code

Response

public Response(T t,
                ResultCode rc,
                String msg,
                String dn,
                ResponseControl[] c,
                String[] urls,
                int id)
Creates a new ldap response.

Parameters:
t - response type
rc - result code
msg - result message
dn - matched dn
c - response controls
urls - referral urls
id - message id
Method Detail

getResult

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

Returns:
operation result

getResultCode

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

Returns:
operation result code

getMessage

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

Returns:
message

getMatchedDn

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

Returns:
matched DN

getControls

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

Specified by:
getControls in interface Message<ResponseControl>
Returns:
controls

getControl

public ResponseControl getControl(String oid)
Returns the first response control with the supplied OID for this response message.

Specified by:
getControl in interface ResponseMessage
Parameters:
oid - of the response control to return
Returns:
response control or null if control could not be found

getReferralURLs

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

Returns:
referral urls

getMessageId

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

Specified by:
getMessageId in interface ResponseMessage
Returns:
message id

toString

public String toString()

Overrides:
toString in class Object


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