public final class MessageHandlerAcceptor extends RSocketMessageHandler implements java.util.function.Function<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)
.Modifier and Type | Field and Description |
---|---|
private MimeType |
defaultDataMimeType |
logger
Constructor and Description |
---|
MessageHandlerAcceptor() |
Modifier and Type | Method and Description |
---|---|
<any> |
accept(ConnectionSetupPayload setupPayload,
RSocket sendingRSocket) |
RSocket |
apply(RSocket sendingRSocket) |
private MessagingRSocket |
createRSocket(RSocket rsocket) |
void |
setDefaultDataMimeType(MimeType defaultDataMimeType)
Configure the default content type to use for data payloads.
|
afterPropertiesSet, getEncoders, getRSocketStrategies, handleNoMatch, initReturnValueHandlers, setEncoders, setRSocketStrategies
createExceptionMethodResolverFor, getConversionService, getDecoders, getDestination, getDirectLookupMappings, getHandlerPredicate, getMappingComparator, getMappingForMethod, getMatchingMapping, getPathMatcher, getValidator, handleMatch, initArgumentResolvers, initHandlerPredicate, setAutoDetectDisabled, setConversionService, setDecoders, setEmbeddedValueResolver, setHandlerPredicate, setHandlers, setPathMatcher, setValidator
detectHandlerMethods, getApplicationContext, getArgumentResolverConfigurer, getBeanName, getDestinationLookup, getHandlerMethods, getReactiveAdapterRegistry, getReturnValueHandlerConfigurer, handleMessage, registerExceptionHandlerAdvice, registerHandlerMethod, setApplicationContext, setArgumentResolverConfigurer, setBeanName, setReactiveAdapterRegistry, setReturnValueHandlerConfigurer
public 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 <any> accept(ConnectionSetupPayload setupPayload, RSocket sendingRSocket)
public RSocket apply(RSocket sendingRSocket)
apply
in interface java.util.function.Function<RSocket,RSocket>
private MessagingRSocket createRSocket(RSocket rsocket)