All LDAP Classes
Internal LDAP Classes

com.novell.ldap.rfc2251
Class RfcIntermediateResponse

java.lang.Object
  extended by com.novell.ldap.asn1.ASN1Object
      extended by com.novell.ldap.asn1.ASN1Structured
          extended by com.novell.ldap.asn1.ASN1Sequence
              extended by com.novell.ldap.rfc2251.RfcIntermediateResponse
All Implemented Interfaces:
RfcResponse, java.io.Serializable

public class RfcIntermediateResponse
extends ASN1Sequence
implements RfcResponse

Represents an LDAP Intermediate Response.

       IntermediateResponse ::= [APPLICATION 25] SEQUENCE {
               COMPONENTS OF LDAPResult, note: only present on incorrectly 
                                                 encoded response from 
                                               pre Falcon-sp1 server 
               responseName     [10] LDAPOID OPTIONAL,
               responseValue    [11] OCTET STRING OPTIONAL }

See Also:
Serialized Form

Field Summary
private  int m_referralIndex
           
private  int m_responseNameIndex
           
private  int m_responseValueIndex
           
static int TAG_RESPONSE
          Context-specific TAG for optional response.
static int TAG_RESPONSE_NAME
          Context-specific TAG for optional responseName.
 
Fields inherited from class com.novell.ldap.asn1.ASN1Sequence
TAG
 
Constructor Summary
RfcIntermediateResponse(ASN1Decoder dec, java.io.InputStream in, int len)
          The only time a client will create a IntermediateResponse is when it is decoding it from an InputStream.
 
Method Summary
 RfcLDAPString getErrorMessage()
          Returns the error message from the server
 ASN1Identifier getIdentifier()
          Override getIdentifier to return an application-wide id.
 RfcLDAPDN getMatchedDN()
           
 RfcReferral getReferral()
          Returns the referral(s) from the server
 ASN1OctetString getResponse()
           
 RfcLDAPOID getResponseName()
           
 ASN1Enumerated getResultCode()
           
 
Methods inherited from class com.novell.ldap.asn1.ASN1Sequence
toString
 
Methods inherited from class com.novell.ldap.asn1.ASN1Structured
add, decodeStructured, encode, get, set, size, toArray, toString
 
Methods inherited from class com.novell.ldap.asn1.ASN1Object
getEncoding, setIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_RESPONSE_NAME

public static final int TAG_RESPONSE_NAME
Context-specific TAG for optional responseName.

See Also:
Constant Field Values

TAG_RESPONSE

public static final int TAG_RESPONSE
Context-specific TAG for optional response.

See Also:
Constant Field Values

m_referralIndex

private int m_referralIndex

m_responseNameIndex

private int m_responseNameIndex

m_responseValueIndex

private int m_responseValueIndex
Constructor Detail

RfcIntermediateResponse

public RfcIntermediateResponse(ASN1Decoder dec,
                               java.io.InputStream in,
                               int len)
                        throws java.io.IOException
The only time a client will create a IntermediateResponse is when it is decoding it from an InputStream. The stream contains the intermediate response sequence that follows the msgID in the PDU. The intermediate response draft defines this as: IntermediateResponse ::= [APPLICATION 25] SEQUENCE { responseName [0] LDAPOID OPTIONAL, responseValue [1] OCTET STRING OPTIONAL } Until post Falcon sp1, the LDAP server was incorrectly encoding intermediate response as: IntermediateResponse ::= [APPLICATION 25] SEQUENCE { Components of LDAPResult, responseName [0] LDAPOID OPTIONAL, responseValue [1] OCTET STRING OPTIONAL } where the Components of LDAPResult are resultCode ENUMERATED {...} matchedDN LDAPDN, errorMessage LDAPString, referral [3] Referral OPTIONAL } (The components of LDAPResult never have the optional referral.) This constructor is written to handle both cases. The sequence of this intermediate response will have the element at index m_responseNameIndex set to an RfcLDAPOID containing the oid of the response. The element at m_responseValueIndex will be set to an ASN1OctetString containing the value bytes.

Throws:
java.io.IOException
Method Detail

getResponseName

public final RfcLDAPOID getResponseName()

getResponse

public final ASN1OctetString getResponse()

getIdentifier

public final ASN1Identifier getIdentifier()
Override getIdentifier to return an application-wide id.

Overrides:
getIdentifier in class ASN1Object

getResultCode

public final ASN1Enumerated getResultCode()
Specified by:
getResultCode in interface RfcResponse

getMatchedDN

public final RfcLDAPDN getMatchedDN()
Specified by:
getMatchedDN in interface RfcResponse

getReferral

public final RfcReferral getReferral()
Returns the referral(s) from the server

Specified by:
getReferral in interface RfcResponse
Returns:
the referral(s)

getErrorMessage

public final RfcLDAPString getErrorMessage()
Returns the error message from the server

Specified by:
getErrorMessage in interface RfcResponse
Returns:
the server error message

All LDAP Classes
Internal LDAP Classes

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