Package org.restlet.engine.application
Class TunnelFilter
java.lang.Object
org.restlet.Restlet
org.restlet.routing.Filter
org.restlet.engine.application.TunnelFilter
- All Implemented Interfaces:
Uniform
Filter tunneling 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.
Concurrency note: instances of this class or its subclasses can be invoked by
several threads at the same time and therefore must be thread-safe. You
should be especially careful when storing state in member variables.
- Author:
- Jerome Louvel
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbeforeHandle(Request request, Response response) Allows filtering before processing by the next Restlet.Returns the metadata service of the parent application.Returns the tunnel service of the parent application.Methods inherited from class org.restlet.routing.Filter
afterHandle, doHandle, getNext, handle, hasNext, setNext, setNext, start, stopMethods inherited from class org.restlet.Restlet
createFinder, finalize, getApplication, getAuthor, getContext, getDescription, getFinderClass, getLogger, getName, getOwner, handle, handle, handle, isStarted, isStopped, setAuthor, setContext, setDescription, setFinderClass, setName, setOwner
-
Constructor Details
-
TunnelFilter
Constructor.- Parameters:
context- The parent context.
-
-
Method Details
-
beforeHandle
Description copied from class:FilterAllows filtering before processing by the next Restlet. ReturnsFilter.CONTINUEby default.- Overrides:
beforeHandlein classFilter- Parameters:
request- The request to handle.response- The response to update.- Returns:
- The continuation status. Either
Filter.CONTINUEorFilter.SKIPorFilter.STOP.
-
getMetadataService
Returns the metadata service of the parent application.- Returns:
- The metadata service of the parent application.
-
getTunnelService
Returns the tunnel service of the parent application.- Returns:
- The tunnel service of the parent application.
-