| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.protocols.internal; |
| | | |
| | |
| | | import org.opends.server.types.InitializationException; |
| | | import org.opends.server.types.HostPort; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | |
| | | |
| | | |
| | |
| | | public class InternalConnectionHandler |
| | | extends ConnectionHandler |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.protocols.internal." + |
| | | "InternalConnectionHandler"; |
| | | |
| | | |
| | | |
| | |
| | | { |
| | | super("Internal Connection Handler Thread"); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | // Since we can't guarantee that the initializeConnectionHandler |
| | | // method will always be called for this method, we'll do the |
| | |
| | | */ |
| | | public static InternalConnectionHandler getInstance() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getInstance"); |
| | | |
| | | return handlerInstance; |
| | | } |
| | |
| | | public void initializeConnectionHandler(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeConnectionHandler", |
| | | String.valueOf(configEntry)); |
| | | } |
| | | |
| | | |
| | |
| | | public void finalizeConnectionHandler(String finalizeReason, |
| | | boolean closeConnections) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeConnectionHandler", |
| | | String.valueOf(closeConnections)); |
| | | |
| | | // No implementation is required. |
| | | } |
| | |
| | | */ |
| | | public String getConnectionHandlerName() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConnectionHandlerName"); |
| | | |
| | | return "Internal Connection Handler"; |
| | | } |
| | |
| | | */ |
| | | public String getProtocol() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProtocol"); |
| | | |
| | | return protocol; |
| | | } |
| | |
| | | */ |
| | | public Collection<HostPort> getListeners() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProtocol"); |
| | | |
| | | return listeners; |
| | | } |
| | |
| | | */ |
| | | public Collection<ClientConnection> getClientConnections() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getClientConnections"); |
| | | |
| | | return connectionList; |
| | | } |
| | |
| | | */ |
| | | public void run() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "run"); |
| | | |
| | | // No implementation is required since this connection handler |
| | | // won't actually accept connections. |
| | |
| | | */ |
| | | public String toString() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString"); |
| | | |
| | | return "Internal Connection Handler"; |
| | | } |
| | |
| | | */ |
| | | public void toString(StringBuilder buffer) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "toString", |
| | | "java.lang.StringBuilder"); |
| | | |
| | | buffer.append("Internal Connection Handler"); |
| | | } |