Package io.servicetalk.transport.api
Interface ConnectionAcceptor
- All Superinterfaces:
AsyncCloseable
- All Known Subinterfaces:
InfluencerConnectionAcceptor
- All Known Implementing Classes:
DelegatingConnectionAcceptor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Deprecated.
A contract that defines the connection acceptance criterion.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConnectionAcceptorDeprecated.ACCEPT all connections. -
Method Summary
Modifier and TypeMethodDescriptionaccept(ConnectionContext context) Deprecated.Evaluate the passedConnectionContextto accept or reject.default ConnectionAcceptorappend(ConnectionAcceptor after) Deprecated.Returns a composedConnectionAcceptorthat first appliesthisConnectionAcceptor, and if this is successful then appliesafterConnectionAcceptor.default CompletableDeprecated.Used to close/shutdown a resource.Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsyncGracefully
-
Field Details
-
ACCEPT_ALL
Deprecated.ACCEPT all connections.
-
-
Method Details
-
accept
Deprecated.Evaluate the passedConnectionContextto accept or reject. If the returnedCompletableterminates successfully then the passedConnectionContextwill be accepted, otherwise rejected.- Parameters:
context- theConnectionContextto evaluate.- Returns:
Completable, which when terminated successfully, the passedConnectionContextis accepted, otherwise rejected.
-
append
Deprecated.Returns a composedConnectionAcceptorthat first appliesthisConnectionAcceptor, and if this is successful then appliesafterConnectionAcceptor.The order of execution of these filters are in order of append. If 3 filters are added as follows:
this.append(filter1).append(filter2).append(filter3)accepting a connection by a filter wrapped by this filter chain, the order of invocation of these filters will be:this ⇒ filter1 ⇒ filter2 ⇒ filter3- Parameters:
after- theConnectionAcceptorto apply afterthisConnectionAcceptoris applied- Returns:
- a composed
ConnectionAcceptorthat first appliesthisConnectionAcceptor, and if this is successful then appliesafterConnectionAcceptor.
-
closeAsync
Deprecated.Description copied from interface:AsyncCloseableUsed to close/shutdown a resource.- Specified by:
closeAsyncin interfaceAsyncCloseable- Returns:
- A
Completablethat is notified once the close is complete.
-
LateConnectionAcceptorinstead.