本文整理汇总了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;未经允许,请勿转载。 |
请发表评论