1 18 package org.apache.beehive.netui.pageflow.handler; 19 20 import javax.servlet.ServletContext ; 21 import java.io.Serializable ; 22 23 24 27 public abstract class BaseHandler 28 implements Handler, Serializable 29 { 30 private transient ServletContext _servletContext; 31 private HandlerConfig _config; 32 private Handler _previousHandler; 33 34 protected BaseHandler() 35 { 36 } 37 38 45 public void init( HandlerConfig handlerConfig, Handler previousHandler, ServletContext servletContext ) 46 { 47 _servletContext = servletContext; 48 _previousHandler = previousHandler; 49 _config = handlerConfig; 50 } 51 52 protected final ServletContext getServletContext() 53 { 54 assert _servletContext != null; 55 return _servletContext; 56 } 57 58 protected Handler getPreviousHandler() 59 { 60 return _previousHandler; 61 } 62 63 protected HandlerConfig getConfig() 64 { 65 return _config; 66 } 67 68 public void reinit( ServletContext servletContext ) 69 { 70 _servletContext = servletContext; 71 } 72 } 73 | Popular Tags |