Package com.hazelcast.jet.pipeline
Class JmsSinkBuilder<T>
java.lang.Object
com.hazelcast.jet.pipeline.JmsSinkBuilder<T>
- Type Parameters:
T
- type of the items the sink accepts
public final class JmsSinkBuilder<T> extends Object
See
Sinks.jmsQueueBuilder(com.hazelcast.function.SupplierEx<javax.jms.ConnectionFactory>)
or Sinks.jmsTopicBuilder(com.hazelcast.function.SupplierEx<javax.jms.ConnectionFactory>)
.- Since:
- 3.0
-
Method Summary
Modifier and Type Method Description Sink<T>
build()
Creates and returns the JMSSink
with the supplied components.JmsSinkBuilder<T>
connectionFn(FunctionEx<javax.jms.ConnectionFactory,javax.jms.Connection> connectionFn)
Sets the function which creates the connection from connection factory.JmsSinkBuilder<T>
connectionParams(String username, String password)
Sets the connection parameters.JmsSinkBuilder<T>
destinationName(String destinationName)
Sets the name of the destination.JmsSinkBuilder<T>
messageFn(BiFunctionEx<javax.jms.Session,T,javax.jms.Message> messageFn)
Sets the function which creates the message from the item.
-
Method Details
-
connectionParams
Sets the connection parameters. IfconnectionFn
is provided, these parameters are ignored.- Parameters:
username
- the username, Default value isnull
password
- the password, Default value isnull
-
connectionFn
public JmsSinkBuilder<T> connectionFn(@Nonnull FunctionEx<javax.jms.ConnectionFactory,javax.jms.Connection> connectionFn)Sets the function which creates the connection from connection factory.If not provided, the builder creates a function which uses
ConnectionFactory#createConnection(username, password)
to create the connection. SeeconnectionParams(String, String)
. -
destinationName
Sets the name of the destination. -
messageFn
public JmsSinkBuilder<T> messageFn(BiFunctionEx<javax.jms.Session,T,javax.jms.Message> messageFn)Sets the function which creates the message from the item.If not provided, the builder creates a function which wraps
item.toString()
into aTextMessage
, unless the item is already an instance ofjavax.jms.Message
. -
build
Creates and returns the JMSSink
with the supplied components.
-