|
Joram 5.2.1 | ||||||||
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.
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)
Specializes this Object method; 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. |
javax.jms.ConnectionMetaData |
getMetaData()
API method. |
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.connectionImpl
- 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.Object
public int hashCode()
hashCode
in class java.lang.Object
public 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.Object
public final long getTxPendingTimer()
FactoryParameters.txPendingTimer
,
Session.txPendingTimer
public final boolean getImplicitAck()
This attribute is inherited from FactoryParameters, by default false.
FactoryParameters.implicitAck
,
Session.implicitAck
public final boolean getAsyncSend()
This attribute is inherited from FactoryParameters, by default false.
FactoryParameters.asyncSend
,
Session.asyncSend
public final int getQueueMessageReadMax()
This attribute is inherited from FactoryParameters, default value is 1.
FactoryParameters.queueMessageReadMax
,
Session.queueMessageReadMax
public final int getTopicAckBufferMax()
This attribute is inherited from FactoryParameters, default value is 0.
FactoryParameters.topicAckBufferMax
,
Session.setTopicAckBufferMax
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.setTopicPassivationThreshold
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.setTopicActivationThreshold
public final java.lang.String getOutLocalAddress()
This attribute is inherited from FactoryParameters.
FactoryParameters.outLocalAddress
public final int getOutLocalPort()
This attribute is inherited from FactoryParameters.
FactoryParameters.outLocalPort
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.Connection
javax.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.Connection
javax.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.Connection
javax.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.Connection
javax.jms.IllegalStateException
- If the connection is closed.
javax.jms.JMSException
public javax.jms.ExceptionListener getExceptionListener() throws javax.jms.JMSException
getExceptionListener
in interface javax.jms.Connection
javax.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.Connection
javax.jms.IllegalStateException
- Systematically thrown.
javax.jms.JMSException
public java.lang.String getClientID() throws javax.jms.JMSException
getClientID
in interface javax.jms.Connection
javax.jms.IllegalStateException
- If the connection is closed.
javax.jms.JMSException
public javax.jms.ConnectionMetaData getMetaData() throws javax.jms.JMSException
getMetaData
in interface javax.jms.Connection
javax.jms.IllegalStateException
- If the connection is closed.
javax.jms.JMSException
public void start() throws javax.jms.JMSException
start
in interface javax.jms.Connection
javax.jms.IllegalStateException
- If the connection is closed or broken.
javax.jms.JMSException
public void stop() throws javax.jms.JMSException
stop
in interface javax.jms.Connection
javax.jms.IllegalStateException
- If the connection is closed or broken.
javax.jms.JMSException
public void close() throws javax.jms.JMSException
close
in interface javax.jms.Connection
javax.jms.JMSException
- Actually never thrown.public void cleanup()
protected final RequestMultiplexer getRequestMultiplexer()
|
Joram 5.2.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |