org.apache.ws.commons.tcpmon.core.engine
Class Dump

java.lang.Object
  extended by org.apache.ws.commons.tcpmon.core.engine.Dump
All Implemented Interfaces:
InterceptorListener, RequestResponseListener

public class Dump
extends Object
implements InterceptorListener, RequestResponseListener


Field Summary
 
Fields inherited from interface org.apache.ws.commons.tcpmon.core.engine.RequestResponseListener
STATE_ACTIVE, STATE_DONE, STATE_ERROR, STATE_REQ, STATE_RESP
 
Constructor Summary
Dump(OutputStream out)
           
Dump(OutputStream requestOut, OutputStream responseOut)
           
 
Method Summary
 RequestResponseListener createRequestResponseListener(String fromHost)
          Create a listener for a new request-response exchange.
 OutputStream getRequestOutputStream()
          Get the output stream to which a copy of the request will be written.
 OutputStream getResponseOutputStream()
          Get the output stream to which a copy of the response will be written
 void onError(Throwable ex)
           
 void onServerSocketError(Throwable ex)
           
 void onServerSocketStart()
           
 void setElapsed(long elapsed)
           
 void setState(int state)
           
 void setTarget(String targetHost, int targetPort)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dump

public Dump(OutputStream requestOut,
            OutputStream responseOut)

Dump

public Dump(OutputStream out)
Method Detail

createRequestResponseListener

public RequestResponseListener createRequestResponseListener(String fromHost)
Description copied from interface: InterceptorListener
Create a listener for a new request-response exchange.

Specified by:
createRequestResponseListener in interface InterceptorListener
Returns:
the listener or null if the implementation is not interested in receiving events for a request-response exchange

onServerSocketError

public void onServerSocketError(Throwable ex)
Specified by:
onServerSocketError in interface InterceptorListener

onServerSocketStart

public void onServerSocketStart()
Specified by:
onServerSocketStart in interface InterceptorListener

getRequestOutputStream

public OutputStream getRequestOutputStream()
Description copied from interface: RequestResponseListener
Get the output stream to which a copy of the request will be written.

Specified by:
getRequestOutputStream in interface RequestResponseListener
Returns:
an output stream or null if the implementation doesn't want to receive a copy of the request

getResponseOutputStream

public OutputStream getResponseOutputStream()
Description copied from interface: RequestResponseListener
Get the output stream to which a copy of the response will be written

Specified by:
getResponseOutputStream in interface RequestResponseListener
Returns:
an output stream or null if the implementation doesn't want to receive a copy of the response

onError

public void onError(Throwable ex)
Specified by:
onError in interface RequestResponseListener

setElapsed

public void setElapsed(long elapsed)
Specified by:
setElapsed in interface RequestResponseListener

setState

public void setState(int state)
Specified by:
setState in interface RequestResponseListener

setTarget

public void setTarget(String targetHost,
                      int targetPort)
Specified by:
setTarget in interface RequestResponseListener


Copyright © The Apache Software Foundation. All Rights Reserved.