LDAP Classes
Implements Java LDAP

com.novell.ldap
Class LDAPExtendedResponse

java.lang.Object
  extended bycom.novell.ldap.LDAPMessage
      extended bycom.novell.ldap.LDAPResponse
          extended bycom.novell.ldap.LDAPExtendedResponse
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
GetBindDNResponse, GetEffectivePrivilegesResponse, GetReplicaInfoResponse, GetReplicationFilterResponse, LburpEndResponse, LburpOperationResponse, LburpStartResponse, LDAPBackupResponse, ListReplicasResponse, MonitorEventResponse, PartitionEntryCountResponse

public class LDAPExtendedResponse
extends LDAPResponse

Encapsulates the response returned by an LDAP server on an asynchronous extended operation request. It extends LDAPResponse. The response can contain the OID of the extension, an octet string with the operation's data, both, or neither.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.novell.ldap.LDAPMessage
ABANDON_REQUEST, ADD_REQUEST, ADD_RESPONSE, BIND_REQUEST, BIND_RESPONSE, COMPARE_REQUEST, COMPARE_RESPONSE, DEL_REQUEST, DEL_RESPONSE, EXTENDED_REQUEST, EXTENDED_RESPONSE, INTERMEDIATE_RESPONSE, message, MODIFY_RDN_REQUEST, MODIFY_RDN_RESPONSE, MODIFY_REQUEST, MODIFY_RESPONSE, SEARCH_REQUEST, SEARCH_RESPONSE, SEARCH_RESULT, SEARCH_RESULT_REFERENCE, UNBIND_REQUEST
 
Constructor Summary
LDAPExtendedResponse()
          This constructor was added to support default Serialization
LDAPExtendedResponse(int resultCode, java.lang.String matchedDN, java.lang.String serverMessage, java.lang.String[] referrals, LDAPControl[] controls, java.lang.String extendedid, byte[] extendedvalue)
          Creates the Extended Response Object passing the individual parameters.
LDAPExtendedResponse(com.novell.ldap.rfc2251.RfcLDAPMessage message)
          Creates an LDAPExtendedResponse object which encapsulates a server response to an asynchronous extended operation request.
 
Method Summary
 java.lang.String getID()
          Returns the message identifier of the response.
static com.novell.ldap.client.RespExtensionSet getRegisteredResponses()
           
 byte[] getValue()
          Returns the value part of the response in raw bytes.
static void register(java.lang.String oid, java.lang.Class extendedResponseClass)
          Registers a class to be instantiated on receipt of a extendedresponse with the given OID.
protected  void setDeserializedValues(LDAPMessage readObject, com.novell.ldap.rfc2251.RfcControls asn1Ctrls)
           
 
Methods inherited from class com.novell.ldap.LDAPResponse
chkResultCode, getControls, getErrorMessage, getMatchedDN, getMessageID, getReferrals, getResultCode, getType
 
Methods inherited from class com.novell.ldap.LDAPMessage
getTag, isRequest, readDSML, readExternal, setTag, toString, writeDSML, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDAPExtendedResponse

public LDAPExtendedResponse()
This constructor was added to support default Serialization


LDAPExtendedResponse

public LDAPExtendedResponse(int resultCode,
                            java.lang.String matchedDN,
                            java.lang.String serverMessage,
                            java.lang.String[] referrals,
                            LDAPControl[] controls,
                            java.lang.String extendedid,
                            byte[] extendedvalue)
                     throws java.net.MalformedURLException
Creates the Extended Response Object passing the individual parameters.

Parameters:
resultCode - The result code as defined in LDAPException.
matchedDN - The name of the lowest entry that was matched for some error result codes, an empty string or null if none.
serverMessage - A diagnostic message returned by the server, an empty string or null if none.
referrals - The referral URLs returned for a REFERRAL result code or null if none.
controls - Any controls returned by the server or null if none.
extendedid - The LDAPOID for this extended operation.
extendedvalue - The Value (Data) for this extended operation.
Throws:
java.net.MalformedURLException - When the referral URL are malformed.

LDAPExtendedResponse

public LDAPExtendedResponse(com.novell.ldap.rfc2251.RfcLDAPMessage message)
Creates an LDAPExtendedResponse object which encapsulates a server response to an asynchronous extended operation request.

Parameters:
message - The RfcLDAPMessage to convert to an LDAPExtendedResponse object.
Method Detail

getID

public java.lang.String getID()
Returns the message identifier of the response.

Returns:
OID of the response.

getValue

public byte[] getValue()
Returns the value part of the response in raw bytes.

Returns:
The value of the response.

register

public static void register(java.lang.String oid,
                            java.lang.Class extendedResponseClass)
Registers a class to be instantiated on receipt of a extendedresponse with the given OID.

Any previous registration for the OID is overridden. The extendedResponseClass object MUST be an extension of LDAPExtendedResponse.

Parameters:
oid - The object identifier of the control.

extendedResponseClass - A class which can instantiate an LDAPExtendedResponse.

getRegisteredResponses

public static com.novell.ldap.client.RespExtensionSet getRegisteredResponses()

setDeserializedValues

protected void setDeserializedValues(LDAPMessage readObject,
                                     com.novell.ldap.rfc2251.RfcControls asn1Ctrls)
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
Overrides:
setDeserializedValues in class LDAPResponse
Throws:
java.io.IOException
java.lang.ClassNotFoundException

LDAP Classes
Implements Java LDAP

Copyright © 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000