m.c.m.proxyma.core
Interface ResourceHandler

All Known Implementing Classes:
AbstractPreprocessor, AbstractRetriver, AbstractSerializer, AbstractTransformer, CharsetInspectorTransformer, CookiesRewritePreprocessor, CookiesRewriteTransformer, CssUrlRewriteTransformer, DebugSerializer, HtmlUrlRewriteTransformer, HttpRedirectsRewriteTransformer, JSRewriteTransformer, PerformanceTestSerializer, SimpleHttpRetriver, SimpleSerializer, StoreTimestampPreprocessor, TestPageRetriver

public interface ResourceHandler

This is the interface to implement Preprocessors, Transformers, Serializers and Retrivers. However, it's not recommanded to build plugins starting from this interface. To do so, you should extend and override the "process" method of the "AbstraceHandlers".

Version:
$Id: ResourceHandler.java 138 2010-06-20 13:53:32Z marcolinuz $
Author:
Marco Casavecchia Morganti (marcolinuz) [marcolinuz-at-gmail.com]
See Also:
AbstractPreprocessord, AbstractSerializer, AbstractTransformer and AbstractRetriver

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


Method Summary
 java.lang.String getHtmlDescription()
          Returns a short description (html formatted) of the plugin.
 java.lang.String getName()
          Returns the name of the plugin (only a name that characterize the plugin, not the class name..) that will be used into the interfaces as plugin name.
 ProxymaTags.HandlerType getType()
          Return the the type of the Resource handler.
 void process(ProxymaResource aResource)
          Implements the business logic of the plugin.
 

Method Detail

getType

ProxymaTags.HandlerType getType()
Return the the type of the Resource handler. There are 4 types of resource handlers: PREPROCESSOR, RETRIVER, TRANSFORMER and SERIALIZER.

Returns:
the value that rappresents the type of the handler.

process

void process(ProxymaResource aResource)
             throws java.lang.Exception
Implements the business logic of the plugin.

Parameters:
aResource - the resource to process.
Throws:
java.lang.Exception

getName

java.lang.String getName()
Returns the name of the plugin (only a name that characterize the plugin, not the class name..) that will be used into the interfaces as plugin name.

Returns:
the plugin name.

getHtmlDescription

java.lang.String getHtmlDescription()
Returns a short description (html formatted) of the plugin.
It will be used into the interfaces to give some information about the plugin.

Returns:
a short description of the plugin.


Copyright © 2010. All Rights Reserved.