org.apache.ws.commons.tcpmon.core.ui
Class AbstractRequestResponse

java.lang.Object
  extended by org.apache.ws.commons.tcpmon.core.ui.AbstractRequestResponse
All Implemented Interfaces:
RequestResponseListener
Direct Known Subclasses:
RequestResponse, RequestResponse

public abstract class AbstractRequestResponse
extends Object
implements 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
AbstractRequestResponse(Configuration config)
           
 
Method Summary
abstract  String getRequestAsString()
           
 OutputStream getRequestOutputStream()
          Get the output stream to which a copy of the request will be written.
protected abstract  Writer getRequestWriter()
           
abstract  String getResponseAsString()
           
 OutputStream getResponseOutputStream()
          Get the output stream to which a copy of the response will be written
protected abstract  Writer getResponseWriter()
           
 String getTargetHost()
           
 int getTargetPort()
           
protected static String getTime()
           
 void onError(Throwable ex)
           
protected abstract  void setOutHost(String outHost)
           
protected abstract  void setRequest(String request)
           
 void setState(int state)
           
protected abstract  void setState(String 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
 
Methods inherited from interface org.apache.ws.commons.tcpmon.core.engine.RequestResponseListener
setElapsed
 

Constructor Detail

AbstractRequestResponse

public AbstractRequestResponse(Configuration config)
Method Detail

getTime

protected static String getTime()

setState

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

getTargetHost

public String getTargetHost()

getTargetPort

public int getTargetPort()

setTarget

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

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

setState

protected abstract void setState(String state)

setOutHost

protected abstract void setOutHost(String outHost)

setRequest

protected abstract void setRequest(String request)

getRequestWriter

protected abstract Writer getRequestWriter()

getResponseWriter

protected abstract Writer getResponseWriter()

getRequestAsString

public abstract String getRequestAsString()

getResponseAsString

public abstract String getResponseAsString()


Copyright © The Apache Software Foundation. All Rights Reserved.