public abstract class MessageOutboundEncoder<T extends AbstractRequest> extends io.netty.handler.codec.MessageToMessageEncoder<Envelope<T>>
Abstract MessageOutboundEncoder class.
| Modifier | Constructor and Description |
|---|---|
protected |
MessageOutboundEncoder()
Constructor for MessageOutboundEncoder.
|
protected |
MessageOutboundEncoder(Class<Envelope<T>> outboundMessageType)
Constructor for MessageOutboundEncoder.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
acceptMessage(Class<T> requestClass,
Envelope<T> envelope)
acceptMessage.
|
boolean |
acceptOutboundMessage(Object msg) |
protected void |
debug(String msg,
Object... args)
debug.
|
protected void |
encode(io.netty.channel.ChannelHandlerContext ctx,
Envelope<T> msg,
List<Object> out) |
protected abstract void |
encodeMessage(io.netty.channel.ChannelHandlerContext ctx,
Envelope<T> msg,
List<Object> out)
encodeMessage.
|
protected void |
error(String msg,
Object... args)
error.
|
protected NettyChannelContext |
getContext()
getContext.
|
protected Envelope<AbstractRequest> |
getRequest()
getRequest.
|
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
info(String msg,
Object... args)
info.
|
protected boolean |
isDebugEnabled()
isDebugEnabled.
|
protected void |
log(String msg,
BiConsumer<String,Object[]> level,
Object... args)
log.
|
protected void |
trace(String msg,
Object... args)
trace.
|
protected void |
warn(String msg,
Object... args)
warn.
|
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, readensureNotSharable, exceptionCaught, isSharableprotected MessageOutboundEncoder()
Constructor for MessageOutboundEncoder.
public final boolean acceptOutboundMessage(Object msg) throws Exception
acceptOutboundMessage in class io.netty.handler.codec.MessageToMessageEncoder<Envelope<T extends AbstractRequest>>Exceptionpublic void write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise)
throws Exception
write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.handler.codec.MessageToMessageEncoder<Envelope<T extends AbstractRequest>>Exceptionprotected final void encode(io.netty.channel.ChannelHandlerContext ctx,
Envelope<T> msg,
List<Object> out)
throws Exception
encode in class io.netty.handler.codec.MessageToMessageEncoder<Envelope<T extends AbstractRequest>>Exceptionprotected abstract void encodeMessage(io.netty.channel.ChannelHandlerContext ctx,
Envelope<T> msg,
List<Object> out)
throws Exception
encodeMessage.
protected boolean acceptMessage(Class<T> requestClass, Envelope<T> envelope) throws Exception
acceptMessage.
protected final void log(String msg, BiConsumer<String,Object[]> level, Object... args)
log.
msg - a String objectlevel - a BiConsumer objectargs - a Object objectpublic void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
handlerAdded in interface io.netty.channel.ChannelHandlerhandlerAdded in class io.netty.channel.ChannelHandlerAdapterExceptionpublic void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
handlerRemoved in interface io.netty.channel.ChannelHandlerhandlerRemoved in class io.netty.channel.ChannelHandlerAdapterExceptionprotected final Envelope<AbstractRequest> getRequest()
getRequest.
Envelope objectprotected final NettyChannelContext getContext()
getContext.
NettyChannelContext objectprotected final boolean isDebugEnabled()
isDebugEnabled.
Copyright © 2016–2024. All rights reserved.