org.ow2.jonas.lib.tenant.filter
Class HttpTenantIdFilter

java.lang.Object
  extended by org.ow2.jonas.lib.tenant.filter.HttpTenantIdFilter
All Implemented Interfaces:
Filter

public class HttpTenantIdFilter
extends Object
implements Filter

Implementation of the HTTP filter for the tenant context

Author:
Mohammed Boukada

Constructor Summary
HttpTenantIdFilter(String tenantId)
          The constructor with build of the tenant context.
 
Method Summary
 void destroy()
          Destroy method for this filter.
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
          Do the filter process.
 void init(FilterConfig filterConfig)
          Init method for this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpTenantIdFilter

public HttpTenantIdFilter(String tenantId)
The constructor with build of the tenant context.

Parameters:
tenantId - The tenant identifier
Method Detail

init

public void init(FilterConfig filterConfig)
          throws ServletException
Init method for this filter.

Specified by:
init in interface Filter
Parameters:
filterConfig - the filter config to init.
Throws:
ServletException

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws IOException,
                     ServletException
Do the filter process.

Specified by:
doFilter in interface Filter
Parameters:
request - The servlet request we are processing
response - The servlet response we are creating
chain - The filter chain we are processing
Throws:
IOException - if an input/output error occurs
ServletException - if a servlet error occurs

destroy

public void destroy()
Destroy method for this filter.

Specified by:
destroy in interface Filter


Copyright © 2013 OW2 Consortium. All Rights Reserved.