Package org.mockserver.mock.action.http
Class HttpActionHandler
- java.lang.Object
-
- org.mockserver.mock.action.http.HttpActionHandler
-
public class HttpActionHandler extends Object
- Author:
- jamesdbloom
-
-
Field Summary
Fields Modifier and Type Field Description static io.netty.util.AttributeKey<InetSocketAddress>REMOTE_SOCKET
-
Constructor Summary
Constructors Constructor Description HttpActionHandler(Configuration configuration, io.netty.channel.EventLoopGroup eventLoopGroup, HttpState httpStateHandler, List<ProxyConfiguration> proxyConfigurations, NettySslContextFactory nettySslContextFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NettyHttpClientgetHttpClient()static InetSocketAddressgetRemoteAddress(io.netty.channel.ChannelHandlerContext ctx)voidprocessAction(HttpRequest request, ResponseWriter responseWriter, io.netty.channel.ChannelHandlerContext ctx, Set<String> localAddresses, boolean proxyingRequest, boolean synchronous)voidprocessEarlyAction(HttpRequest request, Expectation expectation, io.netty.channel.ChannelHandlerContext ctx, ResponseWriter earlyResponseWriter, boolean synchronous)Dispatch an early-matched expectation before the request body has been received.static voidsetRemoteAddress(io.netty.channel.ChannelHandlerContext ctx, InetSocketAddress inetSocketAddress)
-
-
-
Field Detail
-
REMOTE_SOCKET
public static final io.netty.util.AttributeKey<InetSocketAddress> REMOTE_SOCKET
-
-
Constructor Detail
-
HttpActionHandler
public HttpActionHandler(Configuration configuration, io.netty.channel.EventLoopGroup eventLoopGroup, HttpState httpStateHandler, List<ProxyConfiguration> proxyConfigurations, NettySslContextFactory nettySslContextFactory)
-
-
Method Detail
-
processEarlyAction
public void processEarlyAction(HttpRequest request, Expectation expectation, io.netty.channel.ChannelHandlerContext ctx, ResponseWriter earlyResponseWriter, boolean synchronous)
Dispatch an early-matched expectation before the request body has been received. SupportsAction.Type.RESPONSEandAction.Type.ERRORonly; other action types are rejected byRequestMatchers.validateRespondBeforeBodyat expectation-add time.
-
processAction
public void processAction(HttpRequest request, ResponseWriter responseWriter, io.netty.channel.ChannelHandlerContext ctx, Set<String> localAddresses, boolean proxyingRequest, boolean synchronous)
-
getHttpClient
public NettyHttpClient getHttpClient()
-
getRemoteAddress
public static InetSocketAddress getRemoteAddress(io.netty.channel.ChannelHandlerContext ctx)
-
setRemoteAddress
public static void setRemoteAddress(io.netty.channel.ChannelHandlerContext ctx, InetSocketAddress inetSocketAddress)
-
-