org.littleshoot.proxy
Class ActivityTrackerAdapter

java.lang.Object
  extended by org.littleshoot.proxy.ActivityTrackerAdapter
All Implemented Interfaces:
ActivityTracker

public class ActivityTrackerAdapter
extends Object
implements ActivityTracker

Adapter of ActivityTracker interface that provides default no-op implementations of all methods.


Constructor Summary
ActivityTrackerAdapter()
           
 
Method Summary
 void bytesReceivedFromClient(FlowContext flowContext, int numberOfBytes)
          Record that the proxy received bytes from the client.
 void bytesReceivedFromServer(FullFlowContext flowContext, int numberOfBytes)
          Record that the proxy received bytes from the server.
 void bytesSentToClient(FlowContext flowContext, int numberOfBytes)
          Record that the proxy sent bytes to the client.
 void bytesSentToServer(FullFlowContext flowContext, int numberOfBytes)
          Record that the proxy attempted to send bytes to the server.
 void clientConnected(InetSocketAddress clientAddress)
          Record that a client connected.
 void clientDisconnected(InetSocketAddress clientAddress, SSLSession sslSession)
          Record that a client disconnected.
 void clientSSLHandshakeSucceeded(InetSocketAddress clientAddress, SSLSession sslSession)
          Record that a client's SSL handshake completed.
 void requestReceivedFromClient(FlowContext flowContext, io.netty.handler.codec.http.HttpRequest httpRequest)
           Record that proxy received an HttpRequest from the client.
 void requestSentToServer(FullFlowContext flowContext, io.netty.handler.codec.http.HttpRequest httpRequest)
           Record that proxy attempted to send a request to the server.
 void responseReceivedFromServer(FullFlowContext flowContext, io.netty.handler.codec.http.HttpResponse httpResponse)
           Record that the proxy received an HttpResponse from the server.
 void responseSentToClient(FlowContext flowContext, io.netty.handler.codec.http.HttpResponse httpResponse)
           Record that the proxy sent a response to the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityTrackerAdapter

public ActivityTrackerAdapter()
Method Detail

bytesReceivedFromClient

public void bytesReceivedFromClient(FlowContext flowContext,
                                    int numberOfBytes)
Description copied from interface: ActivityTracker
Record that the proxy received bytes from the client.

Specified by:
bytesReceivedFromClient in interface ActivityTracker
Parameters:
flowContext - if full information is available, this will be a FullFlowContext.

requestReceivedFromClient

public void requestReceivedFromClient(FlowContext flowContext,
                                      io.netty.handler.codec.http.HttpRequest httpRequest)
Description copied from interface: ActivityTracker

Record that proxy received an HttpRequest from the client.

Note - on chunked transfers, this is only called once (for the initial HttpRequest object).

Specified by:
requestReceivedFromClient in interface ActivityTracker
Parameters:
flowContext - if full information is available, this will be a FullFlowContext.

bytesSentToServer

public void bytesSentToServer(FullFlowContext flowContext,
                              int numberOfBytes)
Description copied from interface: ActivityTracker
Record that the proxy attempted to send bytes to the server.

Specified by:
bytesSentToServer in interface ActivityTracker
Parameters:
flowContext - provides contextual information about the flow

requestSentToServer

public void requestSentToServer(FullFlowContext flowContext,
                                io.netty.handler.codec.http.HttpRequest httpRequest)
Description copied from interface: ActivityTracker

Record that proxy attempted to send a request to the server.

Note - on chunked transfers, this is only called once (for the initial HttpRequest object).

Specified by:
requestSentToServer in interface ActivityTracker
Parameters:
flowContext - provides contextual information about the flow

bytesReceivedFromServer

public void bytesReceivedFromServer(FullFlowContext flowContext,
                                    int numberOfBytes)
Description copied from interface: ActivityTracker
Record that the proxy received bytes from the server.

Specified by:
bytesReceivedFromServer in interface ActivityTracker
Parameters:
flowContext - provides contextual information about the flow

responseReceivedFromServer

public void responseReceivedFromServer(FullFlowContext flowContext,
                                       io.netty.handler.codec.http.HttpResponse httpResponse)
Description copied from interface: ActivityTracker

Record that the proxy received an HttpResponse from the server.

Note - on chunked transfers, this is only called once (for the initial HttpRequest object).

Specified by:
responseReceivedFromServer in interface ActivityTracker
Parameters:
flowContext - provides contextual information about the flow

bytesSentToClient

public void bytesSentToClient(FlowContext flowContext,
                              int numberOfBytes)
Description copied from interface: ActivityTracker
Record that the proxy sent bytes to the client.

Specified by:
bytesSentToClient in interface ActivityTracker
Parameters:
flowContext - if full information is available, this will be a FullFlowContext.

responseSentToClient

public void responseSentToClient(FlowContext flowContext,
                                 io.netty.handler.codec.http.HttpResponse httpResponse)
Description copied from interface: ActivityTracker

Record that the proxy sent a response to the client.

Note - on chunked transfers, this is only called once (for the initial HttpRequest object).

Specified by:
responseSentToClient in interface ActivityTracker
Parameters:
flowContext - if full information is available, this will be a FullFlowContext.

clientConnected

public void clientConnected(InetSocketAddress clientAddress)
Description copied from interface: ActivityTracker
Record that a client connected.

Specified by:
clientConnected in interface ActivityTracker

clientSSLHandshakeSucceeded

public void clientSSLHandshakeSucceeded(InetSocketAddress clientAddress,
                                        SSLSession sslSession)
Description copied from interface: ActivityTracker
Record that a client's SSL handshake completed.

Specified by:
clientSSLHandshakeSucceeded in interface ActivityTracker

clientDisconnected

public void clientDisconnected(InetSocketAddress clientAddress,
                               SSLSession sslSession)
Description copied from interface: ActivityTracker
Record that a client disconnected.

Specified by:
clientDisconnected in interface ActivityTracker


Copyright © 2009-2014 LittleShoot. All Rights Reserved.