rabbit.proxy
Class StandardOutTrafficLogger

java.lang.Object
  extended by rabbit.proxy.StandardOutTrafficLogger
All Implemented Interfaces:
ClientTrafficLogger

public class StandardOutTrafficLogger
extends Object
implements ClientTrafficLogger

A simple ClientTrafficLogger that just writes simple network usage to standard out.

Author:
Robert Olofsson

Constructor Summary
StandardOutTrafficLogger()
           
 
Method Summary
 void logTraffic(String user, HttpHeader request, TrafficLogger client, TrafficLogger network, TrafficLogger cache, TrafficLogger proxy)
          Log the traffic usage for the given user and request.
 void setup(SProperties properties, HttpProxy proxy)
          Setup this logger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardOutTrafficLogger

public StandardOutTrafficLogger()
Method Detail

logTraffic

public void logTraffic(String user,
                       HttpHeader request,
                       TrafficLogger client,
                       TrafficLogger network,
                       TrafficLogger cache,
                       TrafficLogger proxy)
Description copied from interface: ClientTrafficLogger
Log the traffic usage for the given user and request.

Specified by:
logTraffic in interface ClientTrafficLogger
Parameters:
user - the authenticated user, may be null if user is not authenticated
request - the actual http request header
client - the traffic between the client and the proxy
network - the traffic between the proxy and the network
cache - the traffic between the proxy and the cache
proxy - the traffic generated by the proxy

setup

public void setup(SProperties properties,
                  HttpProxy proxy)
Description copied from interface: ClientTrafficLogger
Setup this logger

Specified by:
setup in interface ClientTrafficLogger
Parameters:
properties - the SProperties to get the settings from.
proxy - the HttpProxy that is using this logger