Class TunnelFilter

java.lang.Object
org.restlet.Restlet
org.restlet.routing.Filter
org.restlet.engine.application.TunnelFilter
All Implemented Interfaces:
Uniform

public class TunnelFilter extends Filter
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
  • Constructor Details

    • TunnelFilter

      public TunnelFilter(Context context)
      Constructor.
      Parameters:
      context - The parent context.
  • Method Details

    • beforeHandle

      public int beforeHandle(Request request, Response response)
      Description copied from class: Filter
      Allows filtering before processing by the next Restlet. Returns Filter.CONTINUE by default.
      Overrides:
      beforeHandle in class Filter
      Parameters:
      request - The request to handle.
      response - The response to update.
      Returns:
      The continuation status. Either Filter.CONTINUE or Filter.SKIP or Filter.STOP.
    • getMetadataService

      public MetadataService getMetadataService()
      Returns the metadata service of the parent application.
      Returns:
      The metadata service of the parent application.
    • getTunnelService

      public TunnelService getTunnelService()
      Returns the tunnel service of the parent application.
      Returns:
      The tunnel service of the parent application.