com.github.smokestack.jms
Class MockConnection
java.lang.Object
com.github.smokestack.jms.MockConnection
- All Implemented Interfaces:
- Connection
public class MockConnection
- extends Object
- implements Connection
- Author:
- gliptak
Method Summary |
void |
_close()
|
ConnectionConsumer |
_createConnectionConsumer(Destination destination,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
|
ConnectionConsumer |
_createDurableConnectionConsumer(Topic topic,
String subscriptionName,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
|
Session |
_createSession(boolean transacted,
int acknowledgeMode)
|
String |
_getClientID()
|
ExceptionListener |
_getExceptionListener()
|
ConnectionMetaData |
_getMetaData()
|
void |
_setClientID(String clientID)
|
void |
_setExceptionListener(ExceptionListener listener)
|
void |
_start()
|
void |
_stop()
|
void |
assertMockCommit()
Validation |
void |
assertMockComplete()
Validation |
void |
assertMockRollback()
Validation |
void |
close()
|
ConnectionConsumer |
createConnectionConsumer(Destination destination,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
|
ConnectionConsumer |
createDurableConnectionConsumer(Topic topic,
String subscriptionName,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
|
Session |
createSession(boolean transacted,
int acknowledgeMode)
|
String |
getClientID()
|
ExceptionListener |
getExceptionListener()
|
ConnectionMetaData |
getMetaData()
|
List<MockSession> |
getMockSessions()
|
MockConnection.ConnectionState |
getMockState()
|
void |
setClientID(String clientID)
|
void |
setExceptionListener(ExceptionListener listener)
|
void |
start()
|
void |
stop()
|
String |
toString()
|
mockState
protected MockConnection.ConnectionState mockState
userName
protected String userName
password
protected String password
clientID
protected String clientID
mockSessions
protected List<MockSession> mockSessions
MockConnection
public MockConnection(String userName,
String password)
MockConnection
public MockConnection()
close
public void close()
throws JMSException
- Specified by:
close
in interface Connection
- Throws:
JMSException
_close
public void _close()
throws JMSException
- Throws:
JMSException
createConnectionConsumer
public ConnectionConsumer createConnectionConsumer(Destination destination,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
throws JMSException
- Specified by:
createConnectionConsumer
in interface Connection
- Throws:
JMSException
_createConnectionConsumer
public ConnectionConsumer _createConnectionConsumer(Destination destination,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
throws JMSException
- Throws:
JMSException
createDurableConnectionConsumer
public ConnectionConsumer createDurableConnectionConsumer(Topic topic,
String subscriptionName,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
throws JMSException
- Specified by:
createDurableConnectionConsumer
in interface Connection
- Throws:
JMSException
_createDurableConnectionConsumer
public ConnectionConsumer _createDurableConnectionConsumer(Topic topic,
String subscriptionName,
String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
throws JMSException
- Throws:
JMSException
createSession
public Session createSession(boolean transacted,
int acknowledgeMode)
throws JMSException
- Specified by:
createSession
in interface Connection
- Throws:
JMSException
_createSession
public Session _createSession(boolean transacted,
int acknowledgeMode)
throws JMSException
- Throws:
JMSException
getClientID
public String getClientID()
throws JMSException
- Specified by:
getClientID
in interface Connection
- Throws:
JMSException
_getClientID
public String _getClientID()
throws JMSException
- Throws:
JMSException
getExceptionListener
public ExceptionListener getExceptionListener()
throws JMSException
- Specified by:
getExceptionListener
in interface Connection
- Throws:
JMSException
_getExceptionListener
public ExceptionListener _getExceptionListener()
throws JMSException
- Throws:
JMSException
getMetaData
public ConnectionMetaData getMetaData()
throws JMSException
- Specified by:
getMetaData
in interface Connection
- Throws:
JMSException
_getMetaData
public ConnectionMetaData _getMetaData()
throws JMSException
- Throws:
JMSException
setClientID
public void setClientID(String clientID)
throws JMSException
- Specified by:
setClientID
in interface Connection
- Throws:
JMSException
_setClientID
public void _setClientID(String clientID)
throws JMSException
- Throws:
JMSException
setExceptionListener
public void setExceptionListener(ExceptionListener listener)
throws JMSException
- Specified by:
setExceptionListener
in interface Connection
- Throws:
JMSException
_setExceptionListener
public void _setExceptionListener(ExceptionListener listener)
throws JMSException
- Throws:
JMSException
start
public void start()
throws JMSException
- Specified by:
start
in interface Connection
- Throws:
JMSException
_start
public void _start()
throws JMSException
- Throws:
JMSException
stop
public void stop()
throws JMSException
- Specified by:
stop
in interface Connection
- Throws:
JMSException
_stop
public void _stop()
throws JMSException
- Throws:
JMSException
assertMockComplete
public void assertMockComplete()
- Validation
assertMockCommit
public void assertMockCommit()
- Validation
assertMockRollback
public void assertMockRollback()
- Validation
getMockState
public MockConnection.ConnectionState getMockState()
- Returns:
- the mockState
getMockSessions
public List<MockSession> getMockSessions()
- Returns:
- the mockSessions
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2010 Smokestack. All Rights Reserved.