void requestAttributeAdded(ServletRequest request, String name, Object o) { final ServletRequestAttributeEvent event = new ServletRequestAttributeEvent( context, request, name, o); fireEvent(REQUEST_ATTRIBUTE_LISTENER_CLASS, new EventInvoker<ServletRequestAttributeListener>() { public void invoke(ServletRequestAttributeListener listener) { listener.attributeAdded(event); } }); }
void requestAttributeReplaced(ServletRequest request, String name, Object value) { final ServletRequestAttributeEvent event = new ServletRequestAttributeEvent( context, request, name, value); fireEvent(REQUEST_ATTRIBUTE_LISTENER_CLASS, new EventInvoker<ServletRequestAttributeListener>() { public void invoke(ServletRequestAttributeListener listener) { listener.attributeReplaced(event); } }); }
void requestAttributeRemoved(ServletRequest request, String name, Object removed) { final ServletRequestAttributeEvent event = new ServletRequestAttributeEvent( context, request, name, removed); fireEvent(REQUEST_ATTRIBUTE_LISTENER_CLASS, new EventInvoker<ServletRequestAttributeListener>() { public void invoke(ServletRequestAttributeListener listener) { listener.attributeRemoved(event); } }); }
void requestAttributeReplaced(ServletRequest request, String name, Object value) { final ServletRequestAttributeEvent event = new ServletRequestAttributeEvent( context, request, name, value); fireEvent(REQUEST_ATTRIBUTE_LISTENER_CLASS, new EventInvoker<ServletRequestAttributeListener>() { public void invoke(ServletRequestAttributeListener listener) { listener.attributeReplaced(event); } }); }
void requestAttributeAdded(ServletRequest request, String name, Object o) { final ServletRequestAttributeEvent event = new ServletRequestAttributeEvent( context, request, name, o); fireEvent(REQUEST_ATTRIBUTE_LISTENER_CLASS, new EventInvoker<ServletRequestAttributeListener>() { public void invoke(ServletRequestAttributeListener listener) { listener.attributeAdded(event); } }); }
void requestAttributeRemoved(ServletRequest request, String name, Object removed) { final ServletRequestAttributeEvent event = new ServletRequestAttributeEvent( context, request, name, removed); fireEvent(REQUEST_ATTRIBUTE_LISTENER_CLASS, new EventInvoker<ServletRequestAttributeListener>() { public void invoke(ServletRequestAttributeListener listener) { listener.attributeRemoved(event); } }); }
/** * Inform {@link ServletRequestListener} instances. For internal use only. * * @param request * started request. */ void requestStarted(ServletRequest request) { final ServletRequestEvent event = new ServletRequestEvent(context, request); fireEvent(REQUEST_LISTENER_CLASS, new EventInvoker<ServletRequestListener>() { public void invoke(ServletRequestListener listener) { listener.requestInitialized(event); } }); }
/** * Inform {@link ServletRequestListener} instances. For internal use only. * * @param request * started request. */ void requestStarted(ServletRequest request) { final ServletRequestEvent event = new ServletRequestEvent(context, request); fireEvent(REQUEST_LISTENER_CLASS, new EventInvoker<ServletRequestListener>() { public void invoke(ServletRequestListener listener) { listener.requestInitialized(event); } }); }
/** * Inform {@link ServletRequestListener} instances. For internal use only. * * @param request * finished request. */ void requestFinished(ServletRequest request) { final ServletRequestEvent event = new ServletRequestEvent(context, request); fireEvent(REQUEST_LISTENER_CLASS, new EventInvoker<ServletRequestListener>() { public void invoke(ServletRequestListener listener) { listener.requestDestroyed(event); } }); }
/** * Inform {@link ServletRequestListener} instances. For internal use only. * * @param request * finished request. */ void requestFinished(ServletRequest request) { final ServletRequestEvent event = new ServletRequestEvent(context, request); fireEvent(REQUEST_LISTENER_CLASS, new EventInvoker<ServletRequestListener>() { public void invoke(ServletRequestListener listener) { listener.requestDestroyed(event); } }); }
@Override public synchronized HttpSession getSession(boolean create) { if (!initialised) { throw new TestException("Staging server have not been initialised"); } HttpSession httpSession = this.getCurrentSession(); if (null == httpSession && create) { ServerHttpSession sessionImpl = new ServerHttpSession(); // Create proxy objects. ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (null == loader) { loader = this.getClass().getClassLoader(); } httpSession = (HttpSession) Proxy.newProxyInstance(loader, new Class[] { HttpSession.class }, getInvocationHandler(sessionImpl)); setCurrentSession(httpSession); // inform session listeners. final HttpSessionEvent event = new HttpSessionEvent(httpSession); fireEvent(SESSION_LISTENER_CLASS, new EventInvoker<HttpSessionListener>() { public void invoke(HttpSessionListener listener) { listener.sessionCreated(event); } }); sessionInstances.add(sessionImpl); } return httpSession; }
@Override public synchronized HttpSession getSession(boolean create) { if (!initialised) { throw new TestException("Staging server have not been initialised"); } HttpSession httpSession = this.getCurrentSession(); if (null == httpSession && create) { ServerHttpSession sessionImpl = new ServerHttpSession(); // Create proxy objects. ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (null == loader) { loader = this.getClass().getClassLoader(); } httpSession = (HttpSession) Proxy.newProxyInstance(loader, new Class[] { HttpSession.class }, getInvocationHandler(sessionImpl)); setCurrentSession(httpSession); // inform session listeners. final HttpSessionEvent event = new HttpSessionEvent(httpSession); fireEvent(SESSION_LISTENER_CLASS, new EventInvoker<HttpSessionListener>() { public void invoke(HttpSessionListener listener) { listener.sessionCreated(event); } }); sessionInstances.add(sessionImpl); } return httpSession; }
if(fireEvent(CONTEXT_LISTENER_CLASS, new EventInvoker<ServletContextListener>() { public void invoke(ServletContextListener listener) {
if(fireEvent(CONTEXT_LISTENER_CLASS, new EventInvoker<ServletContextListener>() { public void invoke(ServletContextListener listener) {