public class DefaultPooledChannel extends PooledChannel
A class that wraps an existing netty based Channel
representing a channel that has been acquired from a NettyChannelPool
.
Note that using ChannelFuture.channel()
does not return the actual PooledChannel
type but the underlying Channel
instance.
This can be a problem when accessing a PooledChannel
instance from a Collection
Modifier and Type | Method and Description |
---|---|
io.netty.buffer.ByteBufAllocator |
alloc() |
<T> io.netty.util.Attribute<T> |
attr(io.netty.util.AttributeKey<T> key) |
io.netty.channel.ChannelFuture |
bind(SocketAddress localAddress) |
io.netty.channel.ChannelFuture |
bind(SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
long |
bytesBeforeUnwritable() |
long |
bytesBeforeWritable() |
io.netty.channel.ChannelFuture |
close() |
io.netty.channel.ChannelFuture |
close(io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
closeFuture() |
int |
compareTo(@NotNull io.netty.channel.Channel o) |
io.netty.channel.ChannelConfig |
config() |
io.netty.channel.ChannelFuture |
connect(SocketAddress remoteAddress) |
io.netty.channel.ChannelFuture |
connect(SocketAddress remoteAddress,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
connect(SocketAddress remoteAddress,
SocketAddress localAddress) |
io.netty.channel.ChannelFuture |
connect(SocketAddress remoteAddress,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
deregister() |
io.netty.channel.ChannelFuture |
deregister(io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
disconnect() |
io.netty.channel.ChannelFuture |
disconnect(io.netty.channel.ChannelPromise promise) |
boolean |
equals(Object obj) |
io.netty.channel.EventLoop |
eventLoop() |
io.netty.channel.Channel |
flush() |
NettyChannelPool |
getChannelPool()
getChannelPool.
|
<T> boolean |
hasAttr(io.netty.util.AttributeKey<T> key) |
int |
hashCode() |
io.netty.channel.ChannelId |
id() |
boolean |
isActive() |
boolean |
isOpen() |
boolean |
isRegistered() |
boolean |
isWritable() |
SocketAddress |
localAddress() |
io.netty.channel.ChannelMetadata |
metadata() |
io.netty.channel.ChannelFuture |
newFailedFuture(Throwable cause) |
io.netty.channel.ChannelProgressivePromise |
newProgressivePromise() |
io.netty.channel.ChannelPromise |
newPromise() |
io.netty.channel.ChannelFuture |
newSucceededFuture() |
io.netty.channel.Channel |
parent() |
io.netty.channel.ChannelPipeline |
pipeline() |
io.netty.channel.Channel |
read() |
CompletableFuture<Void> |
release()
release.
|
SocketAddress |
remoteAddress() |
String |
toString() |
io.netty.channel.Channel.Unsafe |
unsafe() |
io.netty.channel.ChannelPromise |
voidPromise() |
io.netty.channel.ChannelFuture |
write(Object msg) |
io.netty.channel.ChannelFuture |
write(Object msg,
io.netty.channel.ChannelPromise promise) |
io.netty.channel.ChannelFuture |
writeAndFlush(Object msg) |
io.netty.channel.ChannelFuture |
writeAndFlush(Object msg,
io.netty.channel.ChannelPromise promise) |
addListener, removeListener
public io.netty.channel.ChannelId id()
public io.netty.channel.EventLoop eventLoop()
public io.netty.channel.Channel parent()
public io.netty.channel.ChannelConfig config()
public boolean isOpen()
public boolean isRegistered()
public boolean isActive()
public io.netty.channel.ChannelMetadata metadata()
public SocketAddress localAddress()
public SocketAddress remoteAddress()
public io.netty.channel.ChannelFuture closeFuture()
public boolean isWritable()
public long bytesBeforeUnwritable()
public long bytesBeforeWritable()
public io.netty.channel.Channel.Unsafe unsafe()
public io.netty.channel.ChannelPipeline pipeline()
public io.netty.buffer.ByteBufAllocator alloc()
public io.netty.channel.Channel read()
public io.netty.channel.Channel flush()
public io.netty.channel.ChannelFuture bind(SocketAddress localAddress)
public <T> io.netty.util.Attribute<T> attr(io.netty.util.AttributeKey<T> key)
public io.netty.channel.ChannelFuture connect(SocketAddress remoteAddress)
public <T> boolean hasAttr(io.netty.util.AttributeKey<T> key)
public io.netty.channel.ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress)
public io.netty.channel.ChannelFuture disconnect()
public io.netty.channel.ChannelFuture close()
public io.netty.channel.ChannelFuture deregister()
public io.netty.channel.ChannelFuture bind(SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
public io.netty.channel.ChannelFuture connect(SocketAddress remoteAddress, io.netty.channel.ChannelPromise promise)
public io.netty.channel.ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
public io.netty.channel.ChannelFuture disconnect(io.netty.channel.ChannelPromise promise)
public io.netty.channel.ChannelFuture close(io.netty.channel.ChannelPromise promise)
public io.netty.channel.ChannelFuture deregister(io.netty.channel.ChannelPromise promise)
public io.netty.channel.ChannelFuture write(Object msg)
public io.netty.channel.ChannelFuture write(Object msg, io.netty.channel.ChannelPromise promise)
public io.netty.channel.ChannelFuture writeAndFlush(Object msg, io.netty.channel.ChannelPromise promise)
public io.netty.channel.ChannelFuture writeAndFlush(Object msg)
public io.netty.channel.ChannelPromise newPromise()
public io.netty.channel.ChannelProgressivePromise newProgressivePromise()
public io.netty.channel.ChannelFuture newSucceededFuture()
public io.netty.channel.ChannelFuture newFailedFuture(Throwable cause)
public io.netty.channel.ChannelPromise voidPromise()
public int compareTo(@NotNull @NotNull io.netty.channel.Channel o)
public NettyChannelPool getChannelPool()
getChannelPool.
getChannelPool
in class PooledChannel
NettyChannelPool
objectpublic CompletableFuture<Void> release()
release.
release
in class PooledChannel
CompletableFuture
objectCopyright © 2016–2024. All rights reserved.