public class FactoryParameters extends Object implements Serializable, Cloneable
FactoryParameters
instance holds a
<XA>ConnectionFactory
configuration parameters,
it allows to configure the related ConnectionFactory.Modifier and Type | Field and Description |
---|---|
boolean |
asyncSend
Determines whether the persistent produced messages are asynchronously
sent (without acknowledge) or not.
|
String |
clientID
The clientID used by connection
|
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 approximatively more than 3* cnxPendingTimer, the
connection is considered as dead and processed as required.
|
int |
compressedMinSize
This attribute defines the minimum size beyond which the message body is compressed.
|
int |
compressionLevel
This attribute defines the compression level (0-9) used when the message body is compressed.
|
int |
connectingTimer
Duration in seconds during which connecting is attempted (connecting might
take time if the server is temporarily not reachable).
|
private String |
host
Name of host hosting the server to create connections with.
|
boolean |
implicitAck
Determines whether the messages consumed are implicitly acknowledged
or not.
|
List |
inInterceptors
List of Message interceptors while receiving a message.
|
private static String |
INTERCEPTOR_CLASS_NAME_SEPARATOR |
private static org.objectweb.util.monolog.api.Logger |
logger |
String |
messageIdPrefix
This attribute allows to customize the JMS MessageID adding the specified string.
|
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.
|
boolean |
noAckedQueue
Set this attribute to true to increase performance.
|
List |
outInterceptors
List of Message interceptors while sending a message.
|
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
|
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 String |
url
url needed to connect to joram HA
|
Constructor and Description |
---|
FactoryParameters()
Constructs an empty
FactoryParameters . |
FactoryParameters(String url)
Constructs a
FactoryParameters instance. |
FactoryParameters(String host,
int port)
Constructs a
FactoryParameters instance. |
Modifier and Type | Method and Description |
---|---|
void |
addInInterceptor(String pInterceptorClassName) |
private void |
addInterceptor(String pInterceptorClassName,
List pInterceptors) |
void |
addOutInterceptor(String pInterceptorClassName) |
Object |
clone() |
Hashtable |
code(Hashtable h,
String prefix) |
void |
decode(Hashtable h,
String prefix) |
void |
fromReference(Reference ref,
String prefix) |
String |
getHost()
Returns the name of host hosting the server to create connections with.
|
private String |
getListInInterceptorClassName() |
private String |
getListInterceptorClassName(List pInterceptors) |
private String |
getListOutInterceptorClassName() |
String |
getMessageIdPrefix()
Gets the prefix to add to the JMS MessageID of connection created from this factory.
|
int |
getPort()
Returns the port to be used for accessing the server.
|
String |
getUrl()
Returns the url to be used for accessing the server.
|
boolean |
removeInInterceptor(String pInterceptorClassName) |
boolean |
removeInterceptor(String pInterceptorClassName,
List pInterceptors) |
boolean |
removeOutInterceptor(String pInterceptorClassName) |
private void |
setListInInterceptorClassName(String pListInterceptorClassName) |
private void |
setListInterceptorClassName(String pListInterceptorClassName,
List pInterceptors) |
private void |
setListOutInterceptorClassName(String pListInterceptorClassName) |
void |
setMessageIdPrefix(String messageIdPrefix)
Setsthe prefix to add to the JMS MessageID of connection created from this factory.
|
void |
setParameters(Properties properties) |
void |
toReference(Reference ref,
String prefix) |
String |
toString() |
private static final long serialVersionUID
private static org.objectweb.util.monolog.api.Logger logger
private String host
private int port
private String url
public String clientID
public boolean TcpNoDelay
public int SoLinger
public int SoTimeout
public int connectingTimer
The default value is 30.
public int txPendingTimer
The default value is 0 (no timer).
public int cnxPendingTimer
public String socketFactory
public boolean implicitAck
public boolean asyncSend
Messages sent asynchronously may be lost if a failure occurs before the message is persisted on the server.
Non persistent messages are always sent without acknowledgment.
Default is false, persistent messages are sent with acknowledge.
public int queueMessageReadMax
Default is 1.
public int topicAckBufferMax
Default value is 10.
public boolean multiThreadSync
public int multiThreadSyncDelay
Either they wake up (wait time out) or they are notified (by the first waken up thread).
Default value is 1ms.
public int multiThreadSyncThreshold
Default value is 10 waiting threads.
public int topicPassivationThreshold
Default is Integer.MAX_VALUE.
public int topicActivationThreshold
Default value is 0.
public String outLocalAddress
The value can either be a machine name, such as "java.sun.com", or a textual representation of its IP address.
public int outLocalPort
public final List inInterceptors
Session#receive()
is called.
MessageInterceptor
handle
callback method of the IN interceptors}
are called.public final List outInterceptors
Session#send()
is called.
MessageInterceptor
handle
callback method of the OUT interceptors}
are called.public int compressedMinSize
public int compressionLevel
public boolean noAckedQueue
public String messageIdPrefix
private static final String INTERCEPTOR_CLASS_NAME_SEPARATOR
public FactoryParameters(String host, int port)
FactoryParameters
instance.host
- Name of host hosting the server to create connections with.port
- Port to be used for accessing the server.public FactoryParameters(String url)
FactoryParameters
instance.url
- joram ha urlpublic FactoryParameters()
FactoryParameters
.public String getHost()
public int getPort()
public String getUrl()
public String getMessageIdPrefix()
public void setMessageIdPrefix(String messageIdPrefix)
messageIdPrefix
- the prefix to add to the JMS MessageID.public void addInInterceptor(String pInterceptorClassName)
public void addOutInterceptor(String pInterceptorClassName)
public boolean removeInInterceptor(String pInterceptorClassName)
public boolean removeOutInterceptor(String pInterceptorClassName)
public boolean removeInterceptor(String pInterceptorClassName, List pInterceptors)
private String getListInInterceptorClassName()
private String getListOutInterceptorClassName()
private void setListInInterceptorClassName(String pListInterceptorClassName)
private void setListOutInterceptorClassName(String pListInterceptorClassName)
private void setListInterceptorClassName(String pListInterceptorClassName, List pInterceptors)
public void setParameters(Properties properties)
Copyright © 2021 ScalAgent D.T.. All rights reserved.