| | |
| | | |
| | | |
| | | |
| | | import static org.opends.messages.CoreMessages.ERR_ENQUEUE_BIND_IN_PROGRESS; |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.messages.ProtocolMessages.*; |
| | | import static org.opends.server.core.DirectoryServer.getMaxInternalBufferSize; |
| | | import static org.opends.server.loggers.AccessLogger.logDisconnect; |
| | | import static org.opends.server.loggers.ErrorLogger.logError; |
| | | import static org.opends.server.core.DirectoryServer.*; |
| | | import static org.opends.server.loggers.AccessLogger.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.protocols.ldap.LDAPConstants.*; |
| | | import static org.opends.server.util.ServerConstants.OID_START_TLS_REQUEST; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | import java.io.IOException; |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public void run() |
| | | { |
| | | try |
| | |
| | | // Synchronize concurrent writes to the same connection. |
| | | private final Lock writeLock = new ReentrantLock(); |
| | | |
| | | @Override |
| | | public int read(ByteBuffer byteBuffer) throws IOException |
| | | { |
| | | int bytesRead = clientChannel.read(byteBuffer); |
| | |
| | | return bytesRead; |
| | | } |
| | | |
| | | @Override |
| | | public boolean isOpen() |
| | | { |
| | | return clientChannel.isOpen(); |
| | | } |
| | | |
| | | @Override |
| | | public void close() throws IOException |
| | | { |
| | | clientChannel.close(); |
| | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public int write(ByteBuffer byteBuffer) throws IOException |
| | | { |
| | | writeLock.lock(); |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | protected ASN1WriterHolder initialValue() |
| | | { |
| | | return new ASN1WriterHolder(); |
| | |
| | | if (connectionID < 0) |
| | | { |
| | | disconnect(DisconnectReason.ADMIN_LIMIT_EXCEEDED, true, |
| | | ERR_LDAP_CONNHANDLER_REJECTED_BY_SERVER.get()); |
| | | ERR_CONNHANDLER_REJECTED_BY_SERVER.get()); |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean prepareTLS(MessageBuilder unavailableReason) |
| | | { |
| | | if (isSecure() && "TLS".equals(activeProvider.getName())) |