All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.firefly.net.tcp.secure.openssl.nativelib.OpenSslDefaultApplicationProtocolNegotiator Maven / Gradle / Ivy

There is a newer version: 5.0.0-dev6
Show newest version
package com.firefly.net.tcp.secure.openssl.nativelib;

import com.firefly.net.ApplicationProtocolSelector;

import java.util.List;

import static com.firefly.net.tcp.secure.openssl.nativelib.ObjectUtil.checkNotNull;

/**
 * OpenSSL {@link ApplicationProtocolSelector} for ALPN.
 *
 * @deprecated use {@link ApplicationProtocolConfig}.
 */
@Deprecated
public final class OpenSslDefaultApplicationProtocolNegotiator implements OpenSslApplicationProtocolNegotiator {

    private final ApplicationProtocolConfig config;

    public OpenSslDefaultApplicationProtocolNegotiator(ApplicationProtocolConfig config) {
        this.config = checkNotNull(config, "config");
    }

    @Override
    public List getSupportedApplicationProtocols() {
        return config.supportedProtocols();
    }

    @Override
    public ApplicationProtocolConfig.Protocol protocol() {
        return config.protocol();
    }

    @Override
    public ApplicationProtocolConfig.SelectorFailureBehavior selectorFailureBehavior() {
        return config.selectorFailureBehavior();
    }

    @Override
    public ApplicationProtocolConfig.SelectedListenerFailureBehavior selectedListenerFailureBehavior() {
        return config.selectedListenerFailureBehavior();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy