com.noelios.restlet.application
Class ApplicationHelper

java.lang.Object
  extended by org.restlet.util.Helper<T>
      extended by com.noelios.restlet.ChainHelper<Application>
          extended by com.noelios.restlet.application.ApplicationHelper

public class ApplicationHelper
extends ChainHelper<Application>

Application implementation.

Author:
Jerome Louvel

Constructor Summary
ApplicationHelper(Application application)
          Constructor.
 
Method Summary
protected  Filter createDecoderFilter(Application application)
          Creates a new decoder filter.
protected  Filter createRangeFilter(Context context)
          Creates a new Range filter.
protected  Filter createStatusFilter(Application application)
          Creates a new status filter.
protected  Filter createTunnelFilter(Context context)
          Creates a new tunnel filter.
 void handle(Request request, Response response)
          In addition to the default behavior, it saves the current application instance into the current thread.
 void start()
          Start hook.
 void stop()
           
 void update()
           
 
Methods inherited from class com.noelios.restlet.ChainHelper
addFilter, clear, createLogFilter, getFirst, getLast, setFirst, setLast, setNext
 
Methods inherited from class org.restlet.util.Helper
getAttributes, getContext, getHelped, getHelpedParameters, getLogger, setHelped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationHelper

public ApplicationHelper(Application application)
Constructor.

Parameters:
application - The application to help.
Method Detail

createDecoderFilter

protected Filter createDecoderFilter(Application application)
Creates a new decoder filter. Allows overriding.

Parameters:
application - The parent application.
Returns:
The new decoder filter.

createStatusFilter

protected Filter createStatusFilter(Application application)
Creates a new status filter. Allows overriding.

Parameters:
application - The parent application.
Returns:
The new status filter.

createTunnelFilter

protected Filter createTunnelFilter(Context context)
Creates a new tunnel filter. Allows overriding.

Parameters:
context - The parent context.
Returns:
The new tunnel filter.

createRangeFilter

protected Filter createRangeFilter(Context context)
Creates a new Range filter. Allows overriding.

Parameters:
context - The parent context.
Returns:
The new range filter.

handle

public void handle(Request request,
                   Response response)
In addition to the default behavior, it saves the current application instance into the current thread.

Overrides:
handle in class ChainHelper<Application>
Parameters:
request - The request to handle.
response - The response to update.

start

public void start()
           throws java.lang.Exception
Start hook.

Specified by:
start in class Helper<Application>
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in class Helper<Application>
Throws:
java.lang.Exception

update

public void update()
            throws java.lang.Exception
Specified by:
update in class Helper<Application>
Throws:
java.lang.Exception


Copyright © 2005-2008 Noelios Technologies.