com.noelios.restlet.application
Class TunnelFilter

java.lang.Object
  extended by org.restlet.Uniform
      extended by org.restlet.Restlet
          extended by org.restlet.Filter
              extended by com.noelios.restlet.application.TunnelFilter

public class TunnelFilter
extends Filter

Filter tunnelling browser calls into full REST calls. The request method can be changed (via POST requests only) as well as the accepted media types, languages, encodings and character sets.

Author:
Jerome Louvel (contact@noelios.com)

Constructor Summary
TunnelFilter(Application application)
          Constructor.
 
Method Summary
 void beforeHandle(Request request, Response response)
          Allows filtering before its handling by the target Restlet.
 Application getApplication()
          Returns the application.
 
Methods inherited from class org.restlet.Filter
afterHandle, doHandle, getNext, handle, hasNext, setNext, setNext
 
Methods inherited from class org.restlet.Restlet
getContext, getLogger, init, isStarted, isStopped, setContext, start, stop
 
Methods inherited from class org.restlet.Uniform
delete, delete, get, get, handle, head, head, options, options, post, post, put, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TunnelFilter

public TunnelFilter(Application application)
Constructor.

Parameters:
application - The parent application.
Method Detail

getApplication

public Application getApplication()
Returns the application.

Returns:
The application.

beforeHandle

public void beforeHandle(Request request,
                         Response response)
Allows filtering before its handling by the target Restlet. Does nothing by default.

Overrides:
beforeHandle in class Filter
Parameters:
request - The request to handle.
response - The response to update.


Copyright © 2005-2007 Noelios Consulting.