Top Fields Constructors Methods
io.vertx.core.net.impl

public Class HAProxyMessageCompletionHandler

extends MessageToMessageDecoder<HAProxyMessage>
Class Inheritance
Imports
io.netty.channel.Channel, .ChannelHandlerContext, io.netty.handler.codec.MessageToMessageDecoder, io.netty.handler.codec.haproxy.HAProxyMessage, .HAProxyProxiedProtocol, io.netty.handler.timeout.IdleState, .IdleStateEvent, io.netty.util.concurrent.Promise, io.vertx.core.impl.logging.Logger, .LoggerFactory, io.vertx.core.net.SocketAddress, java.io.IOException, java.util.List

Field Summary

Modifier and TypeField and Description
private static final Logger
private final Promise<Channel>
private static final boolean
public static final IOException

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean
canUseProxyProtocol(boolean requested)

private SocketAddress
createAddress(HAProxyProxiedProtocol protocol, String sourceAddress, int port)

protected void
decode(ChannelHandlerContext ctx, HAProxyMessage
the message to decode to an other one
msg
,
List<Object>
the List to which decoded messages should be added
out
)

Implements abstract io.netty.handler.codec.MessageToMessageDecoder.decode.

Decode from one message to an other.

public void
public void
Inherited from io.netty.handler.codec.MessageToMessageDecoder:
acceptInboundMessagechannelRead

Field Detail

logback to summary
private static final Logger log
promiseback to summary
private final Promise<Channel> promise
proxyProtocolCodecFoundback to summary
private static final boolean proxyProtocolCodecFound
UNSUPPORTED_PROTOCOL_EXCEPTIONback to summary
public static final IOException UNSUPPORTED_PROTOCOL_EXCEPTION

Constructor Detail

HAProxyMessageCompletionHandlerback to summary
public HAProxyMessageCompletionHandler(Promise<Channel> promise)

Method Detail

canUseProxyProtocolback to summary
public static boolean canUseProxyProtocol(boolean requested)
createAddressback to summary
private SocketAddress createAddress(HAProxyProxiedProtocol protocol, String sourceAddress, int port)
decodeback to summary
protected void decode(ChannelHandlerContext ctx, HAProxyMessage msg, List<Object> out)

Implements abstract io.netty.handler.codec.MessageToMessageDecoder.decode.

Doc from io.netty.handler.codec.MessageToMessageDecoder.decode.

Decode from one message to an other. This method will be called for each written message that can be handled by this decoder.

Parameters
ctx:ChannelHandlerContext

the ChannelHandlerContext which this MessageToMessageDecoder belongs to

msg:HAProxyMessage

the message to decode to an other one

out:List<Object>

the List to which decoded messages should be added

Annotations
@Override
exceptionCaughtback to summary
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)

Overrides io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught.

Implements io.netty.channel.ChannelInboundHandler.exceptionCaught, io.netty.channel.ChannelHandler.exceptionCaught.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.exceptionCaught.

Calls ChannelHandlerContext#fireExceptionCaught(Throwable) to forward to the next ChannelHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
userEventTriggeredback to summary
public void userEventTriggered(ChannelHandlerContext ctx, Object evt)

Overrides io.netty.channel.ChannelInboundHandlerAdapter.userEventTriggered.

Implements io.netty.channel.ChannelInboundHandler.userEventTriggered.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.userEventTriggered.

Calls ChannelHandlerContext#fireUserEventTriggered(Object) to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override