Package io.netty.handler.codec.quic
Interface QuicChannel
-
- All Superinterfaces:
io.netty.util.AttributeMap,io.netty.channel.Channel,io.netty.channel.ChannelOutboundInvoker,Comparable<io.netty.channel.Channel>
public interface QuicChannel extends io.netty.channel.ChannelA QUICChannel.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default io.netty.channel.ChannelFuturebind(SocketAddress localAddress)default io.netty.channel.ChannelFuturebind(SocketAddress localAddress, io.netty.channel.ChannelPromise promise)default io.netty.channel.ChannelFutureclose()default io.netty.channel.ChannelFutureclose(boolean applicationClose, int error, io.netty.buffer.ByteBuf reason)Close theQuicChannelio.netty.channel.ChannelFutureclose(boolean applicationClose, int error, io.netty.buffer.ByteBuf reason, io.netty.channel.ChannelPromise promise)Close theQuicChanneldefault io.netty.channel.ChannelFutureclose(io.netty.channel.ChannelPromise promise)default io.netty.util.concurrent.Future<QuicConnectionPathStats>collectPathStats(int pathIdx)Collects statistics about the path of the connection and notifies theFutureonce done.io.netty.util.concurrent.Future<QuicConnectionPathStats>collectPathStats(int pathIdx, io.netty.util.concurrent.Promise<QuicConnectionPathStats> promise)Collects statistics about the path of the connection and notifies thePromiseonce done.default io.netty.util.concurrent.Future<QuicConnectionStats>collectStats()Collects statistics about the connection and notifies theFutureonce done.io.netty.util.concurrent.Future<QuicConnectionStats>collectStats(io.netty.util.concurrent.Promise<QuicConnectionStats> promise)Collects statistics about the connection and notifies thePromiseonce done.QuicChannelConfigconfig()Returns the configuration of this channel.default io.netty.channel.ChannelFutureconnect(SocketAddress remoteAddress)default io.netty.channel.ChannelFutureconnect(SocketAddress remoteAddress, io.netty.channel.ChannelPromise promise)default io.netty.channel.ChannelFutureconnect(SocketAddress remoteAddress, SocketAddress localAddress)default io.netty.channel.ChannelFutureconnect(SocketAddress remoteAddress, SocketAddress localAddress, io.netty.channel.ChannelPromise promise)default io.netty.util.concurrent.Future<QuicStreamChannel>createStream(QuicStreamType type, @Nullable io.netty.channel.ChannelHandler handler)Creates a stream that is using thisQuicChanneland notifies theFutureonce done.io.netty.util.concurrent.Future<QuicStreamChannel>createStream(QuicStreamType type, @Nullable io.netty.channel.ChannelHandler handler, io.netty.util.concurrent.Promise<QuicStreamChannel> promise)Creates a stream that is using thisQuicChanneland notifies thePromiseonce done.default io.netty.channel.ChannelFuturederegister()default io.netty.channel.ChannelFuturederegister(io.netty.channel.ChannelPromise promise)default io.netty.channel.ChannelFuturedisconnect()default io.netty.channel.ChannelFuturedisconnect(io.netty.channel.ChannelPromise promise)QuicChannelflush()booleanisTimedOut()Returnstrueif the connection was closed because of idle timeout.@Nullable QuicConnectionAddresslocalAddress()Returns the localQuicConnectionAddress.@Nullable SocketAddresslocalSocketAddress()Returns the localSocketAddressof the underlying transport that received the data.static QuicChannelBootstrapnewBootstrap(io.netty.channel.Channel channel)Creates a newQuicChannelBootstrapthat can be used to create and connect newQuicChannels to endpoints using the givenChannelas transport layer.default io.netty.channel.ChannelFuturenewFailedFuture(Throwable cause)default io.netty.channel.ChannelProgressivePromisenewProgressivePromise()default io.netty.channel.ChannelPromisenewPromise()default QuicStreamChannelBootstrapnewStreamBootstrap()Returns a newQuicStreamChannelBootstrapwhich makes it easy to bootstrap newQuicStreamChannels with custom options and attributes.default io.netty.channel.ChannelFuturenewSucceededFuture()longpeerAllowedStreams(QuicStreamType type)Returns the number of streams that can be created before stream creation will fail withQuicTransportError.STREAM_LIMIT_ERRORerror.@Nullable QuicTransportParameterspeerTransportParameters()Returns theQuicTransportParametersof the peer once received, ornullif not known yet.QuicChannelread()@Nullable QuicConnectionAddressremoteAddress()Returns the remoteQuicConnectionAddress.@Nullable SocketAddressremoteSocketAddress()Returns the remoteSocketAddressof the underlying transport to which the data is sent.@Nullable SSLEnginesslEngine()Returns the usedSSLEngineornullif none is used (yet).default io.netty.channel.ChannelPromisevoidPromise()default io.netty.channel.ChannelFuturewrite(Object msg)default io.netty.channel.ChannelFuturewrite(Object msg, io.netty.channel.ChannelPromise promise)default io.netty.channel.ChannelFuturewriteAndFlush(Object msg)default io.netty.channel.ChannelFuturewriteAndFlush(Object msg, io.netty.channel.ChannelPromise promise)-
Methods inherited from interface io.netty.channel.Channel
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, getOption, id, isActive, isOpen, isRegistered, isWritable, metadata, parent, pipeline, setOption, unsafe
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Method Detail
-
bind
default io.netty.channel.ChannelFuture bind(SocketAddress localAddress)
- Specified by:
bindin interfaceio.netty.channel.Channel- Specified by:
bindin interfaceio.netty.channel.ChannelOutboundInvoker
-
connect
default io.netty.channel.ChannelFuture connect(SocketAddress remoteAddress)
- Specified by:
connectin interfaceio.netty.channel.Channel- Specified by:
connectin interfaceio.netty.channel.ChannelOutboundInvoker
-
connect
default io.netty.channel.ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress)
- Specified by:
connectin interfaceio.netty.channel.Channel- Specified by:
connectin interfaceio.netty.channel.ChannelOutboundInvoker
-
disconnect
default io.netty.channel.ChannelFuture disconnect()
- Specified by:
disconnectin interfaceio.netty.channel.Channel- Specified by:
disconnectin interfaceio.netty.channel.ChannelOutboundInvoker
-
close
default io.netty.channel.ChannelFuture close()
- Specified by:
closein interfaceio.netty.channel.Channel- Specified by:
closein interfaceio.netty.channel.ChannelOutboundInvoker
-
deregister
default io.netty.channel.ChannelFuture deregister()
- Specified by:
deregisterin interfaceio.netty.channel.Channel- Specified by:
deregisterin interfaceio.netty.channel.ChannelOutboundInvoker
-
bind
default io.netty.channel.ChannelFuture bind(SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
- Specified by:
bindin interfaceio.netty.channel.Channel- Specified by:
bindin interfaceio.netty.channel.ChannelOutboundInvoker
-
connect
default io.netty.channel.ChannelFuture connect(SocketAddress remoteAddress, io.netty.channel.ChannelPromise promise)
- Specified by:
connectin interfaceio.netty.channel.Channel- Specified by:
connectin interfaceio.netty.channel.ChannelOutboundInvoker
-
connect
default io.netty.channel.ChannelFuture connect(SocketAddress remoteAddress, SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
- Specified by:
connectin interfaceio.netty.channel.Channel- Specified by:
connectin interfaceio.netty.channel.ChannelOutboundInvoker
-
disconnect
default io.netty.channel.ChannelFuture disconnect(io.netty.channel.ChannelPromise promise)
- Specified by:
disconnectin interfaceio.netty.channel.Channel- Specified by:
disconnectin interfaceio.netty.channel.ChannelOutboundInvoker
-
close
default io.netty.channel.ChannelFuture close(io.netty.channel.ChannelPromise promise)
- Specified by:
closein interfaceio.netty.channel.Channel- Specified by:
closein interfaceio.netty.channel.ChannelOutboundInvoker
-
deregister
default io.netty.channel.ChannelFuture deregister(io.netty.channel.ChannelPromise promise)
- Specified by:
deregisterin interfaceio.netty.channel.Channel- Specified by:
deregisterin interfaceio.netty.channel.ChannelOutboundInvoker
-
write
default io.netty.channel.ChannelFuture write(Object msg)
- Specified by:
writein interfaceio.netty.channel.Channel- Specified by:
writein interfaceio.netty.channel.ChannelOutboundInvoker
-
write
default io.netty.channel.ChannelFuture write(Object msg, io.netty.channel.ChannelPromise promise)
- Specified by:
writein interfaceio.netty.channel.Channel- Specified by:
writein interfaceio.netty.channel.ChannelOutboundInvoker
-
writeAndFlush
default io.netty.channel.ChannelFuture writeAndFlush(Object msg, io.netty.channel.ChannelPromise promise)
- Specified by:
writeAndFlushin interfaceio.netty.channel.Channel- Specified by:
writeAndFlushin interfaceio.netty.channel.ChannelOutboundInvoker
-
writeAndFlush
default io.netty.channel.ChannelFuture writeAndFlush(Object msg)
- Specified by:
writeAndFlushin interfaceio.netty.channel.Channel- Specified by:
writeAndFlushin interfaceio.netty.channel.ChannelOutboundInvoker
-
newPromise
default io.netty.channel.ChannelPromise newPromise()
- Specified by:
newPromisein interfaceio.netty.channel.Channel- Specified by:
newPromisein interfaceio.netty.channel.ChannelOutboundInvoker
-
newProgressivePromise
default io.netty.channel.ChannelProgressivePromise newProgressivePromise()
- Specified by:
newProgressivePromisein interfaceio.netty.channel.Channel- Specified by:
newProgressivePromisein interfaceio.netty.channel.ChannelOutboundInvoker
-
newSucceededFuture
default io.netty.channel.ChannelFuture newSucceededFuture()
- Specified by:
newSucceededFuturein interfaceio.netty.channel.Channel- Specified by:
newSucceededFuturein interfaceio.netty.channel.ChannelOutboundInvoker
-
newFailedFuture
default io.netty.channel.ChannelFuture newFailedFuture(Throwable cause)
- Specified by:
newFailedFuturein interfaceio.netty.channel.Channel- Specified by:
newFailedFuturein interfaceio.netty.channel.ChannelOutboundInvoker
-
voidPromise
default io.netty.channel.ChannelPromise voidPromise()
- Specified by:
voidPromisein interfaceio.netty.channel.Channel- Specified by:
voidPromisein interfaceio.netty.channel.ChannelOutboundInvoker
-
read
QuicChannel read()
- Specified by:
readin interfaceio.netty.channel.Channel- Specified by:
readin interfaceio.netty.channel.ChannelOutboundInvoker
-
flush
QuicChannel flush()
- Specified by:
flushin interfaceio.netty.channel.Channel- Specified by:
flushin interfaceio.netty.channel.ChannelOutboundInvoker
-
config
QuicChannelConfig config()
Returns the configuration of this channel.- Specified by:
configin interfaceio.netty.channel.Channel
-
sslEngine
@Nullable @Nullable SSLEngine sslEngine()
Returns the usedSSLEngineornullif none is used (yet).- Returns:
- the engine.
-
peerAllowedStreams
long peerAllowedStreams(QuicStreamType type)
Returns the number of streams that can be created before stream creation will fail withQuicTransportError.STREAM_LIMIT_ERRORerror.- Parameters:
type- the stream type.- Returns:
- the number of streams left.
-
isTimedOut
boolean isTimedOut()
Returnstrueif the connection was closed because of idle timeout.- Returns:
trueif the connection was closed because of idle timeout,false.
-
peerTransportParameters
@Nullable @Nullable QuicTransportParameters peerTransportParameters()
Returns theQuicTransportParametersof the peer once received, ornullif not known yet.- Returns:
- peerTransportParams.
-
localAddress
@Nullable @Nullable QuicConnectionAddress localAddress()
Returns the localQuicConnectionAddress. This address might change over the life-time of the channel.- Specified by:
localAddressin interfaceio.netty.channel.Channel- Returns:
- local the local
QuicConnectionAddressornullif none is assigned yet, or assigned anymore.
-
remoteAddress
@Nullable @Nullable QuicConnectionAddress remoteAddress()
Returns the remoteQuicConnectionAddress. This address might change over the life-time of the channel.- Specified by:
remoteAddressin interfaceio.netty.channel.Channel- Returns:
- remote the remote
QuicConnectionAddressornullif none is assigned yet, or assigned anymore.
-
localSocketAddress
@Nullable @Nullable SocketAddress localSocketAddress()
Returns the localSocketAddressof the underlying transport that received the data. This address might change over the life-time of the channel.- Returns:
- local the local
SocketAddressof the underlying transport ornullif none is assigned yet, or assigned anymore.
-
remoteSocketAddress
@Nullable @Nullable SocketAddress remoteSocketAddress()
Returns the remoteSocketAddressof the underlying transport to which the data is sent. This address might change over the life-time of the channel.- Returns:
- local the remote
SocketAddressof the underlying transport ornullif none is assigned yet, or assigned anymore.
-
createStream
default io.netty.util.concurrent.Future<QuicStreamChannel> createStream(QuicStreamType type, @Nullable @Nullable io.netty.channel.ChannelHandler handler)
Creates a stream that is using thisQuicChanneland notifies theFutureonce done. TheChannelHandler(if notnull) is added to theChannelPipelineof theQuicStreamChannelautomatically.- Parameters:
type- theQuicStreamTypeof theQuicStreamChannel.handler- theChannelHandlerthat will be added to theQuicStreamChannelsChannelPipelineduring the stream creation.- Returns:
- the
Futurethat will be notified once the operation completes.
-
createStream
io.netty.util.concurrent.Future<QuicStreamChannel> createStream(QuicStreamType type, @Nullable @Nullable io.netty.channel.ChannelHandler handler, io.netty.util.concurrent.Promise<QuicStreamChannel> promise)
Creates a stream that is using thisQuicChanneland notifies thePromiseonce done. TheChannelHandler(if notnull) is added to theChannelPipelineof theQuicStreamChannelautomatically.- Parameters:
type- theQuicStreamTypeof theQuicStreamChannel.handler- theChannelHandlerthat will be added to theQuicStreamChannelsChannelPipelineduring the stream creation.promise- theChannelPromisethat will be notified once the operation completes.- Returns:
- the
Futurethat will be notified once the operation completes.
-
newStreamBootstrap
default QuicStreamChannelBootstrap newStreamBootstrap()
Returns a newQuicStreamChannelBootstrapwhich makes it easy to bootstrap newQuicStreamChannels with custom options and attributes. For simpler use-cases you may want to consider usingcreateStream(QuicStreamType, ChannelHandler)orcreateStream(QuicStreamType, ChannelHandler, Promise)directly.- Returns:
QuicStreamChannelBootstrapthat can be used to bootstrap aQuicStreamChannel.
-
close
default io.netty.channel.ChannelFuture close(boolean applicationClose, int error, io.netty.buffer.ByteBuf reason)Close theQuicChannel- Parameters:
applicationClose-trueif an application close should be used,falseif a normal close should be used.error- the application error number, or0if no special error should be signaled.reason- the reason for the closure (which may be an emptyByteBuf.- Returns:
- the future that is notified.
-
close
io.netty.channel.ChannelFuture close(boolean applicationClose, int error, io.netty.buffer.ByteBuf reason, io.netty.channel.ChannelPromise promise)Close theQuicChannel- Parameters:
applicationClose-trueif an application close should be used,falseif a normal close should be used.error- the application error number, or0if no special error should be signaled.reason- the reason for the closure (which may be an emptyByteBuf.promise- theChannelPromisethat will be notified.- Returns:
- the future that is notified.
-
collectStats
default io.netty.util.concurrent.Future<QuicConnectionStats> collectStats()
Collects statistics about the connection and notifies theFutureonce done.- Returns:
- the
Futurethat is notified once the stats were collected.
-
collectStats
io.netty.util.concurrent.Future<QuicConnectionStats> collectStats(io.netty.util.concurrent.Promise<QuicConnectionStats> promise)
Collects statistics about the connection and notifies thePromiseonce done.- Parameters:
promise- theChannelPromisethat is notified once the stats were collected.- Returns:
- the
Futurethat is notified once the stats were collected.
-
collectPathStats
default io.netty.util.concurrent.Future<QuicConnectionPathStats> collectPathStats(int pathIdx)
Collects statistics about the path of the connection and notifies theFutureonce done.- Returns:
- the
Futurethat is notified once the stats were collected.
-
collectPathStats
io.netty.util.concurrent.Future<QuicConnectionPathStats> collectPathStats(int pathIdx, io.netty.util.concurrent.Promise<QuicConnectionPathStats> promise)
Collects statistics about the path of the connection and notifies thePromiseonce done.- Parameters:
promise- theChannelPromisethat is notified once the stats were collected.- Returns:
- the
Futurethat is notified once the stats were collected.
-
newBootstrap
static QuicChannelBootstrap newBootstrap(io.netty.channel.Channel channel)
Creates a newQuicChannelBootstrapthat can be used to create and connect newQuicChannels to endpoints using the givenChannelas transport layer.- Parameters:
channel- theChannelthat is used as transport layer.- Returns:
QuicChannelBootstrapthat can be used to bootstrap a client sideQuicChannel.
-
-