|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.jms.XBConnection
public class XBConnection
XBConnection holds the connections to xmlBlaster.Since this class serves as a factory for jms sessions, and since the mapping between sessions and connections is: <br/> <ul> <li><b>xmlBlaster</b>: 1 connection -> 1 session</li> <li><b>jms</b>: 1 connection -> n session</li> </ul> we need to map one jms connection (XBConnection) to multiple (n) xmlBlaster connections (one for each session). Then again, each jms session would map to one xmlBlaster session.
Field Summary | |
---|---|
private boolean |
closed
|
(package private) java.lang.Object |
closeSync
|
private ConnectQos |
connectQos
|
private javax.jms.ExceptionListener |
exceptionListener
|
private boolean |
forQueues
|
private Global |
global
|
private static java.util.logging.Logger |
log
|
private static java.lang.String |
ME
|
private javax.jms.ConnectionMetaData |
metaData
|
private boolean |
running
|
private java.util.Map |
sessionMap
|
private boolean |
stillVirgin
if true, no invocation on this connection has been done. |
Fields inherited from interface org.xmlBlaster.jms.I_StatusChangeListener |
---|
CLOSED, RUNNING |
Constructor Summary | |
---|---|
XBConnection(ConnectQos connectQos,
javax.jms.ConnectionMetaData metaData,
boolean forQueues)
|
Method Summary | |
---|---|
(package private) void |
checkClosed()
|
void |
close()
Disconnect all sessions administered by this connection. |
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Destination destination,
java.lang.String msgSelector,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Queue queue,
java.lang.String msgSelector,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Topic topic,
java.lang.String msgSelector,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
|
javax.jms.ConnectionConsumer |
createDurableConnectionConsumer(javax.jms.Topic topic,
java.lang.String subscriptionName,
java.lang.String msgSelector,
javax.jms.ServerSessionPool serverSessionPool,
int maxMessages)
|
javax.jms.QueueSession |
createQueueSession(boolean transacted,
int ackMode)
|
javax.jms.Session |
createSession(boolean transacted,
int ackMode)
It creates a session. |
javax.jms.TopicSession |
createTopicSession(boolean transacted,
int ackMode)
|
java.lang.String |
getClientID()
|
(package private) ConnectQos |
getConnectQos()
|
javax.jms.ExceptionListener |
getExceptionListener()
|
javax.jms.ConnectionMetaData |
getMetaData()
|
private void |
initSession(java.lang.String methodName,
XBSession session,
boolean transacted,
int ackMode)
|
void |
setClientID(java.lang.String loginName)
|
void |
setExceptionListener(javax.jms.ExceptionListener exeptionListener)
|
void |
start()
Activates the dispatcher of all sessions administered by this connection. |
private void |
startStop(java.lang.String txt,
boolean isStart)
|
void |
statusPostChanged(java.lang.String id,
int oldStatus,
int newStatus)
|
void |
statusPreChanged(java.lang.String id,
int oldStatus,
int newStatus)
Removes the session from the map to avoid future notification. |
void |
stop()
Disactivates the dispatchers of all sessions administered by this connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ME
private Global global
private static java.util.logging.Logger log
private javax.jms.ExceptionListener exceptionListener
private javax.jms.ConnectionMetaData metaData
private ConnectQos connectQos
private java.util.Map sessionMap
private boolean running
private boolean stillVirgin
private boolean forQueues
private boolean closed
java.lang.Object closeSync
Constructor Detail |
---|
XBConnection(ConnectQos connectQos, javax.jms.ConnectionMetaData metaData, boolean forQueues) throws XmlBlasterException
connectQos
- metaData
- forQueues
- true if the connection is used as a QueueConnection, false otherwise
XmlBlasterException
Method Detail |
---|
final void checkClosed() throws javax.jms.JMSException
javax.jms.JMSException
private void initSession(java.lang.String methodName, XBSession session, boolean transacted, int ackMode) throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.Session createSession(boolean transacted, int ackMode) throws javax.jms.JMSException
createSession
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.TopicSession createTopicSession(boolean transacted, int ackMode) throws javax.jms.JMSException
createTopicSession
in interface javax.jms.TopicConnection
javax.jms.JMSException
public javax.jms.QueueSession createQueueSession(boolean transacted, int ackMode) throws javax.jms.JMSException
createQueueSession
in interface javax.jms.QueueConnection
javax.jms.JMSException
public void close() throws javax.jms.JMSException
close
in interface javax.jms.Connection
javax.jms.JMSException
Connection.close()
public java.lang.String getClientID() throws javax.jms.JMSException
getClientID
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ExceptionListener getExceptionListener() throws javax.jms.JMSException
getExceptionListener
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionMetaData getMetaData() throws javax.jms.JMSException
getMetaData
in interface javax.jms.Connection
javax.jms.JMSException
public void setClientID(java.lang.String loginName) throws javax.jms.JMSException
setClientID
in interface javax.jms.Connection
javax.jms.JMSException
public void setExceptionListener(javax.jms.ExceptionListener exeptionListener) throws javax.jms.JMSException
setExceptionListener
in interface javax.jms.Connection
javax.jms.JMSException
public void start() throws javax.jms.JMSException
start
in interface javax.jms.Connection
javax.jms.JMSException
Connection.start()
private void startStop(java.lang.String txt, boolean isStart) throws javax.jms.JMSException
javax.jms.JMSException
public void stop() throws javax.jms.JMSException
stop
in interface javax.jms.Connection
javax.jms.JMSException
Connection.stop()
public void statusPostChanged(java.lang.String id, int oldStatus, int newStatus)
statusPostChanged
in interface I_StatusChangeListener
public void statusPreChanged(java.lang.String id, int oldStatus, int newStatus)
statusPreChanged
in interface I_StatusChangeListener
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination, java.lang.String msgSelector, javax.jms.ServerSessionPool serverSessionPool, int maxMessages) throws javax.jms.JMSException
createConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
QueueConnection.createConnectionConsumer(javax.jms.Queue, java.lang.String, javax.jms.ServerSessionPool, int)
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Topic topic, java.lang.String msgSelector, javax.jms.ServerSessionPool serverSessionPool, int maxMessages) throws javax.jms.JMSException
createConnectionConsumer
in interface javax.jms.TopicConnection
javax.jms.JMSException
QueueConnection.createConnectionConsumer(javax.jms.Queue, java.lang.String, javax.jms.ServerSessionPool, int)
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue, java.lang.String msgSelector, javax.jms.ServerSessionPool serverSessionPool, int maxMessages) throws javax.jms.JMSException
createConnectionConsumer
in interface javax.jms.QueueConnection
javax.jms.JMSException
QueueConnection.createConnectionConsumer(javax.jms.Queue, java.lang.String, javax.jms.ServerSessionPool, int)
public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic, java.lang.String subscriptionName, java.lang.String msgSelector, javax.jms.ServerSessionPool serverSessionPool, int maxMessages) throws javax.jms.JMSException
createDurableConnectionConsumer
in interface javax.jms.Connection
createDurableConnectionConsumer
in interface javax.jms.TopicConnection
javax.jms.JMSException
TopicConnection.createDurableConnectionConsumer(javax.jms.Topic, java.lang.String, java.lang.String, javax.jms.ServerSessionPool, int)
ConnectQos getConnectQos()
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |