• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ManagerBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.catalina.session.ManagerBase的典型用法代码示例。如果您正苦于以下问题:Java ManagerBase类的具体用法?Java ManagerBase怎么用?Java ManagerBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ManagerBase类属于org.apache.catalina.session包,在下文中一共展示了ManagerBase类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: doImminentSessionTimeout

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
private void doImminentSessionTimeout(Context activeContext) {

        ManagerBase manager = (ManagerBase) activeContext.getManager();
        Session[] sessions = manager.findSessions();
        for (int i = 0; i < sessions.length; i++) {
            if (sessions[i]!=null && sessions[i].isValid()) {
                sessions[i].setMaxInactiveInterval(EXTRA_DELAY_SECS);
                // leave it to be expired by the manager
            }
        }
        try {
            Thread.sleep(REASONABLE_MSECS_TO_EXPIRY);
        } catch (InterruptedException ie) {
            // ignored
        }

        // paranoid verification that active sessions have now gone
        sessions = manager.findSessions();
        assertTrue(sessions.length == 0);
    }
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:21,代码来源:TestSSOnonLoginAndBasicAuthenticator.java


示例2: getClassLoaders

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
public ClassLoader[] getClassLoaders() {
    if ( manager instanceof BackupManager ) return ((BackupManager)manager).getClassLoaders();
    else if ( manager instanceof ClusterManagerBase ) return ((ClusterManagerBase)manager).getClassLoaders();
    else if ( manager instanceof StandardManager ) {
        StandardManager sm = (StandardManager)manager;
        return ClusterManagerBase.getClassLoaders(sm.getContainer());
    } else if ( manager instanceof ManagerBase ) {
        ManagerBase mb = (ManagerBase)manager;
        return ClusterManagerBase.getClassLoaders(mb.getContainer());
    }//end if
    return null;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:13,代码来源:DeltaSession.java


示例3: getLocalJvmRoute

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
/**
 * get jvmroute from engine
 * 
 * @param request current request
 * @return return jvmRoute from ManagerBase or null
 */
protected String getLocalJvmRoute(Request request) {
    Manager manager = getManager(request);
    if(manager instanceof ManagerBase)
        return ((ManagerBase) manager).getJvmRoute();
    return null ;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:13,代码来源:JvmRouteBinderValve.java


示例4: setRapidSessionTimeoutDetection

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
private void setRapidSessionTimeoutDetection() {

        ((ManagerBase) basicContext.getManager())
                .setProcessExpiresFrequency(MANAGER_EXPIRE_SESSIONS_FAST);
        ((ManagerBase) nonloginContext.getManager())
                .setProcessExpiresFrequency(MANAGER_EXPIRE_SESSIONS_FAST);
    }
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:8,代码来源:TestSSOnonLoginAndBasicAuthenticator.java


示例5: getClassLoaders

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
public ClassLoader[] getClassLoaders() {
	if (manager instanceof BackupManager)
		return ((BackupManager) manager).getClassLoaders();
	else if (manager instanceof ClusterManagerBase)
		return ((ClusterManagerBase) manager).getClassLoaders();
	else if (manager instanceof StandardManager) {
		StandardManager sm = (StandardManager) manager;
		return ClusterManagerBase.getClassLoaders(sm.getContainer());
	} else if (manager instanceof ManagerBase) {
		ManagerBase mb = (ManagerBase) manager;
		return ClusterManagerBase.getClassLoaders(mb.getContainer());
	} // end if
	return null;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:15,代码来源:DeltaSession.java


示例6: resetStatistics

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
/**
 * Reset manager statistics
 */
public synchronized void resetStatistics() {
	processingTime = 0;
	expiredSessions.set(0);
	synchronized (sessionCreationTiming) {
		sessionCreationTiming.clear();
		while (sessionCreationTiming.size() < ManagerBase.TIMING_STATS_CACHE_SIZE) {
			sessionCreationTiming.add(null);
		}
	}
	synchronized (sessionExpirationTiming) {
		sessionExpirationTiming.clear();
		while (sessionExpirationTiming.size() < ManagerBase.TIMING_STATS_CACHE_SIZE) {
			sessionExpirationTiming.add(null);
		}
	}
	rejectedSessions = 0;
	sessionReplaceCounter = 0;
	counterNoStateTransfered = 0;
	setMaxActive(getActiveSessions());
	sessionCounter = getActiveSessions();
	counterReceive_EVT_ALL_SESSION_DATA = 0;
	counterReceive_EVT_GET_ALL_SESSIONS = 0;
	counterReceive_EVT_SESSION_ACCESSED = 0;
	counterReceive_EVT_SESSION_CREATED = 0;
	counterReceive_EVT_SESSION_DELTA = 0;
	counterReceive_EVT_SESSION_EXPIRED = 0;
	counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0;
	counterReceive_EVT_CHANGE_SESSION_ID = 0;
	counterSend_EVT_ALL_SESSION_DATA = 0;
	counterSend_EVT_GET_ALL_SESSIONS = 0;
	counterSend_EVT_SESSION_ACCESSED = 0;
	counterSend_EVT_SESSION_CREATED = 0;
	counterSend_EVT_SESSION_DELTA = 0;
	counterSend_EVT_SESSION_EXPIRED = 0;
	counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0;
	counterSend_EVT_CHANGE_SESSION_ID = 0;

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:42,代码来源:DeltaManager.java


示例7: lifecycleEvent

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
@Override
public void lifecycleEvent(LifecycleEvent event) {
	if (event.getType().equals(Lifecycle.START_EVENT)) {
		Context context = (Context) event.getLifecycle();
		Manager manager = context.getManager();
		if (manager instanceof ManagerBase) {
			((ManagerBase) manager)
					.setSessionIdGenerator(new LazySessionIdGenerator());
		}
	}
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:12,代码来源:TomcatEmbeddedServletContainerFactory.java


示例8: resetStatistics

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
/**
 * Reset manager statistics
 */
public synchronized void resetStatistics() {
    processingTime = 0 ;
    expiredSessions.set(0);
    synchronized (sessionCreationTiming) {
        sessionCreationTiming.clear();
        while (sessionCreationTiming.size() <
                ManagerBase.TIMING_STATS_CACHE_SIZE) {
            sessionCreationTiming.add(null);
        }
    }
    synchronized (sessionExpirationTiming) {
        sessionExpirationTiming.clear();
        while (sessionExpirationTiming.size() <
                ManagerBase.TIMING_STATS_CACHE_SIZE) {
            sessionExpirationTiming.add(null);
        }
    }
    rejectedSessions = 0 ;
    sessionReplaceCounter = 0 ;
    counterNoStateTransfered = 0 ;
    setMaxActive(getActiveSessions());
    sessionCounter = getActiveSessions() ;
    counterReceive_EVT_ALL_SESSION_DATA = 0;
    counterReceive_EVT_GET_ALL_SESSIONS = 0;
    counterReceive_EVT_SESSION_ACCESSED = 0 ;
    counterReceive_EVT_SESSION_CREATED = 0 ;
    counterReceive_EVT_SESSION_DELTA = 0 ;
    counterReceive_EVT_SESSION_EXPIRED = 0 ;
    counterReceive_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0;
    counterReceive_EVT_CHANGE_SESSION_ID = 0;
    counterSend_EVT_ALL_SESSION_DATA = 0;
    counterSend_EVT_GET_ALL_SESSIONS = 0;
    counterSend_EVT_SESSION_ACCESSED = 0 ;
    counterSend_EVT_SESSION_CREATED = 0 ;
    counterSend_EVT_SESSION_DELTA = 0 ;
    counterSend_EVT_SESSION_EXPIRED = 0 ;
    counterSend_EVT_ALL_SESSION_TRANSFERCOMPLETE = 0;
    counterSend_EVT_CHANGE_SESSION_ID = 0;
    
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:44,代码来源:DeltaManager.java


示例9: setRapidSessionTimeout

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
private void setRapidSessionTimeout() {

        ((ManagerBase) basicContext.getManager())
                .setProcessExpiresFrequency(MANAGER_EXPIRE_SESSIONS_FAST);
    }
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:6,代码来源:TestNonLoginAndBasicAuthenticator.java


示例10: getLocalJvmRoute

import org.apache.catalina.session.ManagerBase; //导入依赖的package包/类
/**
 * get jvmroute from engine
 * 
 * @param request
 *            current request
 * @return return jvmRoute from ManagerBase or null
 */
protected String getLocalJvmRoute(Request request) {
	Manager manager = getManager(request);
	if (manager instanceof ManagerBase)
		return ((ManagerBase) manager).getJvmRoute();
	return null;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:14,代码来源:JvmRouteBinderValve.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Database类代码示例发布时间:2022-05-21
下一篇:
Java AtomicLongMap类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap