public final class MessageHandlerAcceptor extends RSocketMessageHandler implements io.rsocket.SocketAcceptor, Function<io.rsocket.RSocket,io.rsocket.RSocket>
RSocketMessageHandler that can be plugged directly into
RSocket to receive connections either on the
client or on the
server
side. Requests are handled by delegating to the "super" AbstractMethodMessageHandler.handleMessage(Message).logger| Constructor and Description |
|---|
MessageHandlerAcceptor() |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<io.rsocket.RSocket> |
accept(io.rsocket.ConnectionSetupPayload setupPayload,
io.rsocket.RSocket sendingRSocket) |
io.rsocket.RSocket |
apply(io.rsocket.RSocket sendingRSocket) |
void |
setDefaultDataMimeType(MimeType defaultDataMimeType)
Configure the default content type to use for data payloads.
|
afterPropertiesSet, getEncoders, getRSocketStrategies, handleNoMatch, initReturnValueHandlers, setEncoders, setRSocketStrategiescreateExceptionMethodResolverFor, getConversionService, getDecoders, getDestination, getDirectLookupMappings, getHandlerPredicate, getMappingComparator, getMappingForMethod, getMatchingMapping, getPathMatcher, getValidator, handleMatch, initArgumentResolvers, initHandlerPredicate, setAutoDetectDisabled, setConversionService, setDecoders, setEmbeddedValueResolver, setHandlerPredicate, setHandlers, setPathMatcher, setValidatordetectHandlerMethods, getApplicationContext, getArgumentResolverConfigurer, getBeanName, getDestinationLookup, getHandlerMethods, getReactiveAdapterRegistry, getReturnValueHandlerConfigurer, handleMessage, registerExceptionHandlerAdvice, registerHandlerMethod, setApplicationContext, setArgumentResolverConfigurer, setBeanName, setReactiveAdapterRegistry, setReturnValueHandlerConfigurerpublic void setDefaultDataMimeType(@Nullable MimeType defaultDataMimeType)
By default this is not set. However a server acceptor will use the
content type from the ConnectionSetupPayload, so this is typically
required for clients but can also be used on servers as a fallback.
defaultDataMimeType - the MimeType to usepublic reactor.core.publisher.Mono<io.rsocket.RSocket> accept(io.rsocket.ConnectionSetupPayload setupPayload,
io.rsocket.RSocket sendingRSocket)
accept in interface io.rsocket.SocketAcceptor