Class JmsConfigBuilder
- java.lang.Object
-
- io.helidon.messaging.ConnectorConfigBuilder
-
- io.helidon.messaging.connectors.jms.JmsConfigBuilder
-
public final class JmsConfigBuilder extends ConnectorConfigBuilder
Build Jms specific config.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JmsConfigBuilder
acknowledgeMode(AcknowledgeMode acknowledgeMode)
JMS acknowledgement mode.JmsConfigBuilder
destination(String destination)
Queue or topic name.JmsConfigBuilder
jndiInitialContextProperties(Map<String,String> initialContextProps)
Environment properties used for creating initial context java.naming.factory.initial, java.naming.provider.url.JmsConfigBuilder
jndiInitialFactory(Class<? extends InitialContextFactory> jndiInitialFactory)
JNDI initial factory.JmsConfigBuilder
jndiInitialFactory(String jndiInitialFactory)
JNDI initial factory.JmsConfigBuilder
jndiJmsFactory(String jndiJmsFactory)
JNDI name of JMS factory.JmsConfigBuilder
jndiProviderUrl(String jndiProviderUrl)
JNDI provider url.JmsConfigBuilder
messageSelector(String messageSelector)
JMS API message selector expression based on a subset of the SQL92.JmsConfigBuilder
namedFactory(String factoryName)
To select from manually configuredConnectionFactories
overJmsConnectorBuilder#connectionFactory()
.JmsConfigBuilder
password(String password)
Password used for creating JMS connection.JmsConfigBuilder
periodExecutions(long periodExecutions)
Period for executing poll cycles in millis.JmsConfigBuilder
pollTimeout(long pollTimeout)
Timeout for polling for next message in every poll cycle in millis.JmsConfigBuilder
property(String key, String value)
Add custom property.JmsConfigBuilder
queue(String destination)
Use supplied destination name andQUEUE
as type.JmsConfigBuilder
sessionGroupId(String sessionGroupId)
When multiple channels share same session-group-id, they share same JMS session.JmsConfigBuilder
topic(String destination)
Use supplied destination name andTOPIC
as type.JmsConfigBuilder
transacted(boolean transacted)
Indicates whether the session will use a local transaction.JmsConfigBuilder
type(Type type)
JmsConfigBuilder
username(String username)
User name used for creating JMS connection.-
Methods inherited from class io.helidon.messaging.ConnectorConfigBuilder
build
-
-
-
-
Method Detail
-
property
public JmsConfigBuilder property(String key, String value)
Add custom property.- Overrides:
property
in classConnectorConfigBuilder
- Parameters:
key
- property keyvalue
- property value- Returns:
- this builder
-
namedFactory
public JmsConfigBuilder namedFactory(String factoryName)
To select from manually configuredConnectionFactories
overJmsConnectorBuilder#connectionFactory()
.- Parameters:
factoryName
- connection factory name- Returns:
- this builder
-
acknowledgeMode
public JmsConfigBuilder acknowledgeMode(AcknowledgeMode acknowledgeMode)
JMS acknowledgement mode.- AUTO_ACKNOWLEDGE Acknowledges automatically after message reception over JMS api.
- CLIENT_ACKNOWLEDGE Message is acknowledged when
Message.ack()
is invoked either manually or byAcknowledgment
policy. - DUPS_OK_ACKNOWLEDGE Messages are acknowledged lazily which can result in duplicate messages being delivered.
- Type: enum
- Default: AUTO_ACKNOWLEDGE
- Valid Values: AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE
- Parameters:
acknowledgeMode
- AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE- Returns:
- this builder
-
transacted
public JmsConfigBuilder transacted(boolean transacted)
Indicates whether the session will use a local transaction.- Type: boolean
- Default: false
- Valid Values: true, false
- Parameters:
transacted
- true if so- Returns:
- this builder
-
username
public JmsConfigBuilder username(String username)
User name used for creating JMS connection.- Type: string
- Parameters:
username
- JMS connection user name- Returns:
- this builder
-
password
public JmsConfigBuilder password(String password)
Password used for creating JMS connection.- Type: string
- Parameters:
password
- JMS connection password- Returns:
- this builder
-
type
public JmsConfigBuilder type(Type type)
-
destination
public JmsConfigBuilder destination(String destination)
Queue or topic name.- Type: string
- Parameters:
destination
- queue or topic name- Returns:
- this builder
-
queue
public JmsConfigBuilder queue(String destination)
Use supplied destination name andQUEUE
as type.- Type: string
- Parameters:
destination
- queue name- Returns:
- this builder
-
topic
public JmsConfigBuilder topic(String destination)
Use supplied destination name andTOPIC
as type.- Type: string
- Parameters:
destination
- topic name- Returns:
- this builder
-
messageSelector
public JmsConfigBuilder messageSelector(String messageSelector)
JMS API message selector expression based on a subset of the SQL92. Expression can only access headers and properties, not the payload.- Type: string
- Example: NewsType = ’Sports’ OR NewsType = ’Opinion’
- Parameters:
messageSelector
- message selector expression- Returns:
- this builder
-
pollTimeout
public JmsConfigBuilder pollTimeout(long pollTimeout)
Timeout for polling for next message in every poll cycle in millis.- Type: milliseconds
- Default: 50
- Parameters:
pollTimeout
- timeout of polling for next message- Returns:
- this builder
-
periodExecutions
public JmsConfigBuilder periodExecutions(long periodExecutions)
Period for executing poll cycles in millis.- Type: milliseconds
- Default: 100
- Parameters:
periodExecutions
- period for executing poll cycles in millis- Returns:
- this builder
-
sessionGroupId
public JmsConfigBuilder sessionGroupId(String sessionGroupId)
When multiple channels share same session-group-id, they share same JMS session.- Type: string
- Parameters:
sessionGroupId
- identifier for channels sharing same JMS session- Returns:
- this builder
-
jndiJmsFactory
public JmsConfigBuilder jndiJmsFactory(String jndiJmsFactory)
JNDI name of JMS factory.- Type: string
- Parameters:
jndiJmsFactory
- JNDI name of JMS factory- Returns:
- this builder
-
jndiInitialFactory
public JmsConfigBuilder jndiInitialFactory(String jndiInitialFactory)
JNDI initial factory.- Type: string
- Parameters:
jndiInitialFactory
- JNDI initial factory- Returns:
- this builder
-
jndiInitialFactory
public JmsConfigBuilder jndiInitialFactory(Class<? extends InitialContextFactory> jndiInitialFactory)
JNDI initial factory.- Type: string
- Parameters:
jndiInitialFactory
- JNDI initial factory- Returns:
- this builder
-
jndiProviderUrl
public JmsConfigBuilder jndiProviderUrl(String jndiProviderUrl)
JNDI provider url.- Type: string
- Parameters:
jndiProviderUrl
- JNDI provider url- Returns:
- this builder
-
jndiInitialContextProperties
public JmsConfigBuilder jndiInitialContextProperties(Map<String,String> initialContextProps)
Environment properties used for creating initial context java.naming.factory.initial, java.naming.provider.url.- Type: string
- Parameters:
initialContextProps
- properties used for creating JNDI initial context- Returns:
- this builder
-
-