com.mockrunner.mock.connector.cci
Class MockConnection

java.lang.Object
  extended by com.mockrunner.mock.connector.cci.MockConnection
All Implemented Interfaces:
javax.resource.cci.Connection

public class MockConnection
extends java.lang.Object
implements javax.resource.cci.Connection

Mock implementation of Connection.


Constructor Summary
MockConnection()
           
 
Method Summary
 void close()
           
 javax.resource.cci.Interaction createInteraction()
           
 InteractionHandler getInteractionHandler()
           
 java.util.List getInteractionList()
          Returns the list of all created Interaction objects.
 javax.resource.cci.LocalTransaction getLocalTransaction()
           
 javax.resource.cci.ConnectionMetaData getMetaData()
           
 MockLocalTransaction getMockLocalTransaction()
          Returns the MockLocalTransaction.
 javax.resource.cci.ResultSetInfo getResultSetInfo()
           
 boolean isClosed()
          Returns if this Connection is closed.
 void setInteractionHandler(InteractionHandler interactionHandler)
          Sets this connections InteractionHandler
 void setLocalTransaction(javax.resource.cci.LocalTransaction localTransaction)
          Sets the LocalTransaction
 void setMetaData(javax.resource.cci.ConnectionMetaData metaData)
          Sets this connections meta data
 void setResultSetInfo(javax.resource.cci.ResultSetInfo resultSetInfo)
          Sets this connections ResultSetInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockConnection

public MockConnection()
Method Detail

getMockLocalTransaction

public MockLocalTransaction getMockLocalTransaction()
Returns the MockLocalTransaction. If the underlying LocalTransaction is not an instance of MockLocalTransaction, this method returns null. Otherwise it returns the same object as getLocalTransaction().

Returns:
the MockLocalTransaction

getInteractionList

public java.util.List getInteractionList()
Returns the list of all created Interaction objects.

Returns:
the list Interaction objects

close

public void close()
           throws javax.resource.ResourceException
Specified by:
close in interface javax.resource.cci.Connection
Throws:
javax.resource.ResourceException

createInteraction

public javax.resource.cci.Interaction createInteraction()
                                                 throws javax.resource.ResourceException
Specified by:
createInteraction in interface javax.resource.cci.Connection
Throws:
javax.resource.ResourceException

getLocalTransaction

public javax.resource.cci.LocalTransaction getLocalTransaction()
                                                        throws javax.resource.ResourceException
Specified by:
getLocalTransaction in interface javax.resource.cci.Connection
Throws:
javax.resource.ResourceException

getMetaData

public javax.resource.cci.ConnectionMetaData getMetaData()
                                                  throws javax.resource.ResourceException
Specified by:
getMetaData in interface javax.resource.cci.Connection
Throws:
javax.resource.ResourceException

getResultSetInfo

public javax.resource.cci.ResultSetInfo getResultSetInfo()
                                                  throws javax.resource.ResourceException
Specified by:
getResultSetInfo in interface javax.resource.cci.Connection
Throws:
javax.resource.ResourceException

isClosed

public boolean isClosed()
Returns if this Connection is closed.

Returns:
true if this Interaction is closed, false otherwise

getInteractionHandler

public InteractionHandler getInteractionHandler()

setResultSetInfo

public void setResultSetInfo(javax.resource.cci.ResultSetInfo resultSetInfo)
Sets this connections ResultSetInfo

Parameters:
resultSetInfo - the ResultSetInfo

setInteractionHandler

public void setInteractionHandler(InteractionHandler interactionHandler)
Sets this connections InteractionHandler

Parameters:
interactionHandler - the InteractionHandler

setMetaData

public void setMetaData(javax.resource.cci.ConnectionMetaData metaData)
Sets this connections meta data

Parameters:
metaData - the meta data

setLocalTransaction

public void setLocalTransaction(javax.resource.cci.LocalTransaction localTransaction)
Sets the LocalTransaction

Parameters:
localTransaction - the LocalTransaction