| /*========================================================================= |
| * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved. |
| * This product is protected by U.S. and international copyright |
| * and intellectual property laws. Pivotal products are covered by |
| * one or more patents listed at http://www.pivotal.io/patents. |
| *========================================================================= |
| */ |
| /* |
| * To change this template, choose Tools | Templates |
| * and open the template in the editor. |
| */ |
| package com.gemstone.gemfire.modules.session.filter; |
| |
| import java.io.IOException; |
| import javax.servlet.ServletConfig; |
| import javax.servlet.ServletContext; |
| import javax.servlet.ServletException; |
| import javax.servlet.http.HttpServletRequest; |
| import javax.servlet.http.HttpServletResponse; |
| |
| import org.eclipse.jetty.servlet.DefaultServlet; |
| /** |
| * |
| */ |
| public class BasicServlet extends DefaultServlet { |
| |
| Callback callback = null; |
| |
| @Override |
| public void doGet(HttpServletRequest request, HttpServletResponse response) |
| throws IOException, ServletException { |
| |
| if (callback != null) { |
| callback.call(request, response); |
| } |
| } |
| |
| @Override |
| public void init(ServletConfig config) throws ServletException { |
| super.init(config); |
| ServletContext context = config.getServletContext(); |
| |
| String cbInitParam = config.getInitParameter("test.callback"); |
| callback = (Callback) context.getAttribute(cbInitParam); |
| } |
| } |