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 beans 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) |
Modifier and Type | Method and Description |
---|---|
void |
addEndpoint(IntegrationRSocketEndpoint endpoint)
Add an
IntegrationRSocketEndpoint for mapping and handling RSocket requests. |
void |
afterPropertiesSet() |
void |
afterSingletonsInstantiated() |
protected abstract void |
doStart() |
protected MimeType |
getDataMimeType() |
protected MimeType |
getMetadataMimeType() |
RSocketStrategies |
getRSocketStrategies() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setAutoStartup(boolean autoStartup) |
void |
setDataMimeType(MimeType dataMimeType)
Configure a
MimeType for data exchanging. |
void |
setEndpoints(IntegrationRSocketEndpoint... endpoints)
Configure
IntegrationRSocketEndpoint instances for mapping and handling requests. |
void |
setMetadataMimeType(MimeType metadataMimeType)
Configure a
MimeType for metadata exchanging. |
void |
setRSocketStrategies(RSocketStrategies rsocketStrategies)
Configure a
RSocketStrategies for data encoding/decoding. |
void |
start() |
void |
stop() |
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(@Nullable MimeType dataMimeType)
MimeType
for data exchanging.dataMimeType
- the MimeType
to use.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(RSocketStrategies rsocketStrategies)
RSocketStrategies
for data encoding/decoding.rsocketStrategies
- the RSocketStrategies
to use.public RSocketStrategies getRSocketStrategies()
public void setEndpoints(IntegrationRSocketEndpoint... endpoints)
IntegrationRSocketEndpoint
instances for mapping and handling requests.endpoints
- the IntegrationRSocketEndpoint
instances for handling inbound requests.addEndpoint(IntegrationRSocketEndpoint)
public 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()