|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jotm.jms.JConnection
public class JConnection
managed Connection. this is a wrapper above the XAConnection in the MOM.
| Field Summary | |
|---|---|
protected boolean |
closed
|
protected boolean |
globaltx
|
protected static String |
INTERNAL_USER_NAME
|
protected JConnectionFactory |
jcf
|
protected org.objectweb.util.monolog.api.Logger |
logger
|
protected LinkedList<Session> |
sessionlist
|
protected static TransactionManager |
tm
|
protected String |
user
|
protected XAConnection |
xac
|
| Constructor Summary | |
|---|---|
protected |
JConnection(JConnectionFactory jcf,
String user,
org.objectweb.util.monolog.api.Logger logger)
Prepares the construction of a JConnection. |
|
JConnection(JConnectionFactory jcf,
XAConnectionFactory xacf,
org.objectweb.util.monolog.api.Logger logger)
Constructor of a JConnection for an anonymous user. |
|
JConnection(JConnectionFactory jcf,
XAConnectionFactory xacf,
String user,
String passwd,
org.objectweb.util.monolog.api.Logger logger)
Constructor of a JConnection for a specified user. |
| Method Summary | |
|---|---|
void |
close()
When this method is invoked it should not return until message processing has been orderly shut down. |
ConnectionConsumer |
createConnectionConsumer(Destination destination,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
Creates a connection consumer for this connection (optional operation) |
ConnectionConsumer |
createDurableConnectionConsumer(Topic topic,
String subscriptionName,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
Creates a connection consumer for this connection (optional operation) |
Session |
createSession(boolean transacted,
int acknowledgeMode)
Creates a Session object. |
void |
finalClose()
|
String |
getClientID()
Get the client identifier for this connection. |
ExceptionListener |
getExceptionListener()
Get the ExceptionListener for this Connection. |
ConnectionMetaData |
getMetaData()
Get the meta data for this connection. |
String |
getUser()
Return the user associated to this connection |
protected void |
sessionClose(Session s)
A non transacted session has beem closed |
protected boolean |
sessionOpen(Session s)
A new non transacted session has been opened |
void |
setClientID(String clientID)
Set the client identifier for this connection. |
void |
setExceptionListener(ExceptionListener listener)
Set an exception listener for this connection. |
void |
start()
Start (or restart) a Connection's delivery of incoming messages. |
void |
stop()
Used to temporarily stop a Connection's delivery of incoming messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XAConnection xac
protected boolean closed
protected String user
protected boolean globaltx
protected static TransactionManager tm
protected JConnectionFactory jcf
protected LinkedList<Session> sessionlist
protected static final String INTERNAL_USER_NAME
protected org.objectweb.util.monolog.api.Logger logger
| Constructor Detail |
|---|
protected JConnection(JConnectionFactory jcf,
String user,
org.objectweb.util.monolog.api.Logger logger)
jcf - the Connection Factoryuser - the user using this connection
public JConnection(JConnectionFactory jcf,
XAConnectionFactory xacf,
String user,
String passwd,
org.objectweb.util.monolog.api.Logger logger)
throws JMSException
jcf - the Connection Factoryxacf - The XAConnection used in the MOMuser - user's namepasswd - user's password
JMSException - could not create the XAConnection
public JConnection(JConnectionFactory jcf,
XAConnectionFactory xacf,
org.objectweb.util.monolog.api.Logger logger)
throws JMSException
jcf - the Connection Factoryxacf - The XAConnection used in the MOM
JMSException - could not create the XAConnection| Method Detail |
|---|
protected boolean sessionOpen(Session s)
s - Session that has been opened
protected void sessionClose(Session s)
s - Session that has been openedpublic String getUser()
public void close()
throws JMSException
close in interface ConnectionJMSException - - if JMS implementation fails to return the client ID for this
Connection due to some internal
public void finalClose()
throws JMSException
JMSException
public ConnectionConsumer createConnectionConsumer(Destination destination,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
throws JMSException
createConnectionConsumer in interface Connectiondestination - - the destination to accessmessageSelector - - only messages with properties matching
the message selector expression are delivered.
A value of null or an empty string indicates that
there is no message selector for the message consumer.sessionPool - - the server session pool to associate with this connection consumermaxMessages - - the maximum number of messages that can be assigned to a server
session at one time
JMSException
public ConnectionConsumer createDurableConnectionConsumer(Topic topic,
String subscriptionName,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
throws JMSException
createDurableConnectionConsumer in interface Connectiontopic - - the topic to accesssubscriptionName - - durable subscription namemessageSelector - - only messages with properties matching
the message selector expression are delivered.
A value of null or an empty string indicates that
there is no message selector for the message consumer.sessionPool - - the server session pool to associate with this connection consumermaxMessages - - the maximum number of messages that can be assigned to a server
session at one time
JMSException
public Session createSession(boolean transacted,
int acknowledgeMode)
throws JMSException
createSession in interface Connectiontransacted - - indicates whether the session is transactedacknowledgeMode - indicates whether the consumer or the client
will acknowledge any messages it receives;
ignored if the session is transacted.
Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE,
and Session.DUPS_OK_ACKNOWLEDGE.
JMSException
public String getClientID()
throws JMSException
getClientID in interface ConnectionJMSException - - if JMS implementation fails to return the client ID for this
Connection due to some internal
public void setClientID(String clientID)
throws JMSException
setClientID in interface ConnectionclientID - - the unique client identifier
JMSException - - general exception if JMS implementation fails to set the client
ID for this Connection due to some internal error.
IllegalStateException - - if attempting to set a connection's client identifier at
the wrong time or when it has been administratively configured.
public ConnectionMetaData getMetaData()
throws JMSException
getMetaData in interface ConnectionJMSException - - general exception if JMS implementation fails to get the Connection
meta-data for this Connection.
public ExceptionListener getExceptionListener()
throws JMSException
getExceptionListener in interface ConnectionJMSException - - general exception if JMS implementation fails to get
the Exception listener for this Connection.
public void setExceptionListener(ExceptionListener listener)
throws JMSException
setExceptionListener in interface Connectionlistener - - the exception listener.
JMSException - - general exception if JMS implementation fails to set
the Exception listener for this Connection.
public void start()
throws JMSException
start in interface ConnectionJMSException - - if JMS implementation fails to start the message
delivery due to some internal error.
public void stop()
throws JMSException
stop in interface ConnectionJMSException - - if JMS implementation fails to start the message
delivery due to some internal error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||