org.apache.activemq.util
Class RestFilter

java.lang.Object
  extended by org.apache.activemq.util.RestFilter
All Implemented Interfaces:
Filter

public class RestFilter
extends Object
implements Filter

Adds support for HTTP PUT, MOVE and DELETE methods. If init parameters read-permission-role and write-permission-role are defined then all requests are authorized using the defined roles. Also GET methods are authorized.

Author:
Aleksi Kallio

Constructor Summary
RestFilter()
           
 
Method Summary
protected  boolean checkGet(HttpServletRequest request, HttpServletResponse response)
           
 void destroy()
           
protected  void doDelete(HttpServletRequest request, HttpServletResponse response)
           
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
protected  void doMove(HttpServletRequest request, HttpServletResponse response)
           
protected  void doPut(HttpServletRequest request, HttpServletResponse response)
           
 void init(FilterConfig filterConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestFilter

public RestFilter()
Method Detail

init

public void init(FilterConfig filterConfig)
          throws UnavailableException
Specified by:
init in interface Filter
Throws:
UnavailableException

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Specified by:
doFilter in interface Filter
Throws:
IOException
ServletException

doMove

protected void doMove(HttpServletRequest request,
                      HttpServletResponse response)
               throws ServletException,
                      IOException
Throws:
ServletException
IOException

checkGet

protected boolean checkGet(HttpServletRequest request,
                           HttpServletResponse response)
                    throws ServletException,
                           IOException
Throws:
ServletException
IOException

doPut

protected void doPut(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,
                     IOException
Throws:
ServletException
IOException

doDelete

protected void doDelete(HttpServletRequest request,
                        HttpServletResponse response)
                 throws ServletException,
                        IOException
Throws:
ServletException
IOException

destroy

public void destroy()
Specified by:
destroy in interface Filter


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.