org.objectweb.jonas_jms.JConnection Class Reference

Inherited by org.objectweb.jonas_jms.JQueueConnection, and org.objectweb.jonas_jms.JTopicConnection.

Inheritance diagram for org.objectweb.jonas_jms.JConnection:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas_jms.JConnection:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JConnection (JConnectionFactory jcf, XAConnectionFactory xacf, String user, String passwd) throws JMSException
 JConnection (JConnectionFactory jcf, XAConnectionFactory xacf) throws JMSException
String getUser ()
void close () throws JMSException
ConnectionConsumer createConnectionConsumer (Destination destination, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
ConnectionConsumer createDurableConnectionConsumer (Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
Session createSession (boolean transacted, int acknowledgeMode) throws JMSException
String getClientID () throws JMSException
void setClientID (String clientID) throws JMSException
ConnectionMetaData getMetaData () throws JMSException
ExceptionListener getExceptionListener () throws JMSException
void setExceptionListener (ExceptionListener listener) throws JMSException
void start () throws JMSException
void stop () throws JMSException

Protected Member Functions

 JConnection (JConnectionFactory jcf, String user) throws JMSException
synchronized boolean sessionOpen (Session s)
synchronized void sessionClose (Session s)

Detailed Description

Common methods used in JQueueConnection and JTopicConnection.

Author:
Laurent Chauvirey, Frederic Maistre, Nicolas Tachker Contributor(s): Philippe Durieux Jeff Mesnil connection anonymous Philippe Coq JMS 1.1 integration

Definition at line 55 of file JConnection.java.


Constructor & Destructor Documentation

org.objectweb.jonas_jms.JConnection.JConnection JConnectionFactory  jcf,
String  user
throws JMSException [protected]
 

Prepares the construction of a JConnection.

Definition at line 74 of file JConnection.java.

org.objectweb.jonas_jms.JConnection.JConnection JConnectionFactory  jcf,
XAConnectionFactory  xacf,
String  user,
String  passwd
throws JMSException
 

Constructor of a JConnection for a specified user.

Parameters:
user user's name
passwd user's password

Definition at line 96 of file JConnection.java.

org.objectweb.jonas_jms.JConnection.JConnection JConnectionFactory  jcf,
XAConnectionFactory  xacf
throws JMSException
 

Constructor of a JConnection for an anonymous user.

Definition at line 106 of file JConnection.java.


Member Function Documentation

void org.objectweb.jonas_jms.JConnection.close  )  throws JMSException
 

When this method is invoked it should not return until message processing has been orderly shut down. This means that all message listeners that may have been running have returned and that all pending receives have returned. A close terminates all pending message receives on the connection's sessions' consumers.

Exceptions:
JMSException - if JMS implementation fails to return the client ID for this Connection due to some internal

Definition at line 158 of file JConnection.java.

References org.objectweb.jonas_jms.JConnectionFactory.freeJConnection().

Here is the call graph for this function:

ConnectionConsumer org.objectweb.jonas_jms.JConnection.createConnectionConsumer Destination  destination,
java.lang.String  messageSelector,
ServerSessionPool  sessionPool,
int  maxMessages
throws JMSException
 

Creates a connection consumer for this connection (optional operation)

Parameters:
destination - the destination to access
messageSelector - 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 consumer
maxMessages - the maximum number of messages that can be assigned to a server session at one time
Returns:
the connection consumer

Definition at line 201 of file JConnection.java.

ConnectionConsumer org.objectweb.jonas_jms.JConnection.createDurableConnectionConsumer Topic  topic,
java.lang.String  subscriptionName,
java.lang.String  messageSelector,
ServerSessionPool  sessionPool,
int  maxMessages
throws JMSException
 

Creates a connection consumer for this connection (optional operation)

Parameters:
topic - the topic to access
subscriptionName - durable subscription name
messageSelector - 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 consumer
maxMessages - the maximum number of messages that can be assigned to a server session at one time
Returns:
the durable connection consumer

Definition at line 226 of file JConnection.java.

Session org.objectweb.jonas_jms.JConnection.createSession boolean  transacted,
int  acknowledgeMode
throws JMSException
 

Creates a Session object.

Parameters:
transacted - indicates whether the session is transacted
acknowledgeMode 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.

Definition at line 251 of file JConnection.java.

Referenced by org.objectweb.jonas_jms.JSession.getMOMSession().

String org.objectweb.jonas_jms.JConnection.getClientID  )  throws JMSException
 

Get the client identifier for this connection. This value is JMS Provider specific. Either pre-configured by an administrator in a ConnectionFactory or assigned dynamically by the application by calling setClientID method.

Returns:
the unique client identifier.
Exceptions:
JMSException - if JMS implementation fails to return the client ID for this Connection due to some internal

Definition at line 265 of file JConnection.java.

ExceptionListener org.objectweb.jonas_jms.JConnection.getExceptionListener  )  throws JMSException
 

Get the ExceptionListener for this Connection.

Returns:
the ExceptionListener for this Connection.
Exceptions:
JMSException - general exception if JMS implementation fails to get the Exception listener for this Connection.

Definition at line 303 of file JConnection.java.

ConnectionMetaData org.objectweb.jonas_jms.JConnection.getMetaData  )  throws JMSException
 

Get the meta data for this connection.

Returns:
the connection meta data.
Exceptions:
JMSException - general exception if JMS implementation fails to get the Connection meta-data for this Connection.

Definition at line 292 of file JConnection.java.

String org.objectweb.jonas_jms.JConnection.getUser  ) 
 

Return the user associated to this connection

Definition at line 141 of file JConnection.java.

Referenced by org.objectweb.jonas_jms.JConnectionFactory.getJConnection().

synchronized void org.objectweb.jonas_jms.JConnection.sessionClose Session  s  )  [protected]
 

A non transacted session has beem closed

Definition at line 131 of file JConnection.java.

synchronized boolean org.objectweb.jonas_jms.JConnection.sessionOpen Session  s  )  [protected]
 

A new non transacted session has been opened

Definition at line 119 of file JConnection.java.

Referenced by org.objectweb.jonas_jms.JSession.getMOMSession().

void org.objectweb.jonas_jms.JConnection.setClientID String  clientID  )  throws JMSException
 

Set the client identifier for this connection. If another connection with clientID is already running when this method is called, the JMS Provider should detect the duplicate id and throw InvalidClientIDException.

Parameters:
clientID - the unique client identifier
Exceptions:
JMSException - general exception if JMS implementation fails to set the client ID for this Connection due to some internal error.
InvalidClientIDException - if JMS client specifies an invalid or duplicate client id.
IllegalStateException - if attempting to set a connection's client identifier at the wrong time or when it has been administratively configured.

Definition at line 281 of file JConnection.java.

void org.objectweb.jonas_jms.JConnection.setExceptionListener ExceptionListener  listener  )  throws JMSException
 

Set an exception listener for this connection.

Parameters:
listener - the exception listener.
Exceptions:
JMSException - general exception if JMS implementation fails to set the Exception listener for this Connection.

Definition at line 314 of file JConnection.java.

void org.objectweb.jonas_jms.JConnection.start  )  throws JMSException
 

Start (or restart) a Connection's delivery of incoming messages.

Exceptions:
JMSException - if JMS implementation fails to start the message delivery due to some internal error.

Definition at line 324 of file JConnection.java.

void org.objectweb.jonas_jms.JConnection.stop  )  throws JMSException
 

Used to temporarily stop a Connection's delivery of incoming messages. It can be restarted using its start method. When stopped, delivery to all the Connection's message consumers is inhibited: synchronous receive's block and messages are not delivered to message listeners.

Exceptions:
JMSException - if JMS implementation fails to start the message delivery due to some internal error.

Definition at line 337 of file JConnection.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:12:04 2005 for JOnAS by  doxygen 1.3.9.1