Package org.drasyl.channel.embedded
Class UserEventAwareEmbeddedChannel
java.lang.Object
io.netty.util.DefaultAttributeMap
io.netty.channel.AbstractChannel
io.netty.channel.embedded.EmbeddedChannel
org.drasyl.channel.embedded.UserEventAwareEmbeddedChannel
- All Implemented Interfaces:
io.netty.channel.Channel
,io.netty.channel.ChannelOutboundInvoker
,io.netty.util.AttributeMap
,Comparable<io.netty.channel.Channel>
,IdentityChannel
public class UserEventAwareEmbeddedChannel
extends io.netty.channel.embedded.EmbeddedChannel
implements IdentityChannel
A
EmbeddedChannel
that record all received user events.-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty.channel.AbstractChannel
io.netty.channel.AbstractChannel.AbstractUnsafe
Nested classes/interfaces inherited from interface io.netty.channel.Channel
io.netty.channel.Channel.Unsafe
-
Constructor Summary
ConstructorDescriptionUserEventAwareEmbeddedChannel
(io.netty.channel.ChannelConfig config, io.netty.channel.ChannelHandler... handlers) UserEventAwareEmbeddedChannel
(io.netty.channel.ChannelConfig config, SocketAddress localAddress) UserEventAwareEmbeddedChannel
(io.netty.channel.ChannelConfig config, SocketAddress localAddress, io.netty.channel.ChannelHandler... handlers) UserEventAwareEmbeddedChannel
(io.netty.channel.ChannelHandler... handlers) UserEventAwareEmbeddedChannel
(SocketAddress localAddress, io.netty.channel.ChannelHandler... handlers) -
Method Summary
Modifier and TypeMethodDescriptionio.netty.channel.ChannelConfig
config()
identity()
protected SocketAddress
<T> T
Return received user events from thisChannel
Returns theQueue
which holds all the user events that were received by thisChannel
.Methods inherited from class io.netty.channel.embedded.EmbeddedChannel
advanceTimeBy, bind, bind, checkException, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBeginRead, doBind, doClose, doDisconnect, doRegister, doWrite, ensureOpen, finish, finishAndReleaseAll, flush, flushInbound, flushOutbound, freezeTime, handleInboundMessage, handleOutboundMessage, hasPendingTasks, inboundMessages, isActive, isCompatible, isOpen, lastInboundBuffer, lastOutboundBuffer, metadata, newChannelPipeline, newUnsafe, outboundMessages, read, readInbound, readOutbound, register, releaseInbound, releaseOutbound, remoteAddress0, runPendingTasks, runScheduledPendingTasks, unfreezeTime, unsafe, write, write, writeAndFlush, writeAndFlush, writeInbound, writeOneInbound, writeOneInbound, writeOneOutbound, writeOneOutbound, writeOutbound
Methods inherited from class io.netty.channel.AbstractChannel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, compareTo, doDeregister, doShutdownOutput, equals, eventLoop, filterOutboundMessage, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, maxMessagesPerWrite, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, remoteAddress, toString, validateFileRegion, voidPromise
Methods inherited from class io.netty.util.DefaultAttributeMap
attr, hasAttr
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.netty.util.AttributeMap
attr, hasAttr
-
Constructor Details
-
UserEventAwareEmbeddedChannel
public UserEventAwareEmbeddedChannel(io.netty.channel.ChannelConfig config, SocketAddress localAddress, io.netty.channel.ChannelHandler... handlers) -
UserEventAwareEmbeddedChannel
public UserEventAwareEmbeddedChannel(io.netty.channel.ChannelConfig config, SocketAddress localAddress) -
UserEventAwareEmbeddedChannel
public UserEventAwareEmbeddedChannel(SocketAddress localAddress, io.netty.channel.ChannelHandler... handlers) -
UserEventAwareEmbeddedChannel
public UserEventAwareEmbeddedChannel(io.netty.channel.ChannelConfig config, io.netty.channel.ChannelHandler... handlers) -
UserEventAwareEmbeddedChannel
public UserEventAwareEmbeddedChannel(io.netty.channel.ChannelHandler... handlers)
-
-
Method Details
-
config
public io.netty.channel.ChannelConfig config()- Specified by:
config
in interfaceio.netty.channel.Channel
- Overrides:
config
in classio.netty.channel.embedded.EmbeddedChannel
-
identity
- Specified by:
identity
in interfaceIdentityChannel
-
localAddress0
- Overrides:
localAddress0
in classio.netty.channel.embedded.EmbeddedChannel
-
userEvents
Returns theQueue
which holds all the user events that were received by thisChannel
. -
readEvent
public <T> T readEvent()Return received user events from thisChannel
-