@Override public String toString() { final String name = getType().toString().toLowerCase() + ( getTLSPolicy().equals( Connection.TLSPolicy.legacyMode ) ? "-legacyMode" : "" ); return "ConnectionListener{" + "name=" + name + '}'; }
/** * Instantiates a new connection listener. * * @param isEnabledPropertyName Property name (of a boolean) that toggles availability. Null to indicate that this listener is 'always on' * @param maxPoolSizePropertyName Property name (of an int) that defines maximum IO processing threads. Null causes an unconfigurable default amount to be used. * @param maxReadBufferPropertyName Property name (of an int) that defines maximum amount (in bytes) of IO data can be cached, pending processing. Null to indicate boundless caches. * @param tlsPolicyPropertyName Property name (of a string) that defines the applicable TLS Policy. Or, the value {@link org.jivesoftware.openfire.Connection.TLSPolicy} to indicate unconfigurable TLS Policy. Cannot be null. * @param clientAuthPolicyPropertyName Property name (of an string) that defines maximum IO processing threads. Null causes a unconfigurabel value of 'wanted' to be used. */ public ConnectionListener( ConnectionType type, String tcpPortPropertyName, int defaultPort, String isEnabledPropertyName, String maxPoolSizePropertyName, String maxReadBufferPropertyName, String tlsPolicyPropertyName, String clientAuthPolicyPropertyName, InetAddress bindAddress, CertificateStoreConfiguration identityStoreConfiguration, CertificateStoreConfiguration trustStoreConfiguration, String compressionPolicyPropertyName ) { this.type = type; this.tcpPortPropertyName = tcpPortPropertyName; this.defaultPort = defaultPort; this.isEnabledPropertyName = isEnabledPropertyName; this.maxPoolSizePropertyName = maxPoolSizePropertyName; this.maxReadBufferPropertyName = maxReadBufferPropertyName; this.tlsPolicyPropertyName = tlsPolicyPropertyName; this.clientAuthPolicyPropertyName = clientAuthPolicyPropertyName; this.bindAddress = bindAddress; this.identityStoreConfiguration = identityStoreConfiguration; this.trustStoreConfiguration = trustStoreConfiguration; this.compressionPolicyPropertyName = compressionPolicyPropertyName; // A listener cannot be changed into or from legacy mode. That fact is safe to use in the name of the logger.. final String name = getType().toString().toLowerCase() + ( getTLSPolicy().equals( Connection.TLSPolicy.legacyMode ) ? "-legacyMode" : "" ); this.Log = LoggerFactory.getLogger( ConnectionListener.class.getName() + "[" + name + "]" ); }
/** * Instantiates, but not starts, a new instance. */ public MINAConnectionAcceptor( ConnectionConfiguration configuration ) { super( configuration ); this.name = configuration.getType().toString().toLowerCase() + ( configuration.getTlsPolicy() == Connection.TLSPolicy.legacyMode ? "_ssl" : "" ); Log = LoggerFactory.getLogger( MINAConnectionAcceptor.class.getName() + "[" + name + "]" ); switch ( configuration.getType() ) { case SOCKET_S2S: connectionHandler = new ServerConnectionHandler( configuration ); break; case SOCKET_C2S: connectionHandler = new ClientConnectionHandler( configuration ); break; case COMPONENT: connectionHandler = new ComponentConnectionHandler( configuration ); break; case CONNECTION_MANAGER: connectionHandler = new MultiplexerConnectionHandler( configuration ); break; default: throw new IllegalStateException( "This implementation does not support the connection type as defined in the provided configuration: " + configuration.getType() ); } this.encryptionArtifactFactory = new EncryptionArtifactFactory( configuration ); }
@Override public String toString() { final String name = getType().toString().toLowerCase() + ( getTLSPolicy().equals( Connection.TLSPolicy.legacyMode ) ? "-legacyMode" : "" ); return "ConnectionListener{" + "name=" + name + '}'; }
/** * Instantiates a new connection listener. * * @param isEnabledPropertyName Property name (of a boolean) that toggles availability. Null to indicate that this listener is 'always on' * @param maxPoolSizePropertyName Property name (of an int) that defines maximum IO processing threads. Null causes an unconfigurable default amount to be used. * @param maxReadBufferPropertyName Property name (of an int) that defines maximum amount (in bytes) of IO data can be cached, pending processing. Null to indicate boundless caches. * @param tlsPolicyPropertyName Property name (of a string) that defines the applicable TLS Policy. Or, the value {@link org.jivesoftware.openfire.Connection.TLSPolicy} to indicate unconfigurable TLS Policy. Cannot be null. * @param clientAuthPolicyPropertyName Property name (of an string) that defines maximum IO processing threads. Null causes a unconfigurabel value of 'wanted' to be used. */ public ConnectionListener( ConnectionType type, String tcpPortPropertyName, int defaultPort, String isEnabledPropertyName, String maxPoolSizePropertyName, String maxReadBufferPropertyName, String tlsPolicyPropertyName, String clientAuthPolicyPropertyName, InetAddress bindAddress, CertificateStoreConfiguration identityStoreConfiguration, CertificateStoreConfiguration trustStoreConfiguration, String compressionPolicyPropertyName ) { this.type = type; this.tcpPortPropertyName = tcpPortPropertyName; this.defaultPort = defaultPort; this.isEnabledPropertyName = isEnabledPropertyName; this.maxPoolSizePropertyName = maxPoolSizePropertyName; this.maxReadBufferPropertyName = maxReadBufferPropertyName; this.tlsPolicyPropertyName = tlsPolicyPropertyName; this.clientAuthPolicyPropertyName = clientAuthPolicyPropertyName; this.bindAddress = bindAddress; this.identityStoreConfiguration = identityStoreConfiguration; this.trustStoreConfiguration = trustStoreConfiguration; this.compressionPolicyPropertyName = compressionPolicyPropertyName; // A listener cannot be changed into or from legacy mode. That fact is safe to use in the name of the logger.. final String name = getType().toString().toLowerCase() + ( getTLSPolicy().equals( Connection.TLSPolicy.legacyMode ) ? "-legacyMode" : "" ); this.Log = LoggerFactory.getLogger( ConnectionListener.class.getName() + "[" + name + "]" ); }
/** * Instantiates, but not starts, a new instance. */ public MINAConnectionAcceptor( ConnectionConfiguration configuration ) { super( configuration ); this.name = configuration.getType().toString().toLowerCase() + ( configuration.getTlsPolicy() == Connection.TLSPolicy.legacyMode ? "_ssl" : "" ); Log = LoggerFactory.getLogger( MINAConnectionAcceptor.class.getName() + "[" + name + "]" ); switch ( configuration.getType() ) { case SOCKET_S2S: connectionHandler = new ServerConnectionHandler( configuration ); break; case SOCKET_C2S: connectionHandler = new ClientConnectionHandler( configuration ); break; case COMPONENT: connectionHandler = new ComponentConnectionHandler( configuration ); break; case CONNECTION_MANAGER: connectionHandler = new MultiplexerConnectionHandler( configuration ); break; default: throw new IllegalStateException( "This implementation does not support the connection type as defined in the provided configuration: " + configuration.getType() ); } this.encryptionArtifactFactory = new EncryptionArtifactFactory( configuration ); }