public interface ProtocolHandler
createRequest()
to create a request object that will be
passed to the begin()
and beginXXX()
methods. They will in turn enrich it with values set by the user.
begin()
and beginXXX()
methods.
runTest(junit.framework.Test, junit.framework.Test, org.apache.cactus.Request)
to execute the tests.
createResponseObjectFactory(org.apache.cactus.spi.client.connector.ProtocolState)
to create a factory that is
used to create a test response object that will be passed to the
endXXX()
and end()
methods.
endXXX()
and end()
methods.
afterTest(org.apache.cactus.spi.client.connector.ProtocolState)
to let the connector implementor clean up after
the test. For example, the HTTP connector implementation closes the HTTP
connection if the user has not closed it himself.
Modifier and Type | Method and Description |
---|---|
void |
afterTest(ProtocolState theState)
Let the connector implementor clean up after the test.
|
Request |
createRequest()
Create a request object that will be passed to the
begin()
and beginXXX() methods. |
ResponseObjectFactory |
createResponseObjectFactory(ProtocolState theState)
Create a factory that is used by the core to create test response object
that will be passed to the
endXXX() and end()
methods. |
ProtocolState |
runTest(junit.framework.Test theDelegatedTest,
junit.framework.Test theWrappedTest,
Request theRequest)
Connect to the server side (to the redirector proxy), passing all
information to execute the test there, trigger the test execution and
gather the test results.
|
Request createRequest()
begin()
and beginXXX()
methods. They will in turn enrich it with
values set by the user.ProtocolState runTest(junit.framework.Test theDelegatedTest, junit.framework.Test theWrappedTest, Request theRequest) throws java.lang.Throwable
theDelegatedTest
- the Cactus test to executetheWrappedTest
- optionally specify a pure JUnit test case that is
being wrapped and will be executed on the server sidetheRequest
- the request containing data to connect to the
redirector proxycreateResponseObjectFactory(org.apache.cactus.spi.client.connector.ProtocolState)
and
afterTest(org.apache.cactus.spi.client.connector.ProtocolState)
later onjava.lang.Throwable
- any error that occurred when connecting to the
server side, when executing the test or when gathering the
test result.ResponseObjectFactory createResponseObjectFactory(ProtocolState theState)
endXXX()
and end()
methods.theState
- any state information that has been preserved from the
runTest(junit.framework.Test, junit.framework.Test, org.apache.cactus.Request)
method (e.g. the HTTP connection object)void afterTest(ProtocolState theState) throws java.lang.Exception
theState
- any state information that has been preserved from the
runTest(junit.framework.Test, junit.framework.Test, org.apache.cactus.Request)
method (e.g. the HTTP connection object)java.lang.Exception
- on errorCopyright © 2000-2004 Apache Software Foundation. All Rights Reserved.