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

dugan
18.19.2009 b45e7fb00a64d2fd8897a485def4296d03c39b55
opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
@@ -195,6 +195,8 @@
  private ASN1ByteChannelReader asn1Reader;
  private static int APPLICATION_BUFFER_SIZE = 4096;
  private final RedirectingByteChannel saslChannel;
  private final RedirectingByteChannel tlsChannel;
  private ConnectionSecurityProvider activeProvider = null;
@@ -286,7 +288,7 @@
    saslChannel =
        RedirectingByteChannel.getRedirectingByteChannel(tlsChannel);
    this.asn1Reader =
        ASN1.getReader(saslChannel, 4096, connectionHandler
        ASN1.getReader(saslChannel, APPLICATION_BUFFER_SIZE, connectionHandler
            .getMaxRequestSize());
    connectionID = DirectoryServer.newConnectionAccepted(this);
@@ -349,6 +351,7 @@
   * @return The socket channel that can be used to communicate with the
   *         client.
   */
  @Override
  public SocketChannel getSocketChannel()
  {
    return clientChannel;
@@ -775,7 +778,8 @@
        writerBuffer.writer = ASN1.getWriter(saslChannel, appBufSize);
      }
      else
        writerBuffer.writer = ASN1.getWriter(saslChannel, 4096);
        writerBuffer.writer =
                          ASN1.getWriter(saslChannel, APPLICATION_BUFFER_SIZE);
      cachedBuffers.set(writerBuffer);
    }
    try
@@ -795,7 +799,7 @@
        if (keepStats)
        {
          // TODO SASLPhase2 hard-coded for now, flush probably needs to
          // TODO hard-coded for now, flush probably needs to
          // return how many bytes were flushed.
          statTracker.updateMessageWritten(message, 4096);
        }
@@ -2552,6 +2556,19 @@
  /**
   * Retrieves the TLS redirecting byte channel used in a LDAP client
   * connection.
   *
   * @return The TLS redirecting byte channel.
   */
   @Override
   public RedirectingByteChannel getChannel() {
     return this.tlsChannel;
   }
  /**
   * {@inheritDoc}
   */
  @Override
@@ -2565,6 +2582,23 @@
  /**
   * Retrieves the application buffer size used in a LDAP client connection.
   * If a active security provider is being used, then the application buffer
   * size of that provider is returned.
   *
   * @return The application buffer size.
   */
  @Override
  public int getAppBufferSize() {
    if(activeProvider != null)
      return activeProvider.getAppBufSize();
    else
      return APPLICATION_BUFFER_SIZE;
  }
  private void initializeOperationMonitors()
  {
    this.addMonitor = OperationMonitor.getOperationMonitor(ADD);