mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

boli
10.26.2009 7636cc710996b7b7cbd4001a2a2ad80b5f8c3b40
Move LDAP implementation classes to com.sun.opends.sdk package.
20 files renamed
5 files modified
343 ■■■■ changed files
sdk/src/com/sun/opends/sdk/ldap/ASN1StreamReader.java 15 ●●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/ASN1StreamWriter.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/AbstractLDAPMessageHandler.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/AbstractLDAPTransport.java 19 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/AbstractResultFutureImpl.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/BindResultFutureImpl.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/CompareResultFutureImpl.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/ExtendedResultFutureImpl.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/LDAPConnection.java 8 ●●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/LDAPConnectionFactoryImpl.java 11 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/LDAPConstants.java 117 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/LDAPMessageHandler.java 5 ●●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/ResultFutureImpl.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/SASLFilter.java 8 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/SASLStreamReader.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/SASLStreamWriter.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/SearchResultFutureImpl.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/UnexpectedRequestException.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/UnexpectedResponseException.java 4 ●●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/UnsupportedMessageException.java 4 ●●●● patch | view | raw | blame | history
sdk/src/org/opends/sdk/ldap/LDAPConnectionFactory.java 2 ●●● patch | view | raw | blame | history
sdk/src/org/opends/sdk/ldap/LDAPDecoder.java 10 ●●●● patch | view | raw | blame | history
sdk/src/org/opends/sdk/ldap/LDAPEncoder.java 92 ●●●● patch | view | raw | blame | history
sdk/src/org/opends/sdk/ldap/LDAPUtils.java 2 ●●● patch | view | raw | blame | history
sdk/src/org/opends/sdk/ldap/ResolvedSchema.java 2 ●●● patch | view | raw | blame | history
sdk/src/com/sun/opends/sdk/ldap/ASN1StreamReader.java
File was renamed from sdk/src/org/opends/sdk/ldap/ASN1StreamReader.java
@@ -24,12 +24,12 @@
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
import static com.sun.opends.sdk.messages.Messages.*;
import static org.opends.sdk.ldap.LDAPConstants.*;
import static com.sun.opends.sdk.ldap.LDAPConstants.*;
import java.io.IOException;
import java.nio.BufferUnderflowException;
@@ -51,7 +51,7 @@
/**
 * Grizzly ASN1 reader implementation.
 */
final class ASN1StreamReader extends AbstractASN1Reader implements
public final class ASN1StreamReader extends AbstractASN1Reader implements
    PoolableObject, ASN1Reader
{
  class ChildSequenceLimiter implements SequenceLimiter
@@ -265,13 +265,10 @@
    {
      return false;
    }
    if ((state == ELEMENT_READ_STATE_NEED_ADDITIONAL_LENGTH_BYTES)
        && !needAdditionalLengthBytesState(true))
    {
      return false;
    }
    return !((state == ELEMENT_READ_STATE_NEED_ADDITIONAL_LENGTH_BYTES)
        && !needAdditionalLengthBytesState(true)) &&
        peekLength <= readLimiter.remaining();
    return peekLength <= readLimiter.remaining();
  }
sdk/src/com/sun/opends/sdk/ldap/ASN1StreamWriter.java
File was renamed from sdk/src/org/opends/sdk/ldap/ASN1StreamWriter.java
@@ -24,7 +24,7 @@
 *
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -49,7 +49,7 @@
/**
 * Grizzly ASN1 writer implementation.
 */
final class ASN1StreamWriter extends AbstractASN1Writer implements
public final class ASN1StreamWriter extends AbstractASN1Writer implements
    ASN1Writer, PoolableObject
{
  private class ChildSequenceBuffer implements SequenceBuffer
sdk/src/com/sun/opends/sdk/ldap/AbstractLDAPMessageHandler.java
File was renamed from sdk/src/org/opends/sdk/ldap/AbstractLDAPMessageHandler.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -43,7 +43,7 @@
/**
 * Abstract LDAP message handler.
 */
abstract class AbstractLDAPMessageHandler implements LDAPMessageHandler
public abstract class AbstractLDAPMessageHandler implements LDAPMessageHandler
{
  public void handleUnrecognizedMessage(int messageID, byte messageTag,
      ByteString messageBytes) throws UnsupportedMessageException
sdk/src/com/sun/opends/sdk/ldap/AbstractLDAPTransport.java
File was renamed from sdk/src/org/opends/sdk/ldap/AbstractLDAPTransport.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -36,13 +36,13 @@
import com.sun.grizzly.streams.StreamReader;
import com.sun.grizzly.streams.StreamWriter;
import com.sun.grizzly.utils.ConcurrentQueuePool;
import org.opends.sdk.ldap.LDAPDecoder;
/**
 * Abstract LDAP transport.
 */
abstract class AbstractLDAPTransport
public abstract class AbstractLDAPTransport
{
  private class ASN1ReaderPool extends
      ConcurrentQueuePool<ASN1StreamReader>
@@ -187,7 +187,7 @@
  AbstractLDAPTransport()
  protected AbstractLDAPTransport()
  {
    this.defaultFilterChainFactory = new DefaultFilterChainFactory();
@@ -197,7 +197,7 @@
  ASN1StreamWriter getASN1Writer(StreamWriter streamWriter)
  public ASN1StreamWriter getASN1Writer(StreamWriter streamWriter)
  {
    ASN1StreamWriter asn1Writer = asn1WriterPool.poll();
    asn1Writer.setStreamWriter(streamWriter);
@@ -206,25 +206,26 @@
  PatternFilterChainFactory getDefaultFilterChainFactory()
  public PatternFilterChainFactory getDefaultFilterChainFactory()
  {
    return defaultFilterChainFactory;
  }
  void releaseASN1Writer(ASN1StreamWriter asn1Writer)
  public void releaseASN1Writer(ASN1StreamWriter asn1Writer)
  {
    asn1WriterPool.offer(asn1Writer);
  }
  abstract LDAPMessageHandler getMessageHandler(Connection<?> connection);
  protected abstract LDAPMessageHandler getMessageHandler(
      Connection<?> connection);
  abstract void removeMessageHandler(Connection<?> connection);
  protected abstract void removeMessageHandler(Connection<?> connection);
sdk/src/com/sun/opends/sdk/ldap/AbstractResultFutureImpl.java
File was renamed from sdk/src/org/opends/sdk/ldap/AbstractResultFutureImpl.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -47,7 +47,7 @@
/**
 * Abstract result future implementation.
 */
abstract class AbstractResultFutureImpl<R extends Result, P> implements
public abstract class AbstractResultFutureImpl<R extends Result, P> implements
    ResultFuture<R>, Runnable
{
  private final LDAPConnection connection;
sdk/src/com/sun/opends/sdk/ldap/BindResultFutureImpl.java
File was renamed from sdk/src/org/opends/sdk/ldap/BindResultFutureImpl.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -44,7 +44,7 @@
/**
 * Bind result future implementation.
 */
final class BindResultFutureImpl<P> extends
public final class BindResultFutureImpl<P> extends
    AbstractResultFutureImpl<BindResult, P> implements
    ResultFuture<BindResult>
{
sdk/src/com/sun/opends/sdk/ldap/CompareResultFutureImpl.java
File was renamed from sdk/src/org/opends/sdk/ldap/CompareResultFutureImpl.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -43,7 +43,7 @@
/**
 * Compare result future implementation.
 */
final class CompareResultFutureImpl<P> extends
public final class CompareResultFutureImpl<P> extends
    AbstractResultFutureImpl<CompareResult, P> implements
    ResultFuture<CompareResult>
{
sdk/src/com/sun/opends/sdk/ldap/ExtendedResultFutureImpl.java
File was renamed from sdk/src/org/opends/sdk/ldap/ExtendedResultFutureImpl.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -40,7 +40,7 @@
/**
 * Extended result future implementation.
 */
final class ExtendedResultFutureImpl<R extends Result, P> extends
public final class ExtendedResultFutureImpl<R extends Result, P> extends
    AbstractResultFutureImpl<R, P> implements ResultFuture<R>
{
  private final ExtendedRequest<R> request;
sdk/src/com/sun/opends/sdk/ldap/LDAPConnection.java
File was renamed from sdk/src/org/opends/sdk/ldap/LDAPConnection.java
@@ -25,11 +25,13 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
import static org.opends.sdk.ldap.LDAPConstants.*;
import static com.sun.opends.sdk.ldap.LDAPConstants.*;
import org.opends.sdk.ldap.LDAPEncoder;
import org.opends.sdk.ldap.ResolvedSchema;
import java.io.EOFException;
import java.io.IOException;
@@ -67,7 +69,7 @@
 * <p>
 * TODO: handle illegal state exceptions.
 */
final class LDAPConnection implements AsynchronousConnection
public final class LDAPConnection implements AsynchronousConnection
{
  private final class LDAPMessageHandlerImpl extends
sdk/src/com/sun/opends/sdk/ldap/LDAPConnectionFactoryImpl.java
File was renamed from sdk/src/org/opends/sdk/ldap/LDAPConnectionFactoryImpl.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -38,6 +38,7 @@
import javax.net.ssl.SSLContext;
import org.opends.sdk.*;
import org.opends.sdk.ldap.LDAPConnectionOptions;
import org.opends.sdk.controls.*;
import org.opends.sdk.extensions.StartTLSRequest;
import org.opends.sdk.responses.Responses;
@@ -59,7 +60,7 @@
/**
 * LDAP connection factory implementation.
 */
final class LDAPConnectionFactoryImpl extends
public final class LDAPConnectionFactoryImpl extends
    AbstractConnectionFactory<AsynchronousConnection> implements
    ConnectionFactory<AsynchronousConnection>
{
@@ -67,7 +68,7 @@
  {
    @Override
    LDAPMessageHandler getMessageHandler(
    protected LDAPMessageHandler getMessageHandler(
        com.sun.grizzly.Connection<?> connection)
    {
      return ldapConnectionAttr.get(connection).getLDAPMessageHandler();
@@ -76,7 +77,7 @@
    @Override
    void removeMessageHandler(com.sun.grizzly.Connection<?> connection)
    protected void removeMessageHandler(com.sun.grizzly.Connection<?> connection)
    {
      ldapConnectionAttr.remove(connection);
    }
@@ -446,7 +447,7 @@
   * @throws NullPointerException
   *           If {@code host} or {@code options} was {@code null}.
   */
  LDAPConnectionFactoryImpl(String host, int port,
  public LDAPConnectionFactoryImpl(String host, int port,
      LDAPConnectionOptions options) throws NullPointerException
  {
    this(host, port, options, getTCPNIOTransport());
sdk/src/com/sun/opends/sdk/ldap/LDAPConstants.java
File was renamed from sdk/src/org/opends/sdk/ldap/LDAPConstants.java
@@ -24,309 +24,310 @@
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
/**
 * This class defines a number of constants used in the LDAP protocol.
 */
final class LDAPConstants
public final class LDAPConstants
{
  /**
   * The protocol op type for bind requests.
   */
  static final byte OP_TYPE_BIND_REQUEST = 0x60;
  public static final byte OP_TYPE_BIND_REQUEST = 0x60;
  /**
   * The protocol op type for bind responses.
   */
  static final byte OP_TYPE_BIND_RESPONSE = 0x61;
  public static final byte OP_TYPE_BIND_RESPONSE = 0x61;
  /**
   * The protocol op type for unbind requests.
   */
  static final byte OP_TYPE_UNBIND_REQUEST = 0x42;
  public static final byte OP_TYPE_UNBIND_REQUEST = 0x42;
  /**
   * The protocol op type for search requests.
   */
  static final byte OP_TYPE_SEARCH_REQUEST = 0x63;
  public static final byte OP_TYPE_SEARCH_REQUEST = 0x63;
  /**
   * The protocol op type for search result entries.
   */
  static final byte OP_TYPE_SEARCH_RESULT_ENTRY = 0x64;
  public static final byte OP_TYPE_SEARCH_RESULT_ENTRY = 0x64;
  /**
   * The protocol op type for search result references.
   */
  static final byte OP_TYPE_SEARCH_RESULT_REFERENCE = 0x73;
  public static final byte OP_TYPE_SEARCH_RESULT_REFERENCE = 0x73;
  /**
   * The protocol op type for search result done elements.
   */
  static final byte OP_TYPE_SEARCH_RESULT_DONE = 0x65;
  public static final byte OP_TYPE_SEARCH_RESULT_DONE = 0x65;
  /**
   * The protocol op type for modify requests.
   */
  static final byte OP_TYPE_MODIFY_REQUEST = 0x66;
  public static final byte OP_TYPE_MODIFY_REQUEST = 0x66;
  /**
   * The protocol op type for modify responses.
   */
  static final byte OP_TYPE_MODIFY_RESPONSE = 0x67;
  public static final byte OP_TYPE_MODIFY_RESPONSE = 0x67;
  /**
   * The protocol op type for add requests.
   */
  static final byte OP_TYPE_ADD_REQUEST = 0x68;
  public static final byte OP_TYPE_ADD_REQUEST = 0x68;
  /**
   * The protocol op type for add responses.
   */
  static final byte OP_TYPE_ADD_RESPONSE = 0x69;
  public static final byte OP_TYPE_ADD_RESPONSE = 0x69;
  /**
   * The protocol op type for delete requests.
   */
  static final byte OP_TYPE_DELETE_REQUEST = 0x4A;
  public static final byte OP_TYPE_DELETE_REQUEST = 0x4A;
  /**
   * The protocol op type for delete responses.
   */
  static final byte OP_TYPE_DELETE_RESPONSE = 0x6B;
  public static final byte OP_TYPE_DELETE_RESPONSE = 0x6B;
  /**
   * The protocol op type for modify DN requests.
   */
  static final byte OP_TYPE_MODIFY_DN_REQUEST = 0x6C;
  public static final byte OP_TYPE_MODIFY_DN_REQUEST = 0x6C;
  /**
   * The protocol op type for modify DN responses.
   */
  static final byte OP_TYPE_MODIFY_DN_RESPONSE = 0x6D;
  public static final byte OP_TYPE_MODIFY_DN_RESPONSE = 0x6D;
  /**
   * The protocol op type for compare requests.
   */
  static final byte OP_TYPE_COMPARE_REQUEST = 0x6E;
  public static final byte OP_TYPE_COMPARE_REQUEST = 0x6E;
  /**
   * The protocol op type for compare responses.
   */
  static final byte OP_TYPE_COMPARE_RESPONSE = 0x6F;
  public static final byte OP_TYPE_COMPARE_RESPONSE = 0x6F;
  /**
   * The protocol op type for abandon requests.
   */
  static final byte OP_TYPE_ABANDON_REQUEST = 0x50;
  public static final byte OP_TYPE_ABANDON_REQUEST = 0x50;
  /**
   * The protocol op type for extended requests.
   */
  static final byte OP_TYPE_EXTENDED_REQUEST = 0x77;
  public static final byte OP_TYPE_EXTENDED_REQUEST = 0x77;
  /**
   * The protocol op type for extended responses.
   */
  static final byte OP_TYPE_EXTENDED_RESPONSE = 0x78;
  public static final byte OP_TYPE_EXTENDED_RESPONSE = 0x78;
  /**
   * The protocol op type for intermediate responses.
   */
  static final byte OP_TYPE_INTERMEDIATE_RESPONSE = 0x79;
  public static final byte OP_TYPE_INTERMEDIATE_RESPONSE = 0x79;
  /**
   * The BER type to use for encoding the sequence of controls in an
   * LDAP message.
   */
  static final byte TYPE_CONTROL_SEQUENCE = (byte) 0xA0;
  public static final byte TYPE_CONTROL_SEQUENCE = (byte) 0xA0;
  /**
   * The BER type to use for encoding the sequence of referral URLs in
   * an LDAPResult element.
   */
  static final byte TYPE_REFERRAL_SEQUENCE = (byte) 0xA3;
  public static final byte TYPE_REFERRAL_SEQUENCE = (byte) 0xA3;
  /**
   * The BER type to use for the AuthenticationChoice element in a bind
   * request when simple authentication is to be used.
   */
  static final byte TYPE_AUTHENTICATION_SIMPLE = (byte) 0x80;
  public static final byte TYPE_AUTHENTICATION_SIMPLE = (byte) 0x80;
  /**
   * The BER type to use for the AuthenticationChoice element in a bind
   * request when SASL authentication is to be used.
   */
  static final byte TYPE_AUTHENTICATION_SASL = (byte) 0xA3;
  public static final byte TYPE_AUTHENTICATION_SASL = (byte) 0xA3;
  /**
   * The BER type to use for the server SASL credentials in a bind
   * response.
   */
  static final byte TYPE_SERVER_SASL_CREDENTIALS = (byte) 0x87;
  public static final byte TYPE_SERVER_SASL_CREDENTIALS = (byte) 0x87;
  /**
   * The BER type to use for AND filter components.
   */
  static final byte TYPE_FILTER_AND = (byte) 0xA0;
  public static final byte TYPE_FILTER_AND = (byte) 0xA0;
  /**
   * The BER type to use for OR filter components.
   */
  static final byte TYPE_FILTER_OR = (byte) 0xA1;
  public static final byte TYPE_FILTER_OR = (byte) 0xA1;
  /**
   * The BER type to use for NOT filter components.
   */
  static final byte TYPE_FILTER_NOT = (byte) 0xA2;
  public static final byte TYPE_FILTER_NOT = (byte) 0xA2;
  /**
   * The BER type to use for equality filter components.
   */
  static final byte TYPE_FILTER_EQUALITY = (byte) 0xA3;
  public static final byte TYPE_FILTER_EQUALITY = (byte) 0xA3;
  /**
   * The BER type to use for substring filter components.
   */
  static final byte TYPE_FILTER_SUBSTRING = (byte) 0xA4;
  public static final byte TYPE_FILTER_SUBSTRING = (byte) 0xA4;
  /**
   * The BER type to use for greater than or equal to filter components.
   */
  static final byte TYPE_FILTER_GREATER_OR_EQUAL = (byte) 0xA5;
  public static final byte TYPE_FILTER_GREATER_OR_EQUAL = (byte) 0xA5;
  /**
   * The BER type to use for less than or equal to filter components.
   */
  static final byte TYPE_FILTER_LESS_OR_EQUAL = (byte) 0xA6;
  public static final byte TYPE_FILTER_LESS_OR_EQUAL = (byte) 0xA6;
  /**
   * The BER type to use for presence filter components.
   */
  static final byte TYPE_FILTER_PRESENCE = (byte) 0x87;
  public static final byte TYPE_FILTER_PRESENCE = (byte) 0x87;
  /**
   * The BER type to use for approximate filter components.
   */
  static final byte TYPE_FILTER_APPROXIMATE = (byte) 0xA8;
  public static final byte TYPE_FILTER_APPROXIMATE = (byte) 0xA8;
  /**
   * The BER type to use for extensible matching filter components.
   */
  static final byte TYPE_FILTER_EXTENSIBLE_MATCH = (byte) 0xA9;
  public static final byte TYPE_FILTER_EXTENSIBLE_MATCH = (byte) 0xA9;
  /**
   * The BER type to use for the subInitial component of a substring
   * filter.
   */
  static final byte TYPE_SUBINITIAL = (byte) 0x80;
  public static final byte TYPE_SUBINITIAL = (byte) 0x80;
  /**
   * The BER type to use for the subAny component(s) of a substring
   * filter.
   */
  static final byte TYPE_SUBANY = (byte) 0x81;
  public static final byte TYPE_SUBANY = (byte) 0x81;
  /**
   * The BER type to use for the subFinal components of a substring
   * filter.
   */
  static final byte TYPE_SUBFINAL = (byte) 0x82;
  public static final byte TYPE_SUBFINAL = (byte) 0x82;
  /**
   * The BER type to use for the matching rule OID in a matching rule
   * assertion.
   */
  static final byte TYPE_MATCHING_RULE_ID = (byte) 0x81;
  public static final byte TYPE_MATCHING_RULE_ID = (byte) 0x81;
  /**
   * The BER type to use for the attribute type in a matching rule
   * assertion.
   */
  static final byte TYPE_MATCHING_RULE_TYPE = (byte) 0x82;
  public static final byte TYPE_MATCHING_RULE_TYPE = (byte) 0x82;
  /**
   * The BER type to use for the assertion value in a matching rule
   * assertion.
   */
  static final byte TYPE_MATCHING_RULE_VALUE = (byte) 0x83;
  public static final byte TYPE_MATCHING_RULE_VALUE = (byte) 0x83;
  /**
   * The BER type to use for the DN attributes flag in a matching rule
   * assertion.
   */
  static final byte TYPE_MATCHING_RULE_DN_ATTRIBUTES = (byte) 0x84;
  public static final byte TYPE_MATCHING_RULE_DN_ATTRIBUTES = (byte) 0x84;
  /**
   * The BER type to use for the newSuperior component of a modify DN
   * request.
   */
  static final byte TYPE_MODIFY_DN_NEW_SUPERIOR = (byte) 0x80;
  public static final byte TYPE_MODIFY_DN_NEW_SUPERIOR = (byte) 0x80;
  /**
   * The BER type to use for the OID of an extended request.
   */
  static final byte TYPE_EXTENDED_REQUEST_OID = (byte) 0x80;
  public static final byte TYPE_EXTENDED_REQUEST_OID = (byte) 0x80;
  /**
   * The BER type to use for the value of an extended request.
   */
  static final byte TYPE_EXTENDED_REQUEST_VALUE = (byte) 0x81;
  public static final byte TYPE_EXTENDED_REQUEST_VALUE = (byte) 0x81;
  /**
   * The BER type to use for the OID of an extended response.
   */
  static final byte TYPE_EXTENDED_RESPONSE_OID = (byte) 0x8A;
  public static final byte TYPE_EXTENDED_RESPONSE_OID = (byte) 0x8A;
  /**
   * The BER type to use for the value of an extended response.
   */
  static final byte TYPE_EXTENDED_RESPONSE_VALUE = (byte) 0x8B;
  public static final byte TYPE_EXTENDED_RESPONSE_VALUE = (byte) 0x8B;
  /**
   * The BER type to use for the OID of an intermediate response
   * message.
   */
  static final byte TYPE_INTERMEDIATE_RESPONSE_OID = (byte) 0x80;
  public static final byte TYPE_INTERMEDIATE_RESPONSE_OID = (byte) 0x80;
  /**
   * The BER type to use for the value of an intermediate response
   * message.
   */
  static final byte TYPE_INTERMEDIATE_RESPONSE_VALUE = (byte) 0x81;
  public static final byte TYPE_INTERMEDIATE_RESPONSE_VALUE = (byte) 0x81;
  /**
   * The OID for the Kerberos V GSSAPI mechanism.
   */
  static final String OID_GSSAPI_KERBEROS_V = "1.2.840.113554.1.2.2";
  public static final String OID_GSSAPI_KERBEROS_V = "1.2.840.113554.1.2.2";
  /**
   * The OID for the LDAP notice of disconnection extended operation.
   */
  static final String OID_NOTICE_OF_DISCONNECTION = "1.3.6.1.4.1.1466.20036";
  public static final String OID_NOTICE_OF_DISCONNECTION =
      "1.3.6.1.4.1.1466.20036";
  /**
   * The ASN.1 element decoding state that indicates that the next byte
   * read should be the BER type for a new element.
   */
  static final int ELEMENT_READ_STATE_NEED_TYPE = 0;
  public static final int ELEMENT_READ_STATE_NEED_TYPE = 0;
  /**
   * The ASN.1 element decoding state that indicates that the next byte
   * read should be the first byte for the element length.
   */
  static final int ELEMENT_READ_STATE_NEED_FIRST_LENGTH_BYTE = 1;
  public static final int ELEMENT_READ_STATE_NEED_FIRST_LENGTH_BYTE = 1;
  /**
   * The ASN.1 element decoding state that indicates that the next byte
   * read should be additional bytes of a multi-byte length.
   */
  static final int ELEMENT_READ_STATE_NEED_ADDITIONAL_LENGTH_BYTES = 2;
  public static final int ELEMENT_READ_STATE_NEED_ADDITIONAL_LENGTH_BYTES = 2;
  /**
   * The ASN.1 element decoding state that indicates that the next byte
   * read should be applied to the value of the element.
   */
  static final int ELEMENT_READ_STATE_NEED_VALUE_BYTES = 3;
  public static final int ELEMENT_READ_STATE_NEED_VALUE_BYTES = 3;
}
sdk/src/com/sun/opends/sdk/ldap/LDAPMessageHandler.java
File was renamed from sdk/src/org/opends/sdk/ldap/LDAPMessageHandler.java
@@ -25,12 +25,13 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
import org.opends.sdk.ByteString;
import org.opends.sdk.DecodeException;
import org.opends.sdk.ldap.ResolvedSchema;
import org.opends.sdk.controls.Control;
import org.opends.sdk.requests.*;
import org.opends.sdk.responses.*;
@@ -42,7 +43,7 @@
/**
 * LDAP message handler interface.
 */
interface LDAPMessageHandler
public interface LDAPMessageHandler
{
  ResolvedSchema resolveSchema(String dn) throws DecodeException;
sdk/src/com/sun/opends/sdk/ldap/ResultFutureImpl.java
File was renamed from sdk/src/org/opends/sdk/ldap/ResultFutureImpl.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -43,7 +43,7 @@
/**
 * Result future implementation.
 */
final class ResultFutureImpl<P> extends
public final class ResultFutureImpl<P> extends
    AbstractResultFutureImpl<Result, P> implements ResultFuture<Result>
{
  private final Request request;
sdk/src/com/sun/opends/sdk/ldap/SASLFilter.java
File was renamed from sdk/src/org/opends/sdk/ldap/SASLFilter.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -54,7 +54,7 @@
/**
 * SASL filter adapter.
 */
final class SASLFilter extends FilterAdapter implements
public final class SASLFilter extends FilterAdapter implements
    StreamTransformerFilter
{
  private static SASLFilter SINGLETON = new SASLFilter();
@@ -249,6 +249,8 @@
  /**
   * Obtaining incoming buffer
   *
   * @param size
   *          The size of the buffer to allocate
   * @param state
   *          State storage
   * @return incoming buffer
@@ -301,6 +303,8 @@
  /**
   * Obtaining outgoing buffer
   *
   * @param size
   *          The size of the buffer to allocate
   * @param state
   *          State storage
   * @return Outgoing buffer
sdk/src/com/sun/opends/sdk/ldap/SASLStreamReader.java
File was renamed from sdk/src/org/opends/sdk/ldap/SASLStreamReader.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -42,7 +42,7 @@
/**
 * SASL stream reader.
 */
final class SASLStreamReader extends StreamReaderDecorator
public final class SASLStreamReader extends StreamReaderDecorator
{
  private final SASLFilter saslFilter;
sdk/src/com/sun/opends/sdk/ldap/SASLStreamWriter.java
File was renamed from sdk/src/org/opends/sdk/ldap/SASLStreamWriter.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -43,7 +43,7 @@
 * SASL stream writer.
 */
@SuppressWarnings("unchecked")
final class SASLStreamWriter extends StreamWriterDecorator
public final class SASLStreamWriter extends StreamWriterDecorator
{
  private final SASLFilter saslFilter;
sdk/src/com/sun/opends/sdk/ldap/SearchResultFutureImpl.java
File was renamed from sdk/src/org/opends/sdk/ldap/SearchResultFutureImpl.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -46,7 +46,7 @@
/**
 * Search result future implementation.
 */
final class SearchResultFutureImpl<P> extends
public final class SearchResultFutureImpl<P> extends
    AbstractResultFutureImpl<Result, P> implements ResultFuture<Result>
{
sdk/src/com/sun/opends/sdk/ldap/UnexpectedRequestException.java
File was renamed from sdk/src/org/opends/sdk/ldap/UnexpectedRequestException.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -41,7 +41,7 @@
 * Thrown when an expected LDAP request is received.
 */
@SuppressWarnings("serial")
final class UnexpectedRequestException extends IOException
public final class UnexpectedRequestException extends IOException
{
  private final int messageID;
  private final Request request;
sdk/src/com/sun/opends/sdk/ldap/UnexpectedResponseException.java
File was renamed from sdk/src/org/opends/sdk/ldap/UnexpectedResponseException.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -41,7 +41,7 @@
 * Thrown when an unexpected LDAP response is received.
 */
@SuppressWarnings("serial")
final class UnexpectedResponseException extends IOException
public final class UnexpectedResponseException extends IOException
{
  private final int messageID;
  private final Response response;
sdk/src/com/sun/opends/sdk/ldap/UnsupportedMessageException.java
File was renamed from sdk/src/org/opends/sdk/ldap/UnsupportedMessageException.java
@@ -25,7 +25,7 @@
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.sdk.ldap;
package com.sun.opends.sdk.ldap;
@@ -39,7 +39,7 @@
 * Thrown when an unsupported LDAP message is received.
 */
@SuppressWarnings("serial")
final class UnsupportedMessageException extends IOException
public final class UnsupportedMessageException extends IOException
{
  private final int id;
  private final byte tag;
sdk/src/org/opends/sdk/ldap/LDAPConnectionFactory.java
@@ -30,7 +30,7 @@
import org.opends.sdk.*;
import com.sun.opends.sdk.ldap.LDAPConnectionFactoryImpl;
/**
sdk/src/org/opends/sdk/ldap/LDAPDecoder.java
@@ -31,7 +31,7 @@
import static com.sun.opends.sdk.messages.Messages.*;
import static org.opends.sdk.asn1.ASN1Constants.*;
import static org.opends.sdk.ldap.LDAPConstants.*;
import static com.sun.opends.sdk.ldap.LDAPConstants.*;
import java.io.IOException;
import java.util.logging.Level;
@@ -45,13 +45,13 @@
import org.opends.sdk.schema.Schema;
import com.sun.opends.sdk.util.StaticUtils;
import com.sun.opends.sdk.ldap.LDAPMessageHandler;
/**
 * Static methods for decoding LDAP messages.
 */
class LDAPDecoder
public class LDAPDecoder
{
  /**
@@ -66,7 +66,7 @@
   * @throws IOException
   *           If an error occurred while reading bytes to decode.
   */
  static void decode(ASN1Reader reader, LDAPMessageHandler handler)
  public static void decode(ASN1Reader reader, LDAPMessageHandler handler)
      throws IOException
  {
    reader.readStartSequence();
@@ -83,7 +83,7 @@
  static SearchResultEntry decodeEntry(ASN1Reader reader, Schema schema)
  public static SearchResultEntry decodeEntry(ASN1Reader reader, Schema schema)
      throws IOException
  {
    SearchResultEntry message;
sdk/src/org/opends/sdk/ldap/LDAPEncoder.java
@@ -29,7 +29,7 @@
import static org.opends.sdk.ldap.LDAPConstants.*;
import static com.sun.opends.sdk.ldap.LDAPConstants.*;
import java.io.IOException;
import java.util.logging.Level;
@@ -51,28 +51,9 @@
/**
 * Static methods for encoding LDAP messages.
 */
final class LDAPEncoder
public final class LDAPEncoder
{
  static void encodeAttribute(ASN1Writer writer, Attribute attribute)
      throws IOException
  {
    writer.writeStartSequence();
    writer
        .writeOctetString(attribute.getAttributeDescriptionAsString());
    writer.writeStartSet();
    for (ByteString value : attribute)
    {
      writer.writeOctetString(value);
    }
    writer.writeEndSequence();
    writer.writeEndSequence();
  }
  static void encodeControl(ASN1Writer writer, Control control)
  public static void encodeControl(ASN1Writer writer, Control control)
      throws IOException
  {
    writer.writeStartSequence();
@@ -90,7 +71,7 @@
  static void encodeEntry(ASN1Writer writer,
  public static void encodeEntry(ASN1Writer writer,
      SearchResultEntry searchResultEntry) throws IOException
  {
    writer.writeStartSequence(OP_TYPE_SEARCH_RESULT_ENTRY);
@@ -107,7 +88,7 @@
  static void encodeAbandonRequest(ASN1Writer writer, int messageID,
  public static void encodeAbandonRequest(ASN1Writer writer, int messageID,
      AbandonRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -124,7 +105,7 @@
  static void encodeAddRequest(ASN1Writer writer, int messageID,
  public static void encodeAddRequest(ASN1Writer writer, int messageID,
      AddRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -151,7 +132,7 @@
  static void encodeCompareRequest(ASN1Writer writer, int messageID,
  public static void encodeCompareRequest(ASN1Writer writer, int messageID,
      CompareRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -176,7 +157,7 @@
  static void encodeDeleteRequest(ASN1Writer writer, int messageID,
  public static void encodeDeleteRequest(ASN1Writer writer, int messageID,
      DeleteRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -193,7 +174,7 @@
  static void encodeExtendedRequest(ASN1Writer writer, int messageID,
  public static void encodeExtendedRequest(ASN1Writer writer, int messageID,
      ExtendedRequest<?> request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -220,7 +201,7 @@
  static void encodeBindRequest(ASN1Writer writer, int messageID,
  public static void encodeBindRequest(ASN1Writer writer, int messageID,
      int version, GenericBindRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -246,7 +227,7 @@
  static void encodeBindRequest(ASN1Writer writer, int messageID,
  public static void encodeBindRequest(ASN1Writer writer, int messageID,
      int version, SASLBindRequest<?> request,
      ByteString saslCredentials) throws IOException
  {
@@ -278,7 +259,7 @@
  static void encodeBindRequest(ASN1Writer writer, int messageID,
  public static void encodeBindRequest(ASN1Writer writer, int messageID,
      int version, SimpleBindRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -303,7 +284,7 @@
  static void encodeModifyDNRequest(ASN1Writer writer, int messageID,
  public static void encodeModifyDNRequest(ASN1Writer writer, int messageID,
      ModifyDNRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -331,7 +312,7 @@
  static void encodeModifyRequest(ASN1Writer writer, int messageID,
  public static void encodeModifyRequest(ASN1Writer writer, int messageID,
      ModifyRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -357,7 +338,7 @@
  static void encodeSearchRequest(ASN1Writer writer, int messageID,
  public static void encodeSearchRequest(ASN1Writer writer, int messageID,
      SearchRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -390,7 +371,7 @@
  static void encodeUnbindRequest(ASN1Writer writer, int messageID,
  public static void encodeUnbindRequest(ASN1Writer writer, int messageID,
      UnbindRequest request) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -406,7 +387,7 @@
  static void encodeAddResult(ASN1Writer writer, int messageID,
  public static void encodeAddResult(ASN1Writer writer, int messageID,
      Result result) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -423,7 +404,7 @@
  static void encodeBindResult(ASN1Writer writer, int messageID,
  public static void encodeBindResult(ASN1Writer writer, int messageID,
      BindResult result) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -447,7 +428,7 @@
  static void encodeCompareResult(ASN1Writer writer, int messageID,
  public static void encodeCompareResult(ASN1Writer writer, int messageID,
      CompareResult result) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -464,7 +445,7 @@
  static void encodeDeleteResult(ASN1Writer writer, int messageID,
  public static void encodeDeleteResult(ASN1Writer writer, int messageID,
      Result result) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -481,7 +462,7 @@
  static void encodeExtendedResult(ASN1Writer writer, int messageID,
  public static void encodeExtendedResult(ASN1Writer writer, int messageID,
      ExtendedResult result) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -513,7 +494,7 @@
  static void encodeIntermediateResponse(ASN1Writer writer,
  public static void encodeIntermediateResponse(ASN1Writer writer,
      int messageID, IntermediateResponse response) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -548,7 +529,7 @@
  static void encodeModifyDNResult(ASN1Writer writer, int messageID,
  public static void encodeModifyDNResult(ASN1Writer writer, int messageID,
      Result result) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -565,7 +546,7 @@
  static void encodeModifyResult(ASN1Writer writer, int messageID,
  public static void encodeModifyResult(ASN1Writer writer, int messageID,
      Result result) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -582,7 +563,7 @@
  static void encodeSearchResult(ASN1Writer writer, int messageID,
  public static void encodeSearchResult(ASN1Writer writer, int messageID,
      Result result) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -599,7 +580,7 @@
  static void encodeSearchResultEntry(ASN1Writer writer, int messageID,
  public static void encodeSearchResultEntry(ASN1Writer writer, int messageID,
      SearchResultEntry entry) throws IOException
  {
    if (StaticUtils.DEBUG_LOG.isLoggable(Level.FINER))
@@ -615,7 +596,7 @@
  static void encodeSearchResultReference(ASN1Writer writer,
  public static void encodeSearchResultReference(ASN1Writer writer,
      int messageID, SearchResultReference reference)
      throws IOException
  {
@@ -639,6 +620,25 @@
  private static void encodeAttribute(ASN1Writer writer, Attribute attribute)
      throws IOException
  {
    writer.writeStartSequence();
    writer
        .writeOctetString(attribute.getAttributeDescriptionAsString());
    writer.writeStartSet();
    for (ByteString value : attribute)
    {
      writer.writeOctetString(value);
    }
    writer.writeEndSequence();
    writer.writeEndSequence();
  }
  private static void encodeChange(ASN1Writer writer, Change change)
      throws IOException
  {
sdk/src/org/opends/sdk/ldap/LDAPUtils.java
@@ -29,7 +29,7 @@
import static org.opends.sdk.ldap.LDAPConstants.*;
import static com.sun.opends.sdk.ldap.LDAPConstants.*;
import java.io.IOException;
import java.util.Collections;
sdk/src/org/opends/sdk/ldap/ResolvedSchema.java
@@ -41,7 +41,7 @@
 * A reference to a schema which should be used when decoding incoming
 * protocol elements.
 */
interface ResolvedSchema
public interface ResolvedSchema
{
  DN getInitialDN();