1 16 package org.directwebremoting; 17 18 import javax.servlet.ServletConfig ; 19 import javax.servlet.ServletContext ; 20 import javax.servlet.http.HttpServletRequest ; 21 import javax.servlet.http.HttpServletResponse ; 22 23 27 public class WebContextFactory 28 { 29 34 public static WebContext get() 35 { 36 if (builder == null) 37 { 38 return null; 39 } 40 41 return builder.get(); 42 } 43 44 50 public static void setWebContextBuilder(WebContextBuilder builder) 51 { 52 WebContextFactory.builder = builder; 53 } 54 55 58 private static WebContextBuilder builder; 59 60 63 public interface WebContextBuilder 64 { 65 75 void set(HttpServletRequest request, HttpServletResponse response, ServletConfig config, ServletContext context, Container container); 76 77 80 WebContext get(); 81 82 87 void unset(); 88 } 89 } 90 | Popular Tags |