m.c.m.proxyma.plugins.serializers
Class PerformanceTestSerializer

java.lang.Object
  extended by m.c.m.proxyma.plugins.serializers.AbstractSerializer
      extended by m.c.m.proxyma.plugins.serializers.SimpleSerializer
          extended by m.c.m.proxyma.plugins.serializers.PerformanceTestSerializer
All Implemented Interfaces:
ResourceHandler

public class PerformanceTestSerializer
extends SimpleSerializer

This plugin extends the Simple Serializer adding to it an ulterior logger.
Its purpose is to write a log file with the time elapsed to serve the requests. It register also if there was a cache-hit.

NOTE: this software is released under GPL License. See the LICENSE of this distribution for more informations.

Version:
$Id: PerformanceTestSerializer.java 170 2010-07-02 21:16:10Z marcolinuz $
Author:
Marco Casavecchia Morganti (marcolinuz) [marcolinuz-at-gmail.com]

Constructor Summary
PerformanceTestSerializer(ProxymaContext context)
          The default constructor for this class
It prepares the context logger and the logger for the access-log.
 
Method Summary
 java.lang.String getHtmlDescription()
          Returns a short description of what the plugin does..
 java.lang.String getName()
          Returns the name of the plugin.
 void process(ProxymaResource aResource)
          This method uses its base class to send back to the client the response-data of the resource.
 
Methods inherited from class m.c.m.proxyma.plugins.serializers.AbstractSerializer
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerformanceTestSerializer

public PerformanceTestSerializer(ProxymaContext context)
The default constructor for this class
It prepares the context logger and the logger for the access-log. NOTE: Every plugin must have a constructor that takes a ProxymaContext as parameter.

Method Detail

process

public void process(ProxymaResource aResource)
             throws java.io.IOException
This method uses its base class to send back to the client the response-data of the resource.
Then It writes the performances log.

Specified by:
process in interface ResourceHandler
Overrides:
process in class SimpleSerializer
Parameters:
aResource - any ProxymaResource
Throws:
java.io.IOException

getName

public java.lang.String getName()
Returns the name of the plugin.

Specified by:
getName in interface ResourceHandler
Overrides:
getName in class SimpleSerializer
Returns:
the name of the plugin.

getHtmlDescription

public java.lang.String getHtmlDescription()
Returns a short description of what the plugin does..
You can use html tags into it.
The result of this method call can be used by any interface to explain for what is the puropse of the plugin.

Specified by:
getHtmlDescription in interface ResourceHandler
Overrides:
getHtmlDescription in class SimpleSerializer
Returns:
a short description of the plugin


Copyright © 2010. All Rights Reserved.