当前位置: 首页>>代码示例>>Java>>正文


Java ServletRequestListener.requestDestroyed方法代码示例

本文整理汇总了Java中javax.servlet.ServletRequestListener.requestDestroyed方法的典型用法代码示例。如果您正苦于以下问题:Java ServletRequestListener.requestDestroyed方法的具体用法?Java ServletRequestListener.requestDestroyed怎么用?Java ServletRequestListener.requestDestroyed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.servlet.ServletRequestListener的用法示例。


在下文中一共展示了ServletRequestListener.requestDestroyed方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: destroy

import javax.servlet.ServletRequestListener; //导入方法依赖的package包/类
public void destroy() {
    final boolean openejbRequestDestroyed = getAttribute("openejb_requestDestroyed") == null;
    if (listeners != null && !listeners.isEmpty()) {
        if (begin != null && end != null && openejbRequestDestroyed) {
            end.requestDestroyed(new ServletRequestEvent(getServletContext(), this));
        }
        final ServletRequestEvent event = new ServletRequestEvent(getServletContext(), this);
        for (final ServletRequestListener listener : listeners) {
            listener.requestDestroyed(event);
        }
    }
    if (begin != null && openejbRequestDestroyed) {
        setAttribute("openejb_requestDestroyed", "ok");
        begin.requestDestroyed(new ServletRequestEvent(getServletContext(), this));
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:17,代码来源:HttpRequestImpl.java

示例2: fireRequestDestroyEvent

import javax.servlet.ServletRequestListener; //导入方法依赖的package包/类
@Override
public boolean fireRequestDestroyEvent(ServletRequest request) {
    Object instances[] = getApplicationEventListeners();

    if ((instances != null) && (instances.length > 0)) {

        ServletRequestEvent event = 
            new ServletRequestEvent(getServletContext(), request);

        for (int i = 0; i < instances.length; i++) {
            int j = (instances.length -1) -i;
            if (instances[j] == null)
                continue;
            if (!(instances[j] instanceof ServletRequestListener))
                continue;
            ServletRequestListener listener =
                (ServletRequestListener) instances[j];
            
            try {
                listener.requestDestroyed(event);
            } catch (Throwable t) {
                ExceptionUtils.handleThrowable(t);
                getLogger().error(sm.getString(
                        "standardContext.requestListener.requestInit",
                        instances[j].getClass().getName()), t);
                request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
                return false;
            }
        }
    }
    return true;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:33,代码来源:StandardContext.java

示例3: fireRequestDestroyEvent

import javax.servlet.ServletRequestListener; //导入方法依赖的package包/类
@Override
public boolean fireRequestDestroyEvent(ServletRequest request) {
	Object instances[] = getApplicationEventListeners();

	if ((instances != null) && (instances.length > 0)) {

		ServletRequestEvent event = new ServletRequestEvent(getServletContext(), request);

		for (int i = 0; i < instances.length; i++) {
			int j = (instances.length - 1) - i;
			if (instances[j] == null)
				continue;
			if (!(instances[j] instanceof ServletRequestListener))
				continue;
			ServletRequestListener listener = (ServletRequestListener) instances[j];

			try {
				listener.requestDestroyed(event);
			} catch (Throwable t) {
				ExceptionUtils.handleThrowable(t);
				getLogger().error(sm.getString("standardContext.requestListener.requestInit",
						instances[j].getClass().getName()), t);
				request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
				return false;
			}
		}
	}
	return true;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:30,代码来源:StandardContext.java

示例4: requestDestroyed

import javax.servlet.ServletRequestListener; //导入方法依赖的package包/类
@Override
public void requestDestroyed(ServletRequestEvent event) {
    requestContextListener.requestDestroyed(event);

    for (ServletRequestListener requestListener : HANDLER.requestListeners) {
        requestListener.requestDestroyed(event);
    }
}
 
开发者ID:jefalbino,项目名称:jsmart-web,代码行数:9,代码来源:RequestControl.java

示例5: destroyFakedRequest

import javax.servlet.ServletRequestListener; //导入方法依赖的package包/类
public static void destroyFakedRequest(final ServletRequestListener listener) {
    final Boolean faked = FAKE_REQUEST.get();
    try {
        if (faked != null && faked) {
            listener.requestDestroyed(null);
        }
    } finally {
        FAKE_REQUEST.remove();
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:11,代码来源:WebBeansListenerHelper.java

示例6: requestDestroyed

import javax.servlet.ServletRequestListener; //导入方法依赖的package包/类
public void requestDestroyed(ServletRequestEvent sre) {
  for (ServletRequestListener listener : listeners) {
    listener.requestDestroyed(sre);
  }
}
 
开发者ID:bboypscmylife,项目名称:opengse,代码行数:6,代码来源:ServletRequestListenerList.java


注:本文中的javax.servlet.ServletRequestListener.requestDestroyed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。