com.noelios.restlet
Class ChainHelper

java.lang.Object
  extended by org.restlet.util.Helper
      extended by com.noelios.restlet.ChainHelper
Direct Known Subclasses:
ComponentHelper

public abstract class ChainHelper
extends Helper

Chain helper serving as base class for Application and Component helpers.

Author:
Jerome Louvel (contact@noelios.com)

Constructor Summary
ChainHelper(Context parentContext)
          Constructor.
 
Method Summary
protected  void addFilter(Filter filter)
          Adds a new filter to the chain.
protected  Filter createLogFilter(Context context, LogService logService)
          Creates a new log filter.
protected  Restlet getFirst()
          Returns the first Restlet.
 Context getParentContext()
          Returns the parent context, typically the component's context.
protected  void setFirst(Restlet first)
          Sets the first Restlet.
 
Methods inherited from class org.restlet.util.Helper
createContext, handle, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainHelper

public ChainHelper(Context parentContext)
Constructor.

Parameters:
parentContext - The parent context, typically the component's context.
Method Detail

getParentContext

public Context getParentContext()
Returns the parent context, typically the component's context.

Returns:
The parent context.

addFilter

protected void addFilter(Filter filter)
Adds a new filter to the chain.

Parameters:
filter - The filter to add.

createLogFilter

protected Filter createLogFilter(Context context,
                                 LogService logService)
Creates a new log filter. Allows overriding.

Parameters:
context - The context.
logService - The log service descriptor.
Returns:
The new log filter.

getFirst

protected Restlet getFirst()
Returns the first Restlet.

Returns:
the first Restlet.

setFirst

protected void setFirst(Restlet first)
Sets the first Restlet.

Parameters:
first - The first Restlet.


Copyright © 2005-2007 Noelios Consulting.