|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jmscts.core.TestContext
Instances of this class maintain the context of the current test case.
JMSTestCase
,
JMSTestRunner
,
ProviderTestRunner
,
ConnectionTestRunner
,
SessionTestRunner
,
MessageTestRunner
,
SendReceiveTestRunner
,
TestCoverage
Constructor Summary | |
TestContext(TestContext parent,
Administrator administrator)
Construct an administrator context. |
|
TestContext(TestContext parent,
java.lang.Class messageType)
Construct a message context. |
|
TestContext(TestContext parent,
java.lang.Class messageType,
MessagingBehaviour behaviour)
Construct a send/receive context. |
|
TestContext(TestContext parent,
javax.jms.Connection connection)
Construct a connection context. |
|
TestContext(TestContext parent,
javax.jms.ConnectionFactory factory,
java.lang.Class type)
Construct a connection factory context. |
|
TestContext(TestContext parent,
javax.jms.Message message)
Construct a message context. |
|
TestContext(TestContext parent,
javax.jms.Message message,
MessagingBehaviour behaviour)
Construct a send/receive context. |
|
TestContext(TestContext parent,
javax.jms.Session session,
AckType type)
Construct a session context. |
|
TestContext(TestCoverage coverage)
Construct a requirements test root context |
|
TestContext(TestStatistics statistics)
Construct a stress test root context |
Method Summary | |
void |
close()
Close this context |
AckType |
getAckType()
Returns the current session's message acknowledgement type |
Administrator |
getAdministrator()
Returns the JMS provider's administration interface |
javax.jms.Connection |
getConnection()
Returns the current connection |
javax.jms.ConnectionFactory |
getConnectionFactory()
Returns the current connection factory |
java.lang.Class |
getConnectionFactoryType()
Returns the connection factory type |
java.lang.Class |
getConnectionType()
Returns the current connection type |
TestCoverage |
getCoverage()
Returns the test coverage of requirements |
javax.jms.Message |
getMessage()
Returns the current message |
java.lang.Class |
getMessageType()
Returns the current message type |
MessagingBehaviour |
getMessagingBehaviour()
Returns the current messaging behaviour |
TestContext |
getParent()
Returns the parent context |
javax.jms.Session |
getSession()
Returns the current session |
java.lang.Class |
getSessionType()
Returns the current session type |
TestStatistics |
getStatistics()
Returns the test statistics |
void |
invalidate()
Invalidate the connection and/or session managed by this context |
boolean |
isInvalid()
Determines if this context is invalid |
boolean |
isQueue()
Determines if the context is a queue context, i.e., point-to-point |
boolean |
isQueueConnectionFactory()
Determines if the connection factory is a QueueConnectionFactory |
boolean |
isTopic()
Determines if the context is a topic context, i.e., publish-and-subscribe |
boolean |
isTopicConnectionFactory()
Determines if the connection factory is a TopicConnectionFactory |
boolean |
isXAQueueConnectionFactory()
Determines if the connection factory is an XAQueueConnectionFactory |
boolean |
isXATopicConnectionFactory()
Determines if the connection factory is an XATopicConnectionFactory |
java.lang.String |
toString()
Returns a string representation of the context |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TestContext(TestCoverage coverage)
coverage
- the test coverage of requirementspublic TestContext(TestStatistics statistics)
statistics
- the stress test statisticspublic TestContext(TestContext parent, Administrator administrator)
parent
- a root contextadministrator
- the JMS provider administration interfacepublic TestContext(TestContext parent, javax.jms.ConnectionFactory factory, java.lang.Class type)
parent
- an administrator contextfactory
- the connection factorytype
- the connection factory interface class. This is required to
identify the connection factory implementation as some vendors
(eg. Sun) implement queue and topic connection factories using the
same class, but fail to create connections if the factory was intended
to create a different connection type.public TestContext(TestContext parent, javax.jms.Connection connection)
parent
- a connection factory contextconnection
- the connectionpublic TestContext(TestContext parent, javax.jms.Session session, AckType type)
parent
- a connection contextsession
- the sessiontype
- the message acknowledgement type of the sessionpublic TestContext(TestContext parent, java.lang.Class messageType)
parent
- a session contextmessageType
- the message typepublic TestContext(TestContext parent, javax.jms.Message message)
parent
- a session contextmessage
- the messagepublic TestContext(TestContext parent, java.lang.Class messageType, MessagingBehaviour behaviour)
parent
- a session contextmessageType
- the message typebehaviour
- the messaging behaviourpublic TestContext(TestContext parent, javax.jms.Message message, MessagingBehaviour behaviour)
parent
- a session contextmessage
- the messagebehaviour
- the messaging behaviourMethod Detail |
public TestCoverage getCoverage()
public TestStatistics getStatistics()
public Administrator getAdministrator()
public javax.jms.ConnectionFactory getConnectionFactory()
public java.lang.Class getConnectionFactoryType()
public boolean isQueueConnectionFactory()
true
if the connection factory is a
QueueConnectionFactory
public boolean isTopicConnectionFactory()
true
if the connection factory is a
TopicConnectionFactory
public boolean isXAQueueConnectionFactory()
true
if the connection factory is an
XAQueueConnectionFactory
public boolean isXATopicConnectionFactory()
true
if the connection factory is an
XATopicConnectionFactory
public boolean isQueue()
true
if this is a topic contextpublic boolean isTopic()
true
if this is a topic contextpublic javax.jms.Connection getConnection()
public java.lang.Class getConnectionType()
public javax.jms.Session getSession()
public java.lang.Class getSessionType()
public AckType getAckType()
public javax.jms.Message getMessage()
public java.lang.Class getMessageType()
public MessagingBehaviour getMessagingBehaviour()
public void invalidate()
public boolean isInvalid()
true
if this context is invalidpublic TestContext getParent()
null
if there is no parent
contextpublic void close() throws javax.jms.JMSException
javax.jms.JMSException
- if a JMS error is encounteredpublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |