1 16 package org.directwebremoting; 17 18 import javax.servlet.ServletConfig ; 19 import javax.servlet.ServletContext ; 20 21 25 public class ServerContextFactory 26 { 27 32 public static ServerContext get(ServletContext ctx) 33 { 34 if (builder == null) 35 { 36 return null; 37 } 38 39 return builder.get(ctx); 40 } 41 42 48 public static void setServerContextBuilder(ServerContextBuilder builder) 49 { 50 ServerContextFactory.builder = builder; 51 } 52 53 56 private static ServerContextBuilder builder; 57 58 61 public interface ServerContextBuilder 62 { 63 70 void set(ServletConfig config, ServletContext context, Container container); 71 72 77 ServerContext get(ServletContext context); 78 } 79 } 80 | Popular Tags |