Top Inners Fields Constructors Methods
reactor.netty5.resources

pack-priv final Class NewConnectionProvider

extends Object
implements ConnectionProvider
Class Inheritance
All Implemented Interfaces
reactor.netty5.resources.ConnectionProvider, reactor.core.Disposable
Imports
java.io.IOException, java.net.BindException, .InetSocketAddress, .SocketAddress, java.util.Objects, java.util.function.Supplier, io.netty5.channel.Channel, .ChannelInitializer, io.netty5.channel.socket.DomainSocketAddress, io.netty5.resolver.AddressResolverGroup, org.reactivestreams.Subscription, reactor.core.CoreSubscriber, .Disposable, reactor.core.publisher.Mono, .MonoSink, .Operators, reactor.netty5.ChannelBindException, .Connection, .ConnectionObserver, reactor.netty5.internal.util.Metrics, reactor.netty5.transport.AddressUtils, .TransportConfig, .TransportConnector, reactor.util.Logger, .Loggers, reactor.util.annotation.Nullable, reactor.util.context.Context

Authors
Stephane Maldini, Violeta Georgieva

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final NewConnectionProvider
pack-priv static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Mono<? extends Connection>
acquire(TransportConfig
the transport configuration
config
,
ConnectionObserver observer, Supplier<? extends SocketAddress>
the SocketAddress to connect to
remoteAddress
,
AddressResolverGroup<?>
the resolver which will resolve the address of the unresolved named address
resolverGroup
)

Implements reactor.netty5.resources.ConnectionProvider.acquire.

Return an existing or new Connection on subscribe.
public boolean
isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
public int
maxConnections()

Overrides default reactor.netty5.resources.ConnectionProvider.maxConnections.

Returns the maximum number of connections before starting pending
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final NewConnectionProvider INSTANCE
logback to summary
pack-priv static final Logger log

Constructor Detail

NewConnectionProviderback to summary
pack-priv NewConnectionProvider()

Method Detail

acquireback to summary
public Mono<? extends Connection> acquire(TransportConfig config, ConnectionObserver observer, Supplier<? extends SocketAddress> remoteAddress, AddressResolverGroup<?> resolverGroup)

Implements reactor.netty5.resources.ConnectionProvider.acquire.

Doc from reactor.netty5.resources.ConnectionProvider.acquire.

Return an existing or new Connection on subscribe.

Parameters
config:TransportConfig

the transport configuration

observer:ConnectionObserver

the ConnectionObserver

remoteAddress:Supplier<? extends SocketAddress>

the SocketAddress to connect to

resolverGroup:AddressResolverGroup<?>

the resolver which will resolve the address of the unresolved named address

Returns:Mono<? extends Connection>

an existing or new Mono of Connection

Annotations
@Override
isDisposedback to summary
public boolean isDisposed()

Overrides default reactor.core.Disposable.isDisposed.

Doc from reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.

Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.

Returns:boolean

true when there's a guarantee the resource or task is disposed.

Annotations
@Override
maxConnectionsback to summary
public int maxConnections()

Overrides default reactor.netty5.resources.ConnectionProvider.maxConnections.

Doc from reactor.netty5.resources.ConnectionProvider.maxConnections.

Returns the maximum number of connections before starting pending

Returns:int

the maximum number of connections before starting pending

Annotations
@Override
reactor.netty5.resources back to summary

pack-priv final Class NewConnectionProvider.DisposableConnect

extends Object
implements CoreSubscriber<Channel>, Disposable
Class Inheritance
  • java.lang.Object
  • reactor.netty5.resources.NewConnectionProvider.DisposableConnect
All Implemented Interfaces
reactor.core.Disposable, reactor.core.CoreSubscriber, org.reactivestreams.Subscriber

Field Summary

Modifier and TypeField and Description
pack-priv final Supplier<? extends SocketAddress>
pack-priv final Context
pack-priv final MonoSink<Connection>
pack-priv Subscription

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Context
currentContext()

Overrides default reactor.core.CoreSubscriber.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.
public void
dispose()

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
public void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public void
onError(Throwable
the throwable signaled
t
)

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public void
onNext(Channel
the element signaled
channel
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
public void
onSubscribe(Subscription
the Subscription that allows requesting data via Subscription#request(long)
s
)

Implements reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bindAddressback to summary
pack-priv final Supplier<? extends SocketAddress> bindAddress
currentContextback to summary
pack-priv final Context currentContext
sinkback to summary
pack-priv final MonoSink<Connection> sink
subscriptionback to summary
pack-priv Subscription subscription

Constructor Detail

DisposableConnectback to summary
pack-priv DisposableConnect(MonoSink<Connection> sink, Supplier<? extends SocketAddress> bindAddress)

Method Detail

currentContextback to summary
public Context currentContext()

Overrides default reactor.core.CoreSubscriber.currentContext.

Doc from reactor.core.CoreSubscriber.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.

Returns:Context

a resolved context or Context#empty()

Annotations
@Override
disposeback to summary
public void dispose()

Implements reactor.core.Disposable.dispose.

Doc from reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.

Implementations are required to make this method idempotent.

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
t:Throwable

the throwable signaled

Annotations
@Override
onNextback to summary
public void onNext(Channel channel)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
channel:Channel

the element signaled

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Subscription s)

Implements reactor.core.CoreSubscriber.onSubscribe.

Doc from reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long). Should further onNext related state modification occur, thread-safety will be required.

Note that an invalid request <= 0 will not produce an onError and will simply be ignored or reported through a debug-enabled reactor.util.Logger. Invoked after calling Publisher#subscribe(Subscriber).

No data will start flowing until Subscription#request(long) is invoked.

It is the responsibility of this Subscriber instance to call Subscription#request(long) whenever more data is wanted.

The Publisher will send notifications only in response to Subscription#request(long).

Parameters
s:Subscription

Doc from org.reactivestreams.Subscriber.onSubscribe.

the Subscription that allows requesting data via Subscription#request(long)

Annotations
@Override
reactor.netty5.resources back to summary

pack-priv final Class NewConnectionProvider.NewConnectionObserver

extends Object
implements ConnectionObserver
Class Inheritance
  • java.lang.Object
  • reactor.netty5.resources.NewConnectionProvider.NewConnectionObserver
All Implemented Interfaces
reactor.netty5.ConnectionObserver

Field Summary

Modifier and TypeField and Description
pack-priv final Context
pack-priv final ConnectionObserver
pack-priv final MonoSink<Connection>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Context
public void
onStateChange(Connection
the connection reference
connection
,
ConnectionObserver.State
the new State
newState
)

Implements reactor.netty5.ConnectionObserver.onStateChange.

React on connection state change (e.g. http request or response)
public void
onUncaughtException(Connection
the remote connection
c
,
Throwable
the failing cause
error
)

Overrides default reactor.netty5.ConnectionObserver.onUncaughtException.

React on connection fatal error, will request a disconnecting state change by default.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentContextback to summary
pack-priv final Context currentContext
obsback to summary
pack-priv final ConnectionObserver obs
sinkback to summary
pack-priv final MonoSink<Connection> sink

Constructor Detail

NewConnectionObserverback to summary
pack-priv NewConnectionObserver(MonoSink<Connection> sink, ConnectionObserver obs)

Method Detail

currentContextback to summary
public Context currentContext()

Overrides default reactor.netty5.ConnectionObserver.currentContext.

Doc from reactor.netty5.ConnectionObserver.currentContext.

Connection listener Context

Returns:Context

current Context or Context#empty()

Annotations
@Override
onStateChangeback to summary
public void onStateChange(Connection connection, ConnectionObserver.State newState)

Implements reactor.netty5.ConnectionObserver.onStateChange.

Doc from reactor.netty5.ConnectionObserver.onStateChange.

React on connection state change (e.g. http request or response)

Parameters
connection:Connection

the connection reference

newState:ConnectionObserver.State

the new State

Annotations
@Override
onUncaughtExceptionback to summary
public void onUncaughtException(Connection c, Throwable error)

Overrides default reactor.netty5.ConnectionObserver.onUncaughtException.

Doc from reactor.netty5.ConnectionObserver.onUncaughtException.

React on connection fatal error, will request a disconnecting state change by default. It should only catch exceptions that can't be consumed by a NettyInbound#receive subscriber.

Parameters
c:Connection

the remote connection

error:Throwable

the failing cause

Annotations
@Override