| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.j_spaces.jms.GSQueueConnectionImpl
public class GSQueueConnectionImpl
Implements the javax.jms.QueueConnection interface.
 
 GigaSpaces implementation of the JMS QueueConnection Inerface.
 
It also extends the GSConnectionImpl and overwrites most of its methods. - It holds the list of the sessions that attached to this conn. - It returns a LocalTransaction instance - it starts, stops and closes the Connection </blockquote>
Constructor Summary GSQueueConnectionImpl(GSConnectionFactoryImpl _connFacParent)
Constructor: Calling super com.j_spaces.jms.GSConnectionImpl.
Method Summary voidclose()
API method for closing the connection; even if the connection appears to be broken, closes the sessions.ConnectionConsumercreateConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages)
ConnectionConsumercreateConnectionConsumer(Queue queue, String messageSelector, ServerSessionPool sessionPool, int maxMessages)
ConnectionConsumercreateConnectionConsumer(Topic topic, String messageSelector, ServerSessionPool sessionPool, int maxMessages)
ConnectionConsumercreateDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages)
When called on aQueueConnectionit throwsIllegalStateException.QueueSessioncreateQueueSession(boolean transacted, int acknowledgeMode)
SessioncreateSession(boolean transacted, int acknowledgeMode)
Use the extended methods, from GSTopicConnectionImpl for Topic and from GSQueueConnectionImpl for Queue.TopicSessioncreateTopicSession(boolean transacted, int acknowledgeMode)
StringgetClientID()
The connection client ID contains the space name together with the Destination name, "space name_destination name" e.g.intgetCompressionMinSize()
ExceptionListenergetExceptionListener()
ConnectionMetaDatagetMetaData()
TransactiongetTransaction(boolean localTransaction, long leaseTime)
create a new local transaction instance and use it in case of a transacted JMS session.voidsetClientID(String clientID)
The connection client ID contains the random connection Key + hostname + space name + destination name "space name_destination name" e.g.voidsetExceptionListener(ExceptionListener listener)
voidstart()
Overwrite of the API method for starting the Topic connection.voidstop()
Overwrite of the API method for stoping the Topic connection.StringtoString()
Methods inherited from class java.lang.Object equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail GSQueueConnectionImpl
public GSQueueConnectionImpl(GSConnectionFactoryImpl _connFacParent) throws JMSException
- Constructor: Calling super com.j_spaces.jms.GSConnectionImpl.
 
- Parameters:
 _connFacParent- connection factory- Throws:
 JMSException
Method Detail createDurableConnectionConsumer
public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
- When called on a
 QueueConnectionit throwsIllegalStateException.
- Specified by:
 createDurableConnectionConsumerin interfaceConnection- Specified by:
 createDurableConnectionConsumerin interfaceTopicConnection
- Throws:
 JMSException- See Also:
 Connection.createDurableConnectionConsumer(Topic, String, String, ServerSessionPool, int)
createSession
public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
- Use the extended methods, from GSTopicConnectionImpl for Topic and from GSQueueConnectionImpl for Queue.
 
- Specified by:
 createSessionin interfaceConnection
- Returns:
 - null
 - Throws:
 JMSException- See Also:
 Connection.createSession(boolean, int)
getClientID
public String getClientID() throws JMSException
- The connection client ID contains the space name together with the Destination name, "space name_destination name" e.g. "JavaSpaces_MyTopic"
 
- Specified by:
 getClientIDin interfaceConnection
- Returns:
 - String m_clientID
 - Throws:
 JMSException- See Also:
 Connection.getClientID()
setClientID
public void setClientID(String clientID) throws JMSException
- The connection client ID contains the random connection Key + hostname + space name + destination name "space name_destination name" e.g. "JavaSpaces_MyTopic" Client cannot set a clientID more then once.
 
- Specified by:
 setClientIDin interfaceConnection
- Parameters:
 clientID-- Throws:
 IllegalStateExceptionJMSException- See Also:
 Connection.setClientID(java.lang.String)
getMetaData
public ConnectionMetaData getMetaData() throws JMSException
- Specified by:
 getMetaDatain interfaceConnection
- Throws:
 JMSException- See Also:
 Connection.getMetaData(),GSConnectionMetaDataImpl
getExceptionListener
public ExceptionListener getExceptionListener() throws JMSException
- Specified by:
 getExceptionListenerin interfaceConnection
- Throws:
 JMSException- See Also:
 Connection.getExceptionListener()
setExceptionListener
public void setExceptionListener(ExceptionListener listener) throws JMSException
- Specified by:
 setExceptionListenerin interfaceConnection
- Throws:
 JMSException- See Also:
 Connection.setExceptionListener(javax.jms.ExceptionListener)
start
public void start() throws JMSException
- Overwrite of the API method for starting the Topic connection. Loops on all the sessions and starts them.
 
- Specified by:
 startin interfaceConnection
- Throws:
 IllegalStateException- If the connection is closed or broken.JMSException
stop
public void stop() throws JMSException
- Overwrite of the API method for stoping the Topic connection.
 
- Specified by:
 stopin interfaceConnection
- Throws:
 IllegalStateException- If the connection is closed or broken.JMSException- See Also:
 Connection.stop()
close
public void close() throws JMSException
- API method for closing the connection; even if the connection appears to be broken, closes the sessions. Loops on all the sessions and closes them. If one or more of the connection�s session�s message listeners is processing a message at the point when connection close is invoked, all the facilities of the connection and its sessions must remain available to those listeners until they return control to the JMS provider. When connection close is invoked it should not return until message processing has been shut down in an orderly fashion. This means that all message listeners that may have been running have returned, and that all pending receives have returned.
 
- Specified by:
 closein interfaceConnection
- Throws:
 JMSException- Actually never thrown.
createConnectionConsumer
public ConnectionConsumer createConnectionConsumer(Destination destination, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
- Specified by:
 createConnectionConsumerin interfaceConnection
- Throws:
 JMSException- See Also:
 Connection.createConnectionConsumer(javax.jms.Destination, java.lang.String, javax.jms.ServerSessionPool, int)
getTransaction
public Transaction getTransaction(boolean localTransaction, long leaseTime) throws com.j_spaces.jms.TransactionCreateException
- create a new local transaction instance and use it in case of a transacted JMS session.
 
- Parameters:
 leaseTime-- Returns:
 - tr
 - Throws:
 JMSExceptioncom.j_spaces.jms.TransactionCreateException
toString
public String toString()
- Overrides:
 toStringin classObject
getCompressionMinSize
public int getCompressionMinSize()
- Returns:
 - Returns the compressionMinSize. The minimum size (in bytes) which from where we start to compress all the message body. e.g. if a 1 MB Text JMSMessage body is sent, and the compressionMinSize value is 500000 (0.5MB) then we will compress that message body (only), otherwise we will send (write) it as is. TODO Currently this configured via system property later will be part of the JMS-config.xml default value is 0.5 MB
 
createConnectionConsumer
public ConnectionConsumer createConnectionConsumer(Queue queue, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
- Specified by:
 createConnectionConsumerin interfaceQueueConnection
- Throws:
 JMSException- See Also:
 QueueConnection.createConnectionConsumer(Queue, String, ServerSessionPool, int)
createQueueSession
public QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws JMSException
- Specified by:
 createQueueSessionin interfaceQueueConnection
- Throws:
 JMSException- See Also:
 QueueConnection.createQueueSession(boolean, int)
createConnectionConsumer
public ConnectionConsumer createConnectionConsumer(Topic topic, String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
- Specified by:
 createConnectionConsumerin interfaceTopicConnection
- Throws:
 JMSException- See Also:
 TopicConnection.createConnectionConsumer(Topic, String, ServerSessionPool, int)
createTopicSession
public TopicSession createTopicSession(boolean transacted, int acknowledgeMode) throws JMSException
- Specified by:
 createTopicSessionin interfaceTopicConnection
- Throws:
 JMSException- See Also:
 TopicConnection.createTopicSession(boolean, int)
Overview Package Class Tree Deprecated Index Help PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD