org.objectweb.joram.client.jms
Class FactoryParameters

java.lang.Object
  extended by org.objectweb.joram.client.jms.FactoryParameters
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class FactoryParameters
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

A FactoryParameters instance holds a <XA>ConnectionFactory configuration parameters.

See Also:
Serialized Form

Field Summary
 boolean asyncSend
          Determines whether the produced messages are asynchronously sent or not (without or with acknowledgement).
 int cnxPendingTimer
          Period in milliseconds between two ping requests sent by the client connection to the server; if the server does not receive any ping request during more than 2 * cnxPendingTimer, the connection is considered as dead and processed as required.
 int connectingTimer
          Duration in seconds during which connecting is attempted (connecting might take time if the server is temporarily not reachable); the 0 value is set for connecting only once and aborting if connecting failed.
private  java.lang.String host
          Name of host hosting the server to create connections with.
 boolean implicitAck
          Determines whether the messages consumed are implicitly acknowledged or not.
 java.util.List inInterceptors
          List of Message interceptors while receiving a message.
private static java.lang.String INTERCEPTOR_CLASS_NAME_SEPARATOR
           
 boolean multiThreadSync
          Determines whether client threads which are using the same connection are synchronized in order to group together the requests they send.
 int multiThreadSyncDelay
          The maximum time the threads hang if 'multiThreadSync' is true.
 int multiThreadSyncThreshold
          The maximum numbers of threads that hang if 'multiThreadSync' is true.
 java.util.List outInterceptors
          List of Message interceptors while sending a message.
 java.lang.String outLocalAddress
          This is the local IP address on which the TCP connection is activated.
 int outLocalPort
          This is the local IP address port on which the TCP connection is activated
private  int port
          Port to be used for accessing the server.
 int queueMessageReadMax
          The maximum number of messages that can be read at once from a queue.
private static long serialVersionUID
          define serialVersionUID for interoperability
 java.lang.String socketFactory
          Allows to define a specific factory for socket in order to by-pass compatibility problem between JDK version.
 int SoLinger
          Enable SO_LINGER with the specified linger time in seconds, if the value is less than 0 then it disables SO_LINGER.
 int SoTimeout
          Enable/disable SO_TIMEOUT with the specified timeout in milliseconds.
 boolean TcpNoDelay
          Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm), default value is true.
 int topicAckBufferMax
          The maximum number of acknowledgements that can be buffered in Session.DUPS_OK_ACKNOWLEDGE mode when listening to a topic.
 int topicActivationThreshold
          This threshold is the minimum messages number below which the subscription is activated.
 int topicPassivationThreshold
          This threshold is the maximum messages number over which the subscription is passivated.
 int txPendingTimer
          Duration in seconds during which a JMS transacted (non XA) session might be pending; above that duration the session is rolled back and closed; the 0 value means "no timer".
private  java.lang.String url
          url needed to connect to joram HA
 
Constructor Summary
FactoryParameters()
          Constructs an empty FactoryParameters.
FactoryParameters(java.lang.String url)
          Constructs a FactoryParameters instance.
FactoryParameters(java.lang.String host, int port)
          Constructs a FactoryParameters instance.
 
Method Summary
 void addInInterceptor(java.lang.String pInterceptorClassName)
           
private  void addInterceptor(java.lang.String pInterceptorClassName, java.util.List pInterceptors)
           
 void addOutInterceptor(java.lang.String pInterceptorClassName)
           
 java.lang.Object clone()
           
 java.util.Hashtable code(java.util.Hashtable h, java.lang.String prefix)
           
 void decode(java.util.Hashtable h, java.lang.String prefix)
           
 void fromReference(javax.naming.Reference ref, java.lang.String prefix)
           
 java.lang.String getHost()
          Returns the name of host hosting the server to create connections with.
private  java.lang.String getListInInterceptorClassName()
           
private  java.lang.String getListInterceptorClassName(java.util.List pInterceptors)
           
private  java.lang.String getListOutInterceptorClassName()
           
 int getPort()
          Returns the port to be used for accessing the server.
 java.lang.String getUrl()
          Returns the url to be used for accessing the server.
 boolean removeInInterceptor(java.lang.String pInterceptorClassName)
           
 boolean removeInterceptor(java.lang.String pInterceptorClassName, java.util.List pInterceptors)
           
 boolean removeOutInterceptor(java.lang.String pInterceptorClassName)
           
private  void setListInInterceptorClassName(java.lang.String pListInterceptorClassName)
           
private  void setListInterceptorClassName(java.lang.String pListInterceptorClassName, java.util.List pInterceptors)
           
private  void setListOutInterceptorClassName(java.lang.String pListInterceptorClassName)
           
 void toReference(javax.naming.Reference ref, java.lang.String prefix)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
define serialVersionUID for interoperability

See Also:
Constant Field Values

host

private java.lang.String host
Name of host hosting the server to create connections with.


port

private int port
Port to be used for accessing the server.


url

private java.lang.String url
url needed to connect to joram HA


TcpNoDelay

public boolean TcpNoDelay
Enable/disable TCP_NODELAY (disable/enable Nagle's algorithm), default value is true.


SoLinger

public int SoLinger
Enable SO_LINGER with the specified linger time in seconds, if the value is less than 0 then it disables SO_LINGER. Default value is -1.


SoTimeout

public int SoTimeout
Enable/disable SO_TIMEOUT with the specified timeout in milliseconds. The timeout must be > 0. A timeout of zero is interpreted as an infinite timeout. Default value is 0.


connectingTimer

public int connectingTimer
Duration in seconds during which connecting is attempted (connecting might take time if the server is temporarily not reachable); the 0 value is set for connecting only once and aborting if connecting failed.


txPendingTimer

public int txPendingTimer
Duration in seconds during which a JMS transacted (non XA) session might be pending; above that duration the session is rolled back and closed; the 0 value means "no timer".

The default value is 0 (no timer).


cnxPendingTimer

public int cnxPendingTimer
Period in milliseconds between two ping requests sent by the client connection to the server; if the server does not receive any ping request during more than 2 * cnxPendingTimer, the connection is considered as dead and processed as required.


socketFactory

public java.lang.String socketFactory
Allows to define a specific factory for socket in order to by-pass compatibility problem between JDK version. Currently there is two factories, The default factory one for JDK since 1.4, and SocketFactory13 for JDK prior to 1.4.


implicitAck

public boolean implicitAck
Determines whether the messages consumed are implicitly acknowledged or not. When true messages are immediately removed from queue when delivered.


asyncSend

public boolean asyncSend
Determines whether the produced messages are asynchronously sent or not (without or with acknowledgement).

Default is false (with ack).


queueMessageReadMax

public int queueMessageReadMax
The maximum number of messages that can be read at once from a queue.

Default is 1.


topicAckBufferMax

public int topicAckBufferMax
The maximum number of acknowledgements that can be buffered in Session.DUPS_OK_ACKNOWLEDGE mode when listening to a topic.

Default value is 10.


multiThreadSync

public boolean multiThreadSync
Determines whether client threads which are using the same connection are synchronized in order to group together the requests they send.


multiThreadSyncDelay

public int multiThreadSyncDelay
The maximum time the threads hang if 'multiThreadSync' is true.

Either they wake up (wait time out) or they are notified (by the first waken up thread).

Default value is 1ms.


multiThreadSyncThreshold

public int multiThreadSyncThreshold
The maximum numbers of threads that hang if 'multiThreadSync' is true.

Default value is 10 waiting threads.


topicPassivationThreshold

public int topicPassivationThreshold
This threshold is the maximum messages number over which the subscription is passivated.

Default is Integer.MAX_VALUE.


topicActivationThreshold

public int topicActivationThreshold
This threshold is the minimum messages number below which the subscription is activated.

Default value is 0.


outLocalAddress

public java.lang.String outLocalAddress
This is the local IP address on which the TCP connection is activated.

The value can either be a machine name, such as "java.sun.com", or a textual representation of its IP address.


outLocalPort

public int outLocalPort
This is the local IP address port on which the TCP connection is activated


inInterceptors

public final java.util.List inInterceptors
List of Message interceptors while receiving a message.
These interceptors are called when Session#receive() is called.
The execution follows the order of the elements within the list.
This property is facultative. If set, then the callback method of the IN interceptors are called.


outInterceptors

public final java.util.List outInterceptors
List of Message interceptors while sending a message.
These interceptors are called when Session#send() is called.
The execution follows the order of the elements within the list.
This property is facultative. If set, then the callback method of the OUT interceptors are called.


INTERCEPTOR_CLASS_NAME_SEPARATOR

private static final java.lang.String INTERCEPTOR_CLASS_NAME_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

FactoryParameters

public FactoryParameters(java.lang.String host,
                         int port)
Constructs a FactoryParameters instance.

Parameters:
host - Name of host hosting the server to create connections with.
port - Port to be used for accessing the server.

FactoryParameters

public FactoryParameters(java.lang.String url)
Constructs a FactoryParameters instance.

Parameters:
url - joram ha url

FactoryParameters

public FactoryParameters()
Constructs an empty FactoryParameters.

Method Detail

getHost

public java.lang.String getHost()
Returns the name of host hosting the server to create connections with.

Returns:
The name of host hosting the server.

getPort

public int getPort()
Returns the port to be used for accessing the server.

Returns:
The port to be used for accessing the server.

getUrl

public java.lang.String getUrl()
Returns the url to be used for accessing the server.

Returns:
The url to be used for accessing the server.

toReference

public void toReference(javax.naming.Reference ref,
                        java.lang.String prefix)

fromReference

public void fromReference(javax.naming.Reference ref,
                          java.lang.String prefix)

code

public java.util.Hashtable code(java.util.Hashtable h,
                                java.lang.String prefix)

decode

public void decode(java.util.Hashtable h,
                   java.lang.String prefix)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addInInterceptor

public void addInInterceptor(java.lang.String pInterceptorClassName)

addOutInterceptor

public void addOutInterceptor(java.lang.String pInterceptorClassName)

addInterceptor

private void addInterceptor(java.lang.String pInterceptorClassName,
                            java.util.List pInterceptors)

removeInInterceptor

public boolean removeInInterceptor(java.lang.String pInterceptorClassName)

removeOutInterceptor

public boolean removeOutInterceptor(java.lang.String pInterceptorClassName)

removeInterceptor

public boolean removeInterceptor(java.lang.String pInterceptorClassName,
                                 java.util.List pInterceptors)

getListInInterceptorClassName

private java.lang.String getListInInterceptorClassName()

getListOutInterceptorClassName

private java.lang.String getListOutInterceptorClassName()

getListInterceptorClassName

private java.lang.String getListInterceptorClassName(java.util.List pInterceptors)

setListInInterceptorClassName

private void setListInInterceptorClassName(java.lang.String pListInterceptorClassName)

setListOutInterceptorClassName

private void setListOutInterceptorClassName(java.lang.String pListInterceptorClassName)

setListInterceptorClassName

private void setListInterceptorClassName(java.lang.String pListInterceptorClassName,
                                         java.util.List pInterceptors)


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.