//
// ========================================================================
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under
// the terms of the Eclipse Public License 2.0 which is available at
// https://www.eclipse.org/legal/epl-2.0
//
// This Source Code may also be made available under the following
// Secondary Licenses when the conditions for such availability set
// forth in the Eclipse Public License, v. 2.0 are satisfied:
// the Apache License v2.0 which is available at
// https://www.apache.org/licenses/LICENSE-2.0
//
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
// ========================================================================
//

package org.eclipse.jetty.io.ssl;

import javax.net.ssl.SSLEngine;

import org.eclipse.jetty.io.Connection;

public interface ALPNProcessor
{
    
Initializes this ALPNProcessor
Throws:
  • RuntimeException – if this processor is unavailable (e.g. missing dependencies or wrong JVM)
/** * Initializes this ALPNProcessor * * @throws RuntimeException if this processor is unavailable (e.g. missing dependencies or wrong JVM) */
public default void init() { }
Tests if this processor can be applied to the given SSLEngine.
Params:
  • sslEngine – the SSLEngine to check
Returns:true if the processor can be applied to the given SSLEngine
/** * Tests if this processor can be applied to the given SSLEngine. * * @param sslEngine the SSLEngine to check * @return true if the processor can be applied to the given SSLEngine */
public default boolean appliesTo(SSLEngine sslEngine) { return false; }
Configures the given SSLEngine and the given Connection for ALPN.
Params:
  • sslEngine – the SSLEngine to configure
  • connection – the Connection to configure
Throws:
/** * Configures the given SSLEngine and the given Connection for ALPN. * * @param sslEngine the SSLEngine to configure * @param connection the Connection to configure * @throws RuntimeException if this processor cannot be configured */
public default void configure(SSLEngine sslEngine, Connection connection) { }
Server-side interface used by ServiceLoader.
/** * Server-side interface used by ServiceLoader. */
public interface Server extends ALPNProcessor { }
Client-side interface used by ServiceLoader.
/** * Client-side interface used by ServiceLoader. */
public interface Client extends ALPNProcessor { } }