com.github.smokestack.jms
Class MockConnectionFactory

java.lang.Object
  extended by com.github.smokestack.jms.MockConnectionFactory
All Implemented Interfaces:
Serializable, ConnectionFactory, Referenceable

public class MockConnectionFactory
extends Object
implements ConnectionFactory, Serializable, Referenceable

Author:
gliptak
See Also:
Serialized Form

Field Summary
protected  List<MockConnection> mockConnections
           
protected  Reference reference
           
 
Constructor Summary
MockConnectionFactory()
          Constructor
 
Method Summary
 Connection _createConnection()
           
 Connection _createConnection(String userName, String password)
           
 void assertMockCommit()
          Validation
 void assertMockComplete()
          Validation
 void assertMockRollback()
          Validation
 Connection createConnection()
           
 Connection createConnection(String userName, String password)
           
 List<MockConnection> getMockConnections()
           
 Reference getReference()
           
 void setReference(Reference reference)
          Making a setter available
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mockConnections

protected List<MockConnection> mockConnections

reference

protected Reference reference
Constructor Detail

MockConnectionFactory

public MockConnectionFactory()
Constructor

Method Detail

createConnection

public Connection createConnection()
                            throws JMSException
Specified by:
createConnection in interface ConnectionFactory
Throws:
JMSException

_createConnection

public Connection _createConnection()
                             throws JMSException
Throws:
JMSException

createConnection

public Connection createConnection(String userName,
                                   String password)
                            throws JMSException
Specified by:
createConnection in interface ConnectionFactory
Throws:
JMSException

_createConnection

public Connection _createConnection(String userName,
                                    String password)
                             throws JMSException
Throws:
JMSException

assertMockComplete

public void assertMockComplete()
Validation


assertMockCommit

public void assertMockCommit()
Validation


assertMockRollback

public void assertMockRollback()
Validation


getMockConnections

public List<MockConnection> getMockConnections()
Returns:
the mockConnections

getReference

public Reference getReference()
                       throws NamingException
Specified by:
getReference in interface Referenceable
Throws:
NamingException

setReference

public void setReference(Reference reference)
Making a setter available

Parameters:
reference -

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2010 Smokestack. All Rights Reserved.