m.c.m.proxyma.plugins.serializers
Class SimpleSerializer

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

public class SimpleSerializer
extends AbstractSerializer

This plugin implements a simple serializer.
Its work is to send back to the client the response adding to it only a few useful headers.
It writes also the "access log" in common logging format."

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

Version:
$Id: SimpleSerializer.java 176 2010-07-03 09:02:14Z marcolinuz $
Author:
Marco Casavecchia Morganti (marcolinuz) [marcolinuz-at-gmail.com]

Constructor Summary
SimpleSerializer(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 sends back to the client the response-data of the resource adding to it only some useful headers.
 
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

SimpleSerializer

public SimpleSerializer(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 sends back to the client the response-data of the resource adding to it only some useful headers.
It writes also the access log records in common logging format.

Specified by:
process in interface ResourceHandler
Specified by:
process in class AbstractSerializer
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
Specified by:
getName in class AbstractSerializer
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
Specified by:
getHtmlDescription in class AbstractSerializer
Returns:
a short description of the plugin


Copyright © 2010. All Rights Reserved.