public abstract class AbstractRSocketConnector extends Object implements ApplicationContextAware, InitializingBean, DisposableBean, SmartInitializingSingleton, SmartLifecycle
It accepts IntegrationRSocketEndpoint
instances for mapping registration via an internal
IntegrationRSocketMessageHandler
or performs an auto-detection otherwise, when all bean are ready
in the application context.
IntegrationRSocketMessageHandler
Modifier and Type | Field and Description |
---|---|
protected org.springframework.integration.rsocket.IntegrationRSocketMessageHandler |
rSocketMessageHandler |
DEFAULT_PHASE
Modifier | Constructor and Description |
---|---|
protected |
AbstractRSocketConnector(org.springframework.integration.rsocket.IntegrationRSocketMessageHandler rSocketMessageHandler) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
destroy
getPhase, stop
protected final org.springframework.integration.rsocket.IntegrationRSocketMessageHandler rSocketMessageHandler
protected AbstractRSocketConnector(org.springframework.integration.rsocket.IntegrationRSocketMessageHandler rSocketMessageHandler)
public void setDataMimeType(MimeType dataMimeType)
MimeType
for data exchanging.dataMimeType
- the MimeType
to use.protected MimeType getDataMimeType()
public void setMetadataMimeType(MimeType metadataMimeType)
MimeType
for metadata exchanging.
Default to "message/x.rsocket.composite-metadata.v0"
.metadataMimeType
- the MimeType
to use.protected MimeType getMetadataMimeType()
public void setRSocketStrategies(org.springframework.messaging.rsocket.RSocketStrategies rsocketStrategies)
RSocketStrategies
for data encoding/decoding.rsocketStrategies
- the RSocketStrategies
to use.public org.springframework.messaging.rsocket.RSocketStrategies getRSocketStrategies()
public void setEndpoints(IntegrationRSocketEndpoint... endpoints)
IntegrationRSocketEndpoint
instances for mapping nad handling requests.endpoints
- the IntegrationRSocketEndpoint
instances for handling inbound requests.addEndpoint(IntegrationRSocketEndpoint)
public void setMetadataExtractor(org.springframework.messaging.rsocket.MetadataExtractor extractor)
MetadataExtractor
to extract the route and possibly
other metadata from the first payload of incoming requests.
By default this is a
DefaultMetadataExtractor
with the configured RSocketStrategies
(and decoders), extracting a route
from "message/x.rsocket.routing.v0"
or "text/plain"
metadata entries.
extractor
- the extractor to usepublic void addEndpoint(IntegrationRSocketEndpoint endpoint)
IntegrationRSocketEndpoint
for mapping and handling RSocket requests.endpoint
- the IntegrationRSocketEndpoint
to map.public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public void afterSingletonsInstantiated()
afterSingletonsInstantiated
in interface SmartInitializingSingleton
public void setAutoStartup(boolean autoStartup)
public boolean isAutoStartup()
isAutoStartup
in interface SmartLifecycle
protected abstract void doStart()