org.mockserver.codec.MockServerHttpServerCodec Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockserver-core Show documentation
Show all versions of mockserver-core Show documentation
Functionality used by all MockServer modules for matching and expectations
package org.mockserver.codec;
import io.netty.channel.CombinedChannelDuplexHandler;
import org.mockserver.configuration.Configuration;
import org.mockserver.logging.MockServerLogger;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.security.cert.Certificate;
/**
* @author jamesdbloom
*/
public class MockServerHttpServerCodec extends CombinedChannelDuplexHandler {
public MockServerHttpServerCodec(Configuration configuration, MockServerLogger mockServerLogger, boolean isSecure, SocketAddress socketAddress, Certificate[] clientCertificates) {
this(configuration, mockServerLogger, isSecure, clientCertificates, socketAddress instanceof InetSocketAddress ? ((InetSocketAddress) socketAddress).getPort() : null);
}
public MockServerHttpServerCodec(Configuration configuration, MockServerLogger mockServerLogger, boolean isSecure, Certificate[] clientCertificates, Integer port) {
init(new NettyHttpToMockServerHttpRequestDecoder(configuration, mockServerLogger, isSecure, clientCertificates, port), new MockServerHttpToNettyHttpResponseEncoder(mockServerLogger));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy