org.jboss.mq
Class SpyConnection

java.lang.Object
  extended byorg.jboss.mq.Connection (src) 
      extended byorg.jboss.mq.SpyConnection
All Implemented Interfaces:
Connection (src) , QueueConnection (src) , java.io.Serializable, TopicConnection (src)
Direct Known Subclasses:
SpyXAConnection (src)

public class SpyConnection
extends Connection (src)
implements java.io.Serializable, TopicConnection (src) , QueueConnection (src)

This class implements javax.jms.QueueConnection and javax.jms.TopicConnection

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.mq.Connection (src)
clientID, clientILService, clockDaemon, closing, connectionToken, destinationSubscriptions, modeStop, pingPeriod, ponged, serverIL, subscriptions, temps
 
Constructor Summary
SpyConnection(GenericConnectionFactory (src)  gcf)
          Create a new SpyConnection
SpyConnection(java.lang.String userId, java.lang.String password, GenericConnectionFactory (src)  gcf)
          Create a new SpyConnection
 
Method Summary
 ConnectionConsumer (src) createConnectionConsumer(Destination (src)  destination, java.lang.String messageSelector, ServerSessionPool (src)  sessionPool, int maxMessages)
          Creates a connection consumer for this connection (optional operation).
 ConnectionConsumer (src) createConnectionConsumer(Queue (src)  queue, java.lang.String messageSelector, ServerSessionPool (src)  sessionPool, int maxMessages)
          Creates a connection consumer for this connection (optional operation).
 ConnectionConsumer (src) createConnectionConsumer(Topic (src)  topic, java.lang.String messageSelector, ServerSessionPool (src)  sessionPool, int maxMessages)
          Creates a connection consumer for this connection (optional operation).
 ConnectionConsumer (src) createDurableConnectionConsumer(Topic (src)  topic, java.lang.String subscriptionName, java.lang.String messageSelector, ServerSessionPool (src)  sessionPool, int maxMessages)
          Create a durable connection consumer for this connection (optional operation).
 QueueSession (src) createQueueSession(boolean transacted, int acknowledgeMode)
          Creates a QueueSession object.
 Session (src) createSession(boolean transacted, int acknowledgeMode)
          Creates a Session object.
 TopicSession (src) createTopicSession(boolean transacted, int acknowledgeMode)
          Creates a TopicSession object.
 
Methods inherited from class org.jboss.mq.Connection (src)
askForAnID, askForAnID, asynchClose, asynchDeleteTemporaryDestination, asynchDeliver, asynchFailure, asynchPong, authenticate, checkClientID, close, deleteTemporaryDestination, doStop, getClientID, getExceptionListener, getMetaData, getServerIL, getThreadGroup, send, send, setClientID, setExceptionListener, start, startILService, stop, stopILService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.Connection (src)
close, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop
 

Constructor Detail

SpyConnection

public SpyConnection(java.lang.String userId,
                     java.lang.String password,
                     GenericConnectionFactory (src)  gcf)
              throws JMSException (src) 
Create a new SpyConnection

Parameters:
userId - the user
password - the password
gcf - the constructing class
Throws:
JMSException (src) - for any error

SpyConnection

public SpyConnection(GenericConnectionFactory (src)  gcf)
              throws JMSException (src) 
Create a new SpyConnection

Parameters:
gcf - the constructing class
Throws:
JMSException (src) - for any error
Method Detail

createConnectionConsumer

public ConnectionConsumer (src)  createConnectionConsumer(Destination (src)  destination,
                                                   java.lang.String messageSelector,
                                                   ServerSessionPool (src)  sessionPool,
                                                   int maxMessages)
                                            throws JMSException (src) 
Description copied from interface: Connection (src)
Creates a connection consumer for this connection (optional operation). This is an expert facility not used by regular JMS clients.

Specified by:
createConnectionConsumer in interface Connection (src)
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
Throws:
JMSException (src) - if the Connection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
See Also:
ConnectionConsumer (src)

createSession

public Session (src)  createSession(boolean transacted,
                             int acknowledgeMode)
                      throws JMSException (src) 
Description copied from interface: Connection (src)
Creates a Session object.

Specified by:
createSession in interface Connection (src)
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.
Returns:
a newly created session
Throws:
JMSException (src) - if the Connection object fails to create a session due to some internal error or lack of support for the specific transaction and acknowledgement mode.
See Also:
Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, Session.DUPS_OK_ACKNOWLEDGE

createTopicSession

public TopicSession (src)  createTopicSession(boolean transacted,
                                       int acknowledgeMode)
                                throws JMSException (src) 
Description copied from interface: TopicConnection (src)
Creates a TopicSession object.

Specified by:
createTopicSession in interface TopicConnection (src)
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.
Returns:
a newly created topic session
Throws:
JMSException (src) - if the TopicConnection object fails to create a session due to some internal error or lack of support for the specific transaction and acknowledgement mode.
See Also:
Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, Session.DUPS_OK_ACKNOWLEDGE

createConnectionConsumer

public ConnectionConsumer (src)  createConnectionConsumer(Topic (src)  topic,
                                                   java.lang.String messageSelector,
                                                   ServerSessionPool (src)  sessionPool,
                                                   int maxMessages)
                                            throws JMSException (src) 
Description copied from interface: TopicConnection (src)
Creates a connection consumer for this connection (optional operation). This is an expert facility not used by regular JMS clients.

Specified by:
createConnectionConsumer in interface TopicConnection (src)
Parameters:
topic - the topic 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
Throws:
JMSException (src) - if the TopicConnection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
See Also:
ConnectionConsumer (src)

createDurableConnectionConsumer

public ConnectionConsumer (src)  createDurableConnectionConsumer(Topic (src)  topic,
                                                          java.lang.String subscriptionName,
                                                          java.lang.String messageSelector,
                                                          ServerSessionPool (src)  sessionPool,
                                                          int maxMessages)
                                                   throws JMSException (src) 
Description copied from interface: TopicConnection (src)
Create a durable connection consumer for this connection (optional operation). This is an expert facility not used by regular JMS clients.

Specified by:
createDurableConnectionConsumer in interface TopicConnection (src)
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 durable connection consumer
maxMessages - the maximum number of messages that can be assigned to a server session at one time
Returns:
the durable connection consumer
Throws:
JMSException (src) - if the TopicConnection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
See Also:
ConnectionConsumer (src)

createConnectionConsumer

public ConnectionConsumer (src)  createConnectionConsumer(Queue (src)  queue,
                                                   java.lang.String messageSelector,
                                                   ServerSessionPool (src)  sessionPool,
                                                   int maxMessages)
                                            throws JMSException (src) 
Description copied from interface: QueueConnection (src)
Creates a connection consumer for this connection (optional operation). This is an expert facility not used by regular JMS clients.

Specified by:
createConnectionConsumer in interface QueueConnection (src)
Parameters:
queue - the queue 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
Throws:
JMSException (src) - if the QueueConnection object fails to create a connection consumer due to some internal error or invalid arguments for sessionPool and messageSelector.
See Also:
ConnectionConsumer (src)

createQueueSession

public QueueSession (src)  createQueueSession(boolean transacted,
                                       int acknowledgeMode)
                                throws JMSException (src) 
Description copied from interface: QueueConnection (src)
Creates a QueueSession object.

Specified by:
createQueueSession in interface QueueConnection (src)
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.
Returns:
a newly created queue session
Throws:
JMSException (src) - if the QueueConnection object fails to create a session due to some internal error or lack of support for the specific transaction and acknowledgement mode.
See Also:
Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, Session.DUPS_OK_ACKNOWLEDGE