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.AbstractUnsafeNested classes/interfaces inherited from interface io.netty.channel.Channel
io.netty.channel.Channel.Unsafe -
Constructor Summary
ConstructorsConstructorDescriptionUserEventAwareEmbeddedChannel(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.ChannelConfigconfig()identity()protected SocketAddress<T> TReturn received user events from thisChannelReturns theQueuewhich 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, writeOutboundMethods 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, voidPromiseMethods inherited from class io.netty.util.DefaultAttributeMap
attr, hasAttrMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
configin interfaceio.netty.channel.Channel- Overrides:
configin classio.netty.channel.embedded.EmbeddedChannel
-
identity
- Specified by:
identityin interfaceIdentityChannel
-
localAddress0
- Overrides:
localAddress0in classio.netty.channel.embedded.EmbeddedChannel
-
userEvents
Returns theQueuewhich holds all the user events that were received by thisChannel. -
readEvent
public <T> T readEvent()Return received user events from thisChannel
-