Package io.servicetalk.transport.api
Interface LateConnectionAcceptor
- All Superinterfaces:
AsyncCloseable
,ExecutionStrategyInfluencer<ConnectExecutionStrategy>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface LateConnectionAcceptor
extends ExecutionStrategyInfluencer<ConnectExecutionStrategy>, AsyncCloseable
Allows to accept or reject connections later in the connection setup stage.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Completable
accept
(ConnectionContext ctx) Accept or reject an incoming connection.accept
(ConnectionInfo info) Deprecated.default Completable
Used to close/shutdown a resource.default ConnectExecutionStrategy
Customize the offloading strategy for this acceptor.Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsyncGracefully
-
Method Details
-
accept
Deprecated.Implementaccept(ConnectionContext)
insteadAccept or reject an incoming connection.- Parameters:
info
-ConnectionInfo
to make an acceptance decision- Returns:
Completable.completed()
to accept, orCompletable.failed(Throwable)
to reject with the cause
-
accept
Accept or reject an incoming connection.- Parameters:
ctx
-ConnectionContext
with full information about the connection to make an acceptance decision and ability to monitor when it's closed- Returns:
Completable.completed()
to accept, orCompletable.failed(Throwable)
to reject with the cause
-
requiredOffloads
Customize the offloading strategy for this acceptor.- Specified by:
requiredOffloads
in interfaceExecutionStrategyInfluencer<ConnectExecutionStrategy>
- Returns:
- the
ConnectExecutionStrategy
for this acceptor.
-
closeAsync
Description copied from interface:AsyncCloseable
Used to close/shutdown a resource.- Specified by:
closeAsync
in interfaceAsyncCloseable
- Returns:
- A
Completable
that is notified once the close is complete.
-
accept(ConnectionContext)
instead