Package org.littleshoot.proxy.extras
Class HAProxyMessageEncoder
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelOutboundHandlerAdapter
-
- io.netty.handler.codec.MessageToByteEncoder<ProxyProtocolMessage>
-
- org.littleshoot.proxy.extras.HAProxyMessageEncoder
-
- All Implemented Interfaces:
ChannelHandler,ChannelOutboundHandler
public class HAProxyMessageEncoder extends MessageToByteEncoder<ProxyProtocolMessage>
Encodes an HAProxy proxy protocol header- See Also:
- Proxy Protocol Specification
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description HAProxyMessageEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidencode(ChannelHandlerContext ctx, ProxyProtocolMessage msg, ByteBuf out)private byte[]getHaProxyMessage(ProxyProtocolMessage msg)-
Methods inherited from class io.netty.handler.codec.MessageToByteEncoder
acceptOutboundMessage, allocateBuffer, isPreferDirect, write
-
Methods inherited from class io.netty.channel.ChannelOutboundHandlerAdapter
bind, close, connect, deregister, disconnect, flush, read
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.ChannelHandler
exceptionCaught, handlerAdded, handlerRemoved
-
-
-
-
Method Detail
-
encode
protected void encode(ChannelHandlerContext ctx, ProxyProtocolMessage msg, ByteBuf out)
- Specified by:
encodein classMessageToByteEncoder<ProxyProtocolMessage>
-
getHaProxyMessage
private byte[] getHaProxyMessage(ProxyProtocolMessage msg)
-
-