protected abstract class AbstractChannel.AbstractUnsafe extends Object implements Channel.Unsafe
Unsafe
implementation which sub-classes must extend and use.Modifier | Constructor and Description |
---|---|
protected |
AbstractChannel.AbstractUnsafe() |
Modifier and Type | Method and Description |
---|---|
void |
beginRead()
Schedules a read operation that fills the inbound buffer of the first
ChannelInboundHandler in the
ChannelPipeline . |
void |
bind(SocketAddress localAddress,
ChannelPromise promise)
|
void |
close(ChannelPromise promise)
Close the
Channel of the ChannelPromise and notify the ChannelPromise once the
operation was complete. |
void |
closeForcibly()
Closes the
Channel immediately without firing any events. |
protected void |
closeIfClosed() |
void |
deregister(ChannelPromise promise)
Deregister the
Channel of the ChannelPromise from EventLoop and notify the
ChannelPromise once the operation was complete. |
void |
disconnect(ChannelPromise promise)
Disconnect the
Channel of the ChannelFuture and notify the ChannelPromise once the
operation was complete. |
protected boolean |
ensureOpen(ChannelPromise promise) |
void |
flush()
Flush out all write operations scheduled via
Channel.Unsafe.write(Object, ChannelPromise) . |
protected void |
flush0() |
SocketAddress |
localAddress()
Return the
SocketAddress to which is bound local or
null if none. |
ChannelOutboundBuffer |
outboundBuffer()
Returns the
ChannelOutboundBuffer of the Channel where the pending write requests are stored. |
void |
register(EventLoop eventLoop,
ChannelPromise promise)
Register the
Channel of the ChannelPromise with the EventLoop and notify
the ChannelFuture once the registration was complete. |
SocketAddress |
remoteAddress()
Return the
SocketAddress to which is bound remote or
null if none is bound yet. |
ChannelPromise |
voidPromise()
Return a special ChannelPromise which can be reused and passed to the operations in
Channel.Unsafe . |
void |
write(Object msg,
ChannelPromise promise)
Schedules a write operation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connect
public final ChannelOutboundBuffer outboundBuffer()
Channel.Unsafe
ChannelOutboundBuffer
of the Channel
where the pending write requests are stored.outboundBuffer
in interface Channel.Unsafe
public final SocketAddress localAddress()
Channel.Unsafe
SocketAddress
to which is bound local or
null
if none.localAddress
in interface Channel.Unsafe
public final SocketAddress remoteAddress()
Channel.Unsafe
SocketAddress
to which is bound remote or
null
if none is bound yet.remoteAddress
in interface Channel.Unsafe
public final void register(EventLoop eventLoop, ChannelPromise promise)
Channel.Unsafe
Channel
of the ChannelPromise
with the EventLoop
and notify
the ChannelFuture
once the registration was complete.register
in interface Channel.Unsafe
public final void bind(SocketAddress localAddress, ChannelPromise promise)
Channel.Unsafe
bind
in interface Channel.Unsafe
public final void disconnect(ChannelPromise promise)
Channel.Unsafe
Channel
of the ChannelFuture
and notify the ChannelPromise
once the
operation was complete.disconnect
in interface Channel.Unsafe
public final void close(ChannelPromise promise)
Channel.Unsafe
Channel
of the ChannelPromise
and notify the ChannelPromise
once the
operation was complete.close
in interface Channel.Unsafe
public final void closeForcibly()
Channel.Unsafe
Channel
immediately without firing any events. Probably only useful
when registration attempt failed.closeForcibly
in interface Channel.Unsafe
public final void deregister(ChannelPromise promise)
Channel.Unsafe
Channel
of the ChannelPromise
from EventLoop
and notify the
ChannelPromise
once the operation was complete.deregister
in interface Channel.Unsafe
public void beginRead()
Channel.Unsafe
ChannelInboundHandler
in the
ChannelPipeline
. If there's already a pending read operation, this method does nothing.beginRead
in interface Channel.Unsafe
public void write(Object msg, ChannelPromise promise)
Channel.Unsafe
write
in interface Channel.Unsafe
public void flush()
Channel.Unsafe
Channel.Unsafe.write(Object, ChannelPromise)
.flush
in interface Channel.Unsafe
protected void flush0()
public ChannelPromise voidPromise()
Channel.Unsafe
Channel.Unsafe
.
It will never be notified of a success or error and so is only a placeholder for operations
that take a ChannelPromise
as argument but for which you not want to get notified.voidPromise
in interface Channel.Unsafe
protected final boolean ensureOpen(ChannelPromise promise)
protected final void closeIfClosed()
Copyright © 2008–2013 The Netty Project. All rights reserved.