m.c.m.proxyma.plugins.serializers
Class DebugSerializer

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

public class DebugSerializer
extends AbstractSerializer

This plugin is a simple text serializer.
Its work is to dump all the data of the request, of the original response and of the transformed response in text mode.
NOTE: It oesn't writes the "access log" entries because it's supposed to be a debug plugin."

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

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

Constructor Summary
DebugSerializer(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

DebugSerializer

public DebugSerializer(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.lang.Exception
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.lang.Exception

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.