Class ZeroMqMessageHandlerSpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<ZeroMqMessageHandlerSpec, ReactiveMessageHandlerAdapter>
org.springframework.integration.dsl.MessageHandlerSpec<ZeroMqMessageHandlerSpec, ReactiveMessageHandlerAdapter>
org.springframework.integration.dsl.ReactiveMessageHandlerSpec<ZeroMqMessageHandlerSpec, ZeroMqMessageHandler>
org.springframework.integration.zeromq.dsl.ZeroMqMessageHandlerSpec
- All Implemented Interfaces:
- DisposableBean,- FactoryBean<ReactiveMessageHandlerAdapter>,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle,- ComponentsRegistration
public class ZeroMqMessageHandlerSpec
extends ReactiveMessageHandlerSpec<ZeroMqMessageHandlerSpec, ZeroMqMessageHandler>
The 
ReactiveMessageHandlerSpec extension for ZeroMqMessageHandler.- Since:
- 5.4
- Author:
- Artem Bilan, Alessio Matricardi
- 
Field SummaryFields inherited from class org.springframework.integration.dsl.ReactiveMessageHandlerSpecreactiveMessageHandlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpeclogger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context) Create an instance based on the providedZContext.protectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context, int port) Create an instance based on the providedZContextand binding port.protectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context, int port, org.zeromq.SocketType socketType) Create an instance based on the providedZContext, binding port andSocketType.protectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context, String connectUrl) Create an instance based on the providedZContextand connection string.protectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context, String connectUrl, org.zeromq.SocketType socketType) Create an instance based on the providedZContext, connection string andSocketType.protectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context, Supplier<String> connectUrl) Create an instance based on the providedZContextand connection string supplier.protectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context, Supplier<String> connectUrl, org.zeromq.SocketType socketType) Create an instance based on the providedZContext, connection string supplier andSocketType.protectedZeroMqMessageHandlerSpec(org.zeromq.ZContext context, org.zeromq.SocketType socketType) Create an instance based on the providedZContextandSocketType.
- 
Method SummaryModifier and TypeMethodDescriptionmessageConverter(MessageConverter messageConverter) Provide aMessageConverter(as an alternative tomessageMapper(org.springframework.integration.mapping.OutboundMessageMapper<byte[]>)) for converting a request message intobyte[]for sending into ZeroMq socket.messageMapper(OutboundMessageMapper<byte[]> messageMapper) Provide anOutboundMessageMapperto convert a request message intobyte[]for sending into ZeroMq socket.socketConfigurer(Consumer<org.zeromq.ZMQ.Socket> socketConfigurer) Provide aConsumerto configure a socket with arbitrary options, like security.Specify a topic theSocketType.PUBsocket is going to use for distributing messages into the subscriptions.topicExpression(String topicExpression) Specify a SpEL expression to evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.topicExpression(Expression topicExpression) Specify a SpEL expression to evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.topicFunction(Function<Message<?>, String> topicFunction) Specify aFunctionto evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.wrapTopic(boolean wrapTopic) Specify if the topic thatSocketType.PUBsocket is going to use for distributing messages into the subscriptions must be wrapped with an additional empty frame.Methods inherited from class org.springframework.integration.dsl.ReactiveMessageHandlerSpecgetComponentsToRegisterMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBeanisSingleton
- 
Constructor Details- 
ZeroMqMessageHandlerSpecCreate an instance based on the providedZContextand connection string.- Parameters:
- context- the- ZContextto use for creating sockets.
- connectUrl- the URL to connect the socket to.
 
- 
ZeroMqMessageHandlerSpecprotected ZeroMqMessageHandlerSpec(org.zeromq.ZContext context) Create an instance based on the providedZContext. The created socket will be bound to a random port.- Parameters:
- context- the- ZContextto use for creating sockets.
- Since:
- 6.4
 
- 
ZeroMqMessageHandlerSpecprotected ZeroMqMessageHandlerSpec(org.zeromq.ZContext context, int port) Create an instance based on the providedZContextand binding port.- Parameters:
- context- the- ZContextto use for creating sockets.
- port- the port to bind ZeroMq socket to over TCP.
- Since:
- 6.4
 
- 
ZeroMqMessageHandlerSpecCreate an instance based on the providedZContextand connection string supplier.- Parameters:
- context- the- ZContextto use for creating sockets.
- connectUrl- the supplier for URL to connect the socket to.
- Since:
- 5.5.9
 
- 
ZeroMqMessageHandlerSpecprotected ZeroMqMessageHandlerSpec(org.zeromq.ZContext context, String connectUrl, org.zeromq.SocketType socketType) Create an instance based on the providedZContext, connection string andSocketType.- Parameters:
- context- the- ZContextto use for creating sockets.
- connectUrl- the URL to connect the socket to.
- socketType- the- SocketTypeto use; only- SocketType.PAIR,- SocketType.PUBand- SocketType.PUSHare supported.
 
- 
ZeroMqMessageHandlerSpecprotected ZeroMqMessageHandlerSpec(org.zeromq.ZContext context, org.zeromq.SocketType socketType) Create an instance based on the providedZContextandSocketType. The created socket will be bound to a random port.- Parameters:
- context- the- ZContextto use for creating sockets.
- socketType- the- SocketTypeto use; only- SocketType.PAIR,- SocketType.PUBand- SocketType.PUSHare supported.
- Since:
- 6.4
 
- 
ZeroMqMessageHandlerSpecprotected ZeroMqMessageHandlerSpec(org.zeromq.ZContext context, int port, org.zeromq.SocketType socketType) Create an instance based on the providedZContext, binding port andSocketType.- Parameters:
- context- the- ZContextto use for creating sockets.
- port- the port to bind ZeroMq socket to over TCP.
- socketType- the- SocketTypeto use; only- SocketType.PAIR,- SocketType.PUBand- SocketType.PUSHare supported.
- Since:
- 6.4
 
- 
ZeroMqMessageHandlerSpecprotected ZeroMqMessageHandlerSpec(org.zeromq.ZContext context, Supplier<String> connectUrl, org.zeromq.SocketType socketType) Create an instance based on the providedZContext, connection string supplier andSocketType.- Parameters:
- context- the- ZContextto use for creating sockets.
- connectUrl- the supplier for URL to connect the socket to.
- socketType- the- SocketTypeto use; only- SocketType.PAIR,- SocketType.PUBand- SocketType.PUSHare supported.
 
 
- 
- 
Method Details- 
messageMapperProvide anOutboundMessageMapperto convert a request message intobyte[]for sending into ZeroMq socket.- Parameters:
- messageMapper- the- OutboundMessageMapperto use.
- Returns:
- the spec
 
- 
messageConverterProvide aMessageConverter(as an alternative tomessageMapper(org.springframework.integration.mapping.OutboundMessageMapper<byte[]>)) for converting a request message intobyte[]for sending into ZeroMq socket.- Parameters:
- messageConverter- the- MessageConverterto use.
- Returns:
- the spec
 
- 
socketConfigurerProvide aConsumerto configure a socket with arbitrary options, like security.- Parameters:
- socketConfigurer- the configurer for socket options.
- Returns:
- the spec
 
- 
topicSpecify a topic theSocketType.PUBsocket is going to use for distributing messages into the subscriptions. It is ignored for all otherSocketTypes supported.- Parameters:
- topic- the topic to use.
- Returns:
- the spec
 
- 
wrapTopicSpecify if the topic thatSocketType.PUBsocket is going to use for distributing messages into the subscriptions must be wrapped with an additional empty frame. It is ignored for all otherSocketTypes supported. This attribute is set totrueby default.- Parameters:
- wrapTopic- true if the topic must be wrapped with an additional empty frame.
- Returns:
- the spec
- Since:
- 6.2.6
 
- 
topicFunction
- 
topicExpressionSpecify a SpEL expression to evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.- Parameters:
- topicExpression- the expression to evaluate topic for publishing.
- Returns:
- the spec
 
- 
topicExpressionSpecify a SpEL expression to evaluate a topic aSocketType.PUBis going to use for distributing messages into the subscriptions.It is ignored for all otherSocketTypes supported.- Parameters:
- topicExpression- the expression to evaluate topic for publishing.
- Returns:
- the spec
 
 
-