org.restlet.engine
Class CompositeHelper<T extends Restlet>

java.lang.Object
  extended by org.restlet.engine.Helper
      extended by org.restlet.engine.RestletHelper<T>
          extended by org.restlet.engine.CompositeHelper<T>
Direct Known Subclasses:
ApplicationHelper, ComponentHelper

public abstract class CompositeHelper<T extends Restlet>
extends RestletHelper<T>

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

Author:
Jerome Louvel

Constructor Summary
CompositeHelper(T helped)
          Constructor.
 
Method Summary
protected  void addInboundFilter(Filter filter)
          Adds a new inbound filter to the chain.
protected  void addOutboundFilter(Filter filter)
          Adds a new outbound filter to the chain.
 void clear()
          Clears the chain.
 Filter getFirstInboundFilter()
          Returns the first inbound filter.
 Filter getFirstOutboundFilter()
          Returns the first outbound filter.
protected  Restlet getInboundNext()
          Returns the next Restlet in the inbound chain.
protected  Filter getLastInboundFilter()
          Returns the last inbound filter.
protected  Filter getLastOutboundFilter()
          Returns the last outbound filter.
 Restlet getOutboundNext()
          Returns the next Restlet in the outbound chain.
 void handle(Request request, Response response)
          Handles a call.
protected  void setFirstInboundFilter(Filter firstInboundFilter)
          Sets the first inbound filter.
protected  void setFirstOutboundFilter(Filter firstOutboundFilter)
          Sets the first outbound filter.
protected  void setInboundNext(Restlet next)
          Sets the next Restlet after the inbound chain.
protected  void setLastInboundFilter(Filter last)
          Sets the last inbound filter.
protected  void setLastOutboundFilter(Filter last)
          Sets the last outbound filter.
protected  void setOutboundNext(Restlet next)
          Sets the next Restlet after the outbound chain.
 
Methods inherited from class org.restlet.engine.RestletHelper
getAttributes, getContext, getHelped, getHelpedParameters, getLogger, getMetadataService, setHelped, start, stop, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeHelper

public CompositeHelper(T helped)
Constructor.

Parameters:
helped - The helped Restlet.
Method Detail

addInboundFilter

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

Parameters:
filter - The inbound filter to add.

addOutboundFilter

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

Parameters:
filter - The outbound filter to add.

clear

public void clear()
Clears the chain. Sets the first and last filters to null.


getFirstInboundFilter

public Filter getFirstInboundFilter()
Returns the first inbound filter.

Returns:
The first inbound filter.

getFirstOutboundFilter

public Filter getFirstOutboundFilter()
Returns the first outbound filter.

Returns:
The first outbound filter.

getInboundNext

protected Restlet getInboundNext()
Returns the next Restlet in the inbound chain.

Returns:
The next Restlet in the inbound chain.

getLastInboundFilter

protected Filter getLastInboundFilter()
Returns the last inbound filter.

Returns:
the last inbound filter.

getLastOutboundFilter

protected Filter getLastOutboundFilter()
Returns the last outbound filter.

Returns:
the last outbound filter.

getOutboundNext

public Restlet getOutboundNext()
Returns the next Restlet in the outbound chain.

Returns:
The next Restlet in the outbound chain.

handle

public void handle(Request request,
                   Response response)
Description copied from class: RestletHelper
Handles a call.

Overrides:
handle in class RestletHelper<T extends Restlet>
Parameters:
request - The request to handle.
response - The response to update.

setFirstInboundFilter

protected void setFirstInboundFilter(Filter firstInboundFilter)
Sets the first inbound filter.

Parameters:
firstInboundFilter - The first inbound filter.

setFirstOutboundFilter

protected void setFirstOutboundFilter(Filter firstOutboundFilter)
Sets the first outbound filter.

Parameters:
firstOutboundFilter - The first outbound filter.

setInboundNext

protected void setInboundNext(Restlet next)
Sets the next Restlet after the inbound chain.

Parameters:
next - The Restlet to process after the inbound chain.

setLastInboundFilter

protected void setLastInboundFilter(Filter last)
Sets the last inbound filter.

Parameters:
last - The last inbound filter.

setLastOutboundFilter

protected void setLastOutboundFilter(Filter last)
Sets the last outbound filter.

Parameters:
last - The last outbound filter.

setOutboundNext

protected void setOutboundNext(Restlet next)
Sets the next Restlet after the outbound chain.

Parameters:
next - The Restlet to process after the outbound chain.


Copyright © 2005-2013 Restlet.