Package com.webmethods.jms.impl
Class WmConnectionConsumerImpl
- java.lang.Object
-
- com.webmethods.locks.Node
-
- com.webmethods.jms.impl.WmConnectionConsumerImpl
-
- All Implemented Interfaces:
javax.jms.ConnectionConsumer
- Direct Known Subclasses:
WmClusterConnectionConsumerImpl
,WmCompositeClusterConnectionConsumerImpl
public class WmConnectionConsumerImpl extends Node implements javax.jms.ConnectionConsumer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WmConnectionConsumerImpl.Dispatcher
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_closed
protected WmConnectionImpl
_connection
protected WmMessageConsumerImpl
_consumer
protected javax.jms.Destination
_destination
protected java.lang.Thread
_dispatcher
protected boolean
_isLocalTransacted
protected boolean
_isTransacted
protected int
_maxMessages
protected java.util.List<javax.jms.Message>
_messages
protected java.lang.String
_messageSelector
protected WmSessionImpl
_session
protected javax.jms.ServerSessionPool
_sessionPool
protected java.lang.String
_subscriptionName
-
Fields inherited from class com.webmethods.locks.Node
_lockManager
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WmConnectionConsumerImpl(WmConnectionImpl connection, javax.jms.Destination destination, java.lang.String subscriptionName, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)
protected
WmConnectionConsumerImpl(WmConnectionImpl connection, javax.jms.Destination destination, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the connection consumer.boolean
dispatch()
javax.jms.ServerSessionPool
getServerSessionPool()
Gets the server session pool associated with this connection consumer.java.lang.String
toString()
-
Methods inherited from class com.webmethods.locks.Node
getLockManager, getParent
-
-
-
-
Field Detail
-
_connection
protected WmConnectionImpl _connection
-
_session
protected WmSessionImpl _session
-
_destination
protected javax.jms.Destination _destination
-
_consumer
protected WmMessageConsumerImpl _consumer
-
_subscriptionName
protected java.lang.String _subscriptionName
-
_messageSelector
protected java.lang.String _messageSelector
-
_sessionPool
protected javax.jms.ServerSessionPool _sessionPool
-
_messages
protected java.util.List<javax.jms.Message> _messages
-
_maxMessages
protected int _maxMessages
-
_dispatcher
protected java.lang.Thread _dispatcher
-
_isTransacted
protected boolean _isTransacted
-
_closed
protected boolean _closed
-
_isLocalTransacted
protected boolean _isLocalTransacted
-
-
Constructor Detail
-
WmConnectionConsumerImpl
protected WmConnectionConsumerImpl(WmConnectionImpl connection, javax.jms.Destination destination, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
WmConnectionConsumerImpl
protected WmConnectionConsumerImpl(WmConnectionImpl connection, javax.jms.Destination destination, java.lang.String subscriptionName, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
-
-
Method Detail
-
getServerSessionPool
public javax.jms.ServerSessionPool getServerSessionPool() throws javax.jms.JMSException
Gets the server session pool associated with this connection consumer.- Specified by:
getServerSessionPool
in interfacejavax.jms.ConnectionConsumer
- Returns:
- the server session pool used by this connection consumer
- Throws:
javax.jms.JMSException
- if the JMS provider fails to get the server session pool associated with this consumer due to some internal error.
-
close
public void close() throws javax.jms.JMSException
Closes the connection consumer.Since a provider may allocate some resources on behalf of a connection consumer outside the Java virtual machine, clients should close these resources when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.
- Specified by:
close
in interfacejavax.jms.ConnectionConsumer
- Throws:
javax.jms.JMSException
- if the JMS provider fails to release resources on behalf of the connection consumer or fails to close the connection consumer.
-
dispatch
public boolean dispatch()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-