org.apache.axis2.transport.testkit.endpoint
Interface AsyncEndpoint<M>

Type Parameters:
M -
All Known Implementing Classes:
AsyncEndpointAdapter, AxisAsyncEndpoint, JettyAsyncEndpoint, JettyByteArrayAsyncEndpoint, JettyRESTAsyncEndpoint

public interface AsyncEndpoint<M>

Interface implemented by in-only test endpoints.

The endpoint must be ready to receive messages immediately after it has been set up. In particular implementations must not make the assumption that messages are only during a call to waitForMessage(int). Indeed, a typical test case will set up the endpoint, send a message and only afterwards call waitForMessage(int).

There are two strategies to guarantee this behavior:

See Also:
org.apache.axis2.transport.testkit.endpoint

Method Summary
 void clear()
          Discard any pending messages.
 IncomingMessage<M> waitForMessage(int timeout)
           
 

Method Detail

clear

void clear()
           throws java.lang.Exception
Discard any pending messages.

Throws:
java.lang.Exception

waitForMessage

IncomingMessage<M> waitForMessage(int timeout)
                                  throws java.lang.Throwable
Throws:
java.lang.Throwable


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