Class AbstractRSocketConnector
java.lang.Object
org.springframework.integration.rsocket.AbstractRSocketConnector
- All Implemented Interfaces:
Aware,DisposableBean,InitializingBean,SmartInitializingSingleton,ApplicationContextAware,Lifecycle,Phased,SmartLifecycle
- Direct Known Subclasses:
ClientRSocketConnector,ServerRSocketConnector
public abstract class AbstractRSocketConnector
extends Object
implements ApplicationContextAware, InitializingBean, DisposableBean, SmartInitializingSingleton, SmartLifecycle
A base connector container for common RSocket client and server functionality.
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.
- Since:
- 5.2
- Author:
- Artem Bilan
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.springframework.integration.rsocket.IntegrationRSocketMessageHandlerFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractRSocketConnector(org.springframework.integration.rsocket.IntegrationRSocketMessageHandler rSocketMessageHandler) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEndpoint(IntegrationRSocketEndpoint endpoint) Add anIntegrationRSocketEndpointfor mapping and handling RSocket requests.voidvoidprotected abstract voiddoStart()protected MimeTypeprotected MimeTypebooleanbooleanvoidsetApplicationContext(ApplicationContext applicationContext) voidsetAutoStartup(boolean autoStartup) voidsetDataMimeType(MimeType dataMimeType) Configure aMimeTypefor data exchanging.voidsetEndpoints(IntegrationRSocketEndpoint... endpoints) ConfigureIntegrationRSocketEndpointinstances for mapping and handling requests.voidsetMetadataMimeType(MimeType metadataMimeType) Configure aMimeTypefor metadata exchanging.voidsetRSocketStrategies(RSocketStrategies rsocketStrategies) Configure aRSocketStrategiesfor data encoding/decoding.voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.DisposableBean
destroyMethods inherited from interface org.springframework.context.SmartLifecycle
getPhase, stop
-
Field Details
-
rSocketMessageHandler
protected final org.springframework.integration.rsocket.IntegrationRSocketMessageHandler rSocketMessageHandler
-
-
Constructor Details
-
AbstractRSocketConnector
protected AbstractRSocketConnector(org.springframework.integration.rsocket.IntegrationRSocketMessageHandler rSocketMessageHandler)
-
-
Method Details
-
setDataMimeType
-
getDataMimeType
-
setMetadataMimeType
-
getMetadataMimeType
-
setRSocketStrategies
Configure aRSocketStrategiesfor data encoding/decoding.- Parameters:
rsocketStrategies- theRSocketStrategiesto use.
-
getRSocketStrategies
-
setEndpoints
ConfigureIntegrationRSocketEndpointinstances for mapping and handling requests.- Parameters:
endpoints- theIntegrationRSocketEndpointinstances for handling inbound requests.- See Also:
-
addEndpoint
Add anIntegrationRSocketEndpointfor mapping and handling RSocket requests.- Parameters:
endpoint- theIntegrationRSocketEndpointto map.
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceInitializingBean
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceSmartInitializingSingleton
-
setAutoStartup
public void setAutoStartup(boolean autoStartup) -
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceSmartLifecycle
-
start
-
doStart
protected abstract void doStart() -
stop
-
isRunning
-