org.apache.cactus.internal.client.connector.http
Class JmsProtocolHandler

java.lang.Object
  extended by org.apache.cactus.internal.client.connector.http.JmsProtocolHandler
All Implemented Interfaces:
ProtocolHandler

public class JmsProtocolHandler
extends java.lang.Object
implements ProtocolHandler

The JMS protocol handler.

Author:
ptahchiev

Constructor Summary
JmsProtocolHandler(JmsConfiguration theConfiguration)
           
 
Method Summary
 void afterTest(ProtocolState theState)
          A method that gets executed after the test execution.
 Request createRequest()
          A method to create a request object.
 ResponseObjectFactory createResponseObjectFactory(ProtocolState theState)
          TODO implement this method.
 ProtocolState runTest(junit.framework.Test theDelegatedTest, junit.framework.Test theWrappedTest, Request theRequest)
          The method that actually runs the tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsProtocolHandler

public JmsProtocolHandler(JmsConfiguration theConfiguration)
Parameters:
theConfiguration - configuration data
Method Detail

afterTest

public void afterTest(ProtocolState theState)
               throws java.lang.Exception
A method that gets executed after the test execution.

Specified by:
afterTest in interface ProtocolHandler
Parameters:
theProtocolState - the state of the protocol after the execution.
Throws:
java.lang.Exception - on error

createRequest

public Request createRequest()
A method to create a request object.

Specified by:
createRequest in interface ProtocolHandler
Returns:
Request

createResponseObjectFactory

public ResponseObjectFactory createResponseObjectFactory(ProtocolState theState)
TODO implement this method.

Specified by:
createResponseObjectFactory in interface ProtocolHandler
Parameters:
theState - any state information that has been preserved from the ProtocolHandler.runTest(junit.framework.Test, junit.framework.Test, org.apache.cactus.Request) method (e.g. the HTTP connection object)
Returns:
the response object factory

runTest

public ProtocolState runTest(junit.framework.Test theDelegatedTest,
                             junit.framework.Test theWrappedTest,
                             Request theRequest)
                      throws java.lang.Throwable
The method that actually runs the tests.

Specified by:
runTest in interface ProtocolHandler
Parameters:
theDelegatedTest -
theWrappedTest -
theRequest -
Returns:
an object holding state information that should be preserved and that will be passed to ProtocolHandler.createResponseObjectFactory(org.apache.cactus.spi.client.connector.ProtocolState) and ProtocolHandler.afterTest(org.apache.cactus.spi.client.connector.ProtocolState) later on
Throws:
java.lang.Throwable - any error that occurred when connecting to the server side, when executing the test or when gathering the test result.


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.