flex.messaging.services.messaging.adapters
Class JMSSettings

java.lang.Object
  extended by flex.messaging.services.messaging.adapters.JMSSettings

public class JMSSettings
extends Object

Settings for JMSAdapter.


Nested Class Summary
static class JMSSettings.DeliverySettings
          A static inner class for delivery settings.
 
Constructor Summary
JMSSettings()
          Creates a JMSSettings instance with the following default values: acknowledge mode of AUTO_ACKNOWLEDGE, delivery mode of DEFAULT_DELIVERY_MODE, destination type of Topic, and default delivery setting.
 
Method Summary
 String getAcknowledgeMode()
          Returns the acknowledge-mode property.
 String getConnectionFactory()
          Returns the connection-factory property.
 String getConnectionPassword()
          Returns the connection password used while creating JMS connections.
 String getConnectionUsername()
          Returns the connection username used while creating JMS connections.
 String getDeliveryMode()
          Returns the delivery-mode property.
 JMSSettings.DeliverySettings getDeliverySettings()
          Returns the delivery-settings property.
 String getDestinationJNDIName()
          Returns the destination-jndi-name property.
 String getDestinationName()
          Deprecated.  
 String getDestinationType()
          Returns the destination-type property.
 Hashtable getInitialContextEnvironment()
          Returns the initial-context-environment property.
 int getMaxProducers()
          Returns the max-producers property.
 int getMessagePriority()
          Returns the message-priority property.
 String getMessageType()
          Returns the message-type property.
 boolean isPreserveJMSHeaders()
          Returns the preserve-jms-headers property.
 boolean isTransactedSessions()
          Deprecated.  
 void setAcknowledgeMode(String mode)
          Sets the acknowledge-mode property which is the message acknowledgement mode for the JMS adapter.
 void setConnectionFactory(String factory)
          Sets the connection-factory property which is the name of the JMS connection factory in JNDI.
 void setConnectionPassword(String connectionPassword)
          Sets the connection password used while creating JMS connections.
 void setConnectionUsername(String connectionUsername)
          Sets the connection username used while creating JMS connections.
 void setDeliveryMode(String mode)
          Sets the delivery-mode property which is the JMS DeliveryMode for producers.
 void setDeliverySettings(JMSSettings.DeliverySettings deliverySettings)
          Sets the delivery-settings property.
 void setDestinationJNDIName(String name)
          Sets the destination-jndi-name property which is the name of the destination in JNDI.
 void setDestinationName(String name)
          Deprecated.  
 void setDestinationType(String type)
          Sets the destination-type property which determines whether the adapter is performing topic (pub/sub) or queue (point-to-point) messaging.
 void setDurableConsumers(boolean durable)
          Sets whethers consumers are durable or not.
 void setInitialContextEnvironment(Hashtable env)
          Sets the initial-context-environment property.
 void setMaxProducers(int value)
          Sets the max-producers property which is the maximum number of producer proxies that this destination should use when communicating with the JMS Server.
 void setMessagePriority(int priority)
          Sets the message-priority property which is the JMS priority for messages sent by Flex producers.
 void setMessageType(String type)
          Sets the message-type property which is the javax.jms.Message type which the adapter should use for the destination.
 void setPreserveJMSHeaders(boolean preserveJMSHeaders)
          Sets the preserve-jms-headers property.
 void setTransactedSessions(boolean mode)
          Deprecated.  
 boolean useDurableConsumers()
          Returns whether consumers are durable or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSSettings

public JMSSettings()
Creates a JMSSettings instance with the following default values: acknowledge mode of AUTO_ACKNOWLEDGE, delivery mode of DEFAULT_DELIVERY_MODE, destination type of Topic, and default delivery setting.

Method Detail

getAcknowledgeMode

public String getAcknowledgeMode()
Returns the acknowledge-mode property.

Returns:
a String containing the acknowledge-mode

setAcknowledgeMode

public void setAcknowledgeMode(String mode)
Sets the acknowledge-mode property which is the message acknowledgement mode for the JMS adapter. None of these modes require any action on the part of the Flex messaging client. This property is optional and defautls to AUTO_ACKNOWLEDGE.

Parameters:
mode - Message acknowledgement mode. Supported modes are: AUTO_ACKNOWLEDGE - the JMS provider client runtime automatically acknowledges the messages. DUPS_OK_ACKNOWLEDGE - auto-acknowledgement of the messages is not required. CLIENT_ACKNOWLEDGE - the JMS adapter should acknowledge that the message was received.

getConnectionFactory

public String getConnectionFactory()
Returns the connection-factory property.

Returns:
a String containing the connection-factory.

setConnectionFactory

public void setConnectionFactory(String factory)
Sets the connection-factory property which is the name of the JMS connection factory in JNDI. This property is required and it cannot be null.

Parameters:
factory - The non-null name of the JMS connection factory.

getConnectionUsername

public String getConnectionUsername()
Returns the connection username used while creating JMS connections.

Returns:
The connection username used while creating JMS connections.

setConnectionUsername

public void setConnectionUsername(String connectionUsername)
Sets the connection username used while creating JMS connections. This is optional and only needed when connection level JMS authentication is being used.

Parameters:
connectionUsername - The connection username used while creating JMS connections.

getConnectionPassword

public String getConnectionPassword()
Returns the connection password used while creating JMS connections.

Returns:
The connection password used while creating JMS connections.

setConnectionPassword

public void setConnectionPassword(String connectionPassword)
Sets the connection password used while creating JMS connections. This is optional and only needed when connection level JMS authentication is being used.

Parameters:
connectionPassword - The connection password used while creating JMS connections.

getDeliveryMode

public String getDeliveryMode()
Returns the delivery-mode property.

Returns:
a String containing the delivery-mode.

setDeliveryMode

public void setDeliveryMode(String mode)
Sets the delivery-mode property which is the JMS DeliveryMode for producers. This property optional and defaults to DEFAULT_DELIVERY_MODE.

Parameters:
mode - The delivery mode. Valid values are DEFAULT_DELIVERY_MODE, PERSISTENT, and NON_PERSISTENT.

getDeliverySettings

public JMSSettings.DeliverySettings getDeliverySettings()
Returns the delivery-settings property.

Returns:
The delivery-settings property.

setDeliverySettings

public void setDeliverySettings(JMSSettings.DeliverySettings deliverySettings)
Sets the delivery-settings property. This property is optional and defaults to default settings as described in DeliverySettings inner class.

Parameters:
deliverySettings - The delivery-settings property.

getDestinationJNDIName

public String getDestinationJNDIName()
Returns the destination-jndi-name property.

Returns:
a String containing the destination-jndi-name

setDestinationJNDIName

public void setDestinationJNDIName(String name)
Sets the destination-jndi-name property which is the name of the destination in JNDI. This value is required and it cannot be null.

Parameters:
name - The non-null name of the destination in JNDI.

getDestinationName

public String getDestinationName()
Deprecated. 

Destination-name property is not used anymore.

Returns:
null.

setDestinationName

public void setDestinationName(String name)
Deprecated. 

Destination-name property is not used anymore.

Parameters:
name - The name of the destination.

getDestinationType

public String getDestinationType()
Returns the destination-type property.

Returns:
a String containing the destination-type.

setDestinationType

public void setDestinationType(String type)
Sets the destination-type property which determines whether the adapter is performing topic (pub/sub) or queue (point-to-point) messaging. This element is optional and defaults to Topic.

Parameters:
type - The destination type. Valid values are Topic and Queue.

useDurableConsumers

public boolean useDurableConsumers()
Returns whether consumers are durable or not.

Returns:
true is consumers are durable, false otherwise.

setDurableConsumers

public void setDurableConsumers(boolean durable)
Sets whethers consumers are durable or not. This property is optional and defaults to false.

Parameters:
durable - A boolean indicating whether consumers should be durable.

getInitialContextEnvironment

public Hashtable getInitialContextEnvironment()
Returns the initial-context-environment property.

Returns:
a Hashtable of the initial-context-environment.

setInitialContextEnvironment

public void setInitialContextEnvironment(Hashtable env)
Sets the initial-context-environment property. This property is optional.

Parameters:
env - A Hashtable of the initial-context-environment.

getMaxProducers

public int getMaxProducers()
Returns the max-producers property.

Returns:
an int representing the max-producers.

setMaxProducers

public void setMaxProducers(int value)
Sets the max-producers property which is the maximum number of producer proxies that this destination should use when communicating with the JMS Server. This property is optional and defaults to 1 which implies all clients using this destinatin will share the same connection to the JMS server.

Parameters:
value - an int representing the max-producers.

getMessagePriority

public int getMessagePriority()
Returns the message-priority property.

Returns:
an int specifying the message-priority

setMessagePriority

public void setMessagePriority(int priority)
Sets the message-priority property which is the JMS priority for messages sent by Flex producers. This property is optional and defaults to javax.jms.Message.DEFAULT_PRIORITY.

Parameters:
priority - an int specifying the message-priority.

getMessageType

public String getMessageType()
Returns the message-type property.

Returns:
a String containing the message-type.

setMessageType

public void setMessageType(String type)
Sets the message-type property which is the javax.jms.Message type which the adapter should use for the destination.

Parameters:
type - The message-type property. Supported types are javax.jms.TextMessage, javax.jms.ObjectMessage.

isPreserveJMSHeaders

public boolean isPreserveJMSHeaders()
Returns the preserve-jms-headers property.

Returns:
The preserve-jms-headers property.

setPreserveJMSHeaders

public void setPreserveJMSHeaders(boolean preserveJMSHeaders)
Sets the preserve-jms-headers property. This property is optional and defaults to true.

Parameters:
preserveJMSHeaders - The preserve-jms-headers property.

isTransactedSessions

public boolean isTransactedSessions()
Deprecated. 

Transacted-session property is not used anymore.

Returns:
false.

setTransactedSessions

public void setTransactedSessions(boolean mode)
Deprecated. 

Transacted-session property is not used anymore.

Parameters:
mode - The transacted-session property.


Copyright © 2008 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/services/messaging/adapters/JMSSettings.html