|
All LDAP Classes Internal LDAP Classes |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.ldap.LDAPMessage
com.novell.ldap.LDAPResponse
public class LDAPResponse
A message received from an LDAPServer in response to an asynchronous request.
Sample Code: Searchas.java
LDAPConnection.search(java.lang.String, int, java.lang.String, java.lang.String[], boolean)
,
Serialized FormField Summary | |
---|---|
private ReferralInfo |
activeReferral
|
private InterThreadException |
exception
|
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 | |
---|---|
LDAPResponse()
This constructor was added to support default Serialization |
|
LDAPResponse(int type)
Creates a SUCCESS response LDAPMessage. |
|
LDAPResponse(InterThreadException ex,
ReferralInfo activeReferral)
Creates an LDAPResponse using an LDAPException. |
|
LDAPResponse(int type,
int resultCode,
java.lang.String matchedDN,
java.lang.String serverMessage,
java.lang.String[] referrals,
LDAPControl[] controls)
Creates a response LDAPMessage from parameters. |
|
LDAPResponse(RfcLDAPMessage message)
Creates a response LDAPMessage when receiving an asynchronous response from a server. |
Method Summary | |
---|---|
void |
chkResultCode()
Checks the resultCode and throws the appropriate exception. |
(package private) ReferralInfo |
getActiveReferral()
Indicates the referral instance being followed if the connection created to follow referrals. |
LDAPControl[] |
getControls()
Returns any controls in the message. |
java.lang.String |
getErrorMessage()
Returns any error message in the response. |
(package private) LDAPException |
getException()
Returns an embedded exception response |
java.lang.String |
getMatchedDN()
Returns the partially matched DN field from the server response, if the response contains one. |
int |
getMessageID()
Returns the message ID. |
java.lang.String[] |
getReferrals()
Returns all referrals in a server response, if the response contains any. |
int |
getResultCode()
Returns the result code in a server response. |
(package private) LDAPException |
getResultException()
Checks the resultCode and generates the appropriate exception or null if success. |
int |
getType()
Returns the LDAP operation type of the message. |
(package private) boolean |
hasException()
Indicates if this response is an embedded exception response |
private static RfcControls |
RfcControlFactory(LDAPControl[] controls)
Converts a LDAPControl array to an RfcControl Structure. |
private static ASN1Sequence |
RfcResultFactory(int type,
int resultCode,
java.lang.String matchedDN,
java.lang.String serverMessage,
java.lang.String[] referrals)
|
protected void |
setDeserializedValues(LDAPMessage readObject,
RfcControls asn1Ctrls)
|
Methods inherited from class com.novell.ldap.LDAPMessage |
---|
clone, getASN1Object, getRequestingMessage, 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 |
Field Detail |
---|
private InterThreadException exception
private ReferralInfo activeReferral
Constructor Detail |
---|
public LDAPResponse()
public LDAPResponse(InterThreadException ex, ReferralInfo activeReferral)
ex
- The exception
activeReferral
- The referral actually used to create the
connectionLDAPResponse(RfcLDAPMessage message)
message
- The RfcLDAPMessage from a server.public LDAPResponse(int type)
type
- The message type as defined in LDAPMessage.LDAPMessage
public LDAPResponse(int type, int resultCode, java.lang.String matchedDN, java.lang.String serverMessage, java.lang.String[] referrals, LDAPControl[] controls)
type
- The message type as defined in LDAPMessage.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.LDAPMessage
,
LDAPException
Method Detail |
---|
private static RfcControls RfcControlFactory(LDAPControl[] controls)
controls
- array of LDAPControl
private static ASN1Sequence RfcResultFactory(int type, int resultCode, java.lang.String matchedDN, java.lang.String serverMessage, java.lang.String[] referrals)
public java.lang.String getErrorMessage()
public java.lang.String getMatchedDN()
public java.lang.String[] getReferrals()
public int getResultCode()
For a list of result codes, see the LDAPException class.
public void chkResultCode() throws LDAPException
LDAPException
- A general exception which includes an error
message and an LDAP error code.LDAPException getResultException()
public LDAPControl[] getControls()
getControls
in class LDAPMessage
LDAPMessage.getControls()
public int getMessageID()
getMessageID
in class LDAPMessage
LDAPMessage.getMessageID()
public int getType()
getType
in class LDAPMessage
LDAPMessage.getType()
boolean hasException()
LDAPException getException()
ReferralInfo getActiveReferral()
protected void setDeserializedValues(LDAPMessage readObject, RfcControls asn1Ctrls) throws java.io.IOException, java.lang.ClassNotFoundException
setDeserializedValues
in class LDAPMessage
java.io.IOException
java.lang.ClassNotFoundException
|
All LDAP Classes Internal LDAP Classes |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |