|
Joram 5.2.6 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.objectweb.joram.client.jms.Connection
public class Connection
Implements the javax.jms.Connection interface.
A Connection object allows the client's active connection to the Joram server. Connections support concurrent use, it serves several purposes:
| Field Summary | |
|---|---|
static org.objectweb.util.monolog.api.Logger |
logger
|
| Constructor Summary | |
|---|---|
Connection(FactoryParameters factoryParameters,
RequestChannel requestChannel)
Creates a Connection instance. |
|
| Method Summary | |
|---|---|
protected void |
addSession(Session session)
Called here and by sub-classes. |
protected void |
checkClosed()
Checks if the connection is closed. |
void |
cleanup()
Used by OutboundConnection in the connector layer. |
void |
close()
API method for closing the connection; even if the connection appears to be broken, closes the sessions. |
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Destination dest,
java.lang.String selector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
API method. |
javax.jms.ConnectionConsumer |
createDurableConnectionConsumer(javax.jms.Topic topic,
java.lang.String subName,
java.lang.String selector,
javax.jms.ServerSessionPool sessPool,
int maxMessages)
API method. |
javax.jms.Session |
createSession(boolean transacted,
int acknowledgeMode)
API method. |
boolean |
equals(java.lang.Object obj)
Returns true if the parameter is a Connection instance
sharing the same proxy identifier and connection key. |
boolean |
getAsyncSend()
Indicates whether the messages produced are asynchronously sent or not (without or with acknowledgement). |
java.lang.String |
getClientID()
API method. |
javax.jms.ExceptionListener |
getExceptionListener()
API method. |
boolean |
getImplicitAck()
Indicates whether the messages consumed are implicitly acknowledged or not. |
java.util.List |
getInInterceptors()
returns the list of IN message interceptors. |
javax.jms.ConnectionMetaData |
getMetaData()
API method. |
java.util.List |
getOutInterceptors()
returns the list of OUT message interceptors. |
java.lang.String |
getOutLocalAddress()
Returns the local IP address on which the TCP connection is activated. |
int |
getOutLocalPort()
Returns the local IP address port on which the TCP connection is activated This attribute is inherited from FactoryParameters. |
int |
getQueueMessageReadMax()
Get the maximum number of messages that can be read at once from a queue for this Connection. |
protected RequestMultiplexer |
getRequestMultiplexer()
|
int |
getTopicAckBufferMax()
Get the maximum number of acknowledgements that can be buffered when using Session.DUPS_OK_ACKNOWLEDGE mode for this Connection. |
int |
getTopicActivationThreshold()
Get the threshold of activation for this Connection. |
int |
getTopicPassivationThreshold()
Get the threshold of passivation for this Connection. |
long |
getTxPendingTimer()
Returns the 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". |
int |
hashCode()
|
void |
setClientID(java.lang.String clientID)
API method. |
void |
setExceptionListener(javax.jms.ExceptionListener listener)
API method. |
void |
start()
API method for starting the connection. |
void |
stop()
API method for stopping the connection; even if the connection appears to be broken, stops the sessions. |
java.lang.String |
toString()
String image of the connection. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static org.objectweb.util.monolog.api.Logger logger
| Constructor Detail |
|---|
public Connection(FactoryParameters factoryParameters,
RequestChannel requestChannel)
throws javax.jms.JMSException
Connection instance.
factoryParameters - The factory parameters.requestChannel - The actual connection to wrap.
javax.jms.JMSSecurityException - If the user identification is incorrect.
javax.jms.IllegalStateException - If the server is not listening.
javax.jms.JMSException| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
true if the parameter is a Connection instance
sharing the same proxy identifier and connection key.
equals in class java.lang.Objectpublic final long getTxPendingTimer()
FactoryParameters.txPendingTimerpublic final boolean getImplicitAck()
This attribute is inherited from FactoryParameters, by default false.
FactoryParameters.implicitAck,
Session.isImplicitAck()public final boolean getAsyncSend()
This attribute is inherited from FactoryParameters, by default false.
FactoryParameters.asyncSend,
Session.isAsyncSend()public final int getQueueMessageReadMax()
This attribute is inherited from FactoryParameters, default value is 1.
FactoryParameters.queueMessageReadMax,
Session.getQueueMessageReadMax()public final int getTopicAckBufferMax()
This attribute is inherited from FactoryParameters, default value is 0.
FactoryParameters.topicAckBufferMax,
Session.getTopicAckBufferMax()public final int getTopicPassivationThreshold()
This threshold is the maximum messages number over which the subscription is passivated.
This attribute is inherited from FactoryParameters, default value is Integer.MAX_VALUE.
FactoryParameters.topicPassivationThreshold,
Session.getTopicPassivationThreshold()public final int getTopicActivationThreshold()
This threshold is the minimum messages number below which the subscription is activated.
This attribute is inherited from FactoryParameters, default value is 0.
FactoryParameters.topicActivationThreshold,
Session.getTopicActivationThreshold()public final java.lang.String getOutLocalAddress()
This attribute is inherited from FactoryParameters.
FactoryParameters.outLocalAddresspublic final int getOutLocalPort()
This attribute is inherited from FactoryParameters.
FactoryParameters.outLocalPortpublic final java.util.List getInInterceptors()
called
when receiving a message.
public final java.util.List getOutInterceptors()
called
when sending a message.
protected final void checkClosed()
throws javax.jms.IllegalStateException
javax.jms.IllegalStateException
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination dest,
java.lang.String selector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages)
throws javax.jms.JMSException
createConnectionConsumer in interface javax.jms.Connectionjavax.jms.IllegalStateException - If the connection is closed.
javax.jms.InvalidSelectorException - If the selector syntax is wrong.
javax.jms.InvalidDestinationException - If the target destination does
not exist.
javax.jms.JMSException - If the method fails for any other reason.
public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic,
java.lang.String subName,
java.lang.String selector,
javax.jms.ServerSessionPool sessPool,
int maxMessages)
throws javax.jms.JMSException
createDurableConnectionConsumer in interface javax.jms.Connectionjavax.jms.IllegalStateException - If the connection is closed.
javax.jms.InvalidSelectorException - If the selector syntax is wrong.
javax.jms.InvalidDestinationException - If the target topic does
not exist.
javax.jms.JMSException - If the method fails for any other reason.
public javax.jms.Session createSession(boolean transacted,
int acknowledgeMode)
throws javax.jms.JMSException
createSession in interface javax.jms.Connectionjavax.jms.IllegalStateException - If the connection is closed.
javax.jms.JMSException - In case of an invalid acknowledge mode.protected void addSession(Session session)
public void setExceptionListener(javax.jms.ExceptionListener listener)
throws javax.jms.JMSException
setExceptionListener in interface javax.jms.Connectionjavax.jms.IllegalStateException - If the connection is closed.
javax.jms.JMSException
public javax.jms.ExceptionListener getExceptionListener()
throws javax.jms.JMSException
getExceptionListener in interface javax.jms.Connectionjavax.jms.IllegalStateException - If the connection is closed.
javax.jms.JMSException
public void setClientID(java.lang.String clientID)
throws javax.jms.JMSException
setClientID in interface javax.jms.Connectionjavax.jms.IllegalStateException - Systematically thrown.
javax.jms.JMSException
public java.lang.String getClientID()
throws javax.jms.JMSException
getClientID in interface javax.jms.Connectionjavax.jms.IllegalStateException - If the connection is closed.
javax.jms.JMSException
public javax.jms.ConnectionMetaData getMetaData()
throws javax.jms.JMSException
getMetaData in interface javax.jms.Connectionjavax.jms.IllegalStateException - If the connection is closed.
javax.jms.JMSException
public void start()
throws javax.jms.JMSException
start in interface javax.jms.Connectionjavax.jms.IllegalStateException - If the connection is closed or broken.
javax.jms.JMSException
public void stop()
throws javax.jms.JMSException
stop in interface javax.jms.Connectionjavax.jms.IllegalStateException - If the connection is closed or broken.
javax.jms.JMSException
public void close()
throws javax.jms.JMSException
close in interface javax.jms.Connectionjavax.jms.JMSException - Actually never thrown.public void cleanup()
protected final RequestMultiplexer getRequestMultiplexer()
|
Joram 5.2.6 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||