本文整理汇总了Java中org.apache.catalina.Manager.getContainer方法的典型用法代码示例。如果您正苦于以下问题:Java Manager.getContainer方法的具体用法?Java Manager.getContainer怎么用?Java Manager.getContainer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.catalina.Manager
的用法示例。
在下文中一共展示了Manager.getContainer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sessionEvent
import org.apache.catalina.Manager; //导入方法依赖的package包/类
@Override
public void sessionEvent(SessionEvent event) {
if (!Session.SESSION_DESTROYED_EVENT.equals(event.getType())) {
return;
}
Session session = event.getSession();
Manager manager = session.getManager();
if (manager == null) {
return;
}
Context context = (Context) manager.getContainer();
Authenticator authenticator = context.getAuthenticator();
if (!(authenticator instanceof AuthenticatorBase)) {
return;
}
SingleSignOn sso = ((AuthenticatorBase) authenticator).sso;
if (sso == null) {
return;
}
sso.sessionDestroyed(ssoId, session);
}
示例2: sessionEvent
import org.apache.catalina.Manager; //导入方法依赖的package包/类
@Override
public void sessionEvent(SessionEvent event) {
if (!Session.SESSION_DESTROYED_EVENT.equals(event.getType())) {
return;
}
Session session = event.getSession();
Manager manager = session.getManager();
if (manager == null) {
return;
}
Context context = (Context) manager.getContainer();
Authenticator authenticator = context.getAuthenticator();
if (!(authenticator instanceof AuthenticatorBase)) {
return;
}
SingleSignOn sso = ((AuthenticatorBase) authenticator).sso;
if (sso == null) {
return;
}
sso.sessionDestroyed(ssoId, session);
}
示例3: getManagerName
import org.apache.catalina.Manager; //导入方法依赖的package包/类
/**
* @param name
* @param manager
* @return TODO
*/
@Override
public String getManagerName(String name, Manager manager) {
String clusterName = name ;
if (clusterName == null) clusterName = manager.getContainer().getName();
if (getContainer() instanceof Engine) {
Context context = (Context) manager.getContainer() ;
Container host = context.getParent();
if (host instanceof Host && clusterName != null &&
!(clusterName.startsWith(host.getName() +"#"))) {
clusterName = host.getName() +"#" + clusterName ;
}
}
return clusterName;
}
示例4: getManagerName
import org.apache.catalina.Manager; //导入方法依赖的package包/类
/**
* @param name
* @param manager
* @return TODO
*/
@Override
public String getManagerName(String name, Manager manager) {
String clusterName = name;
if (clusterName == null)
clusterName = manager.getContainer().getName();
if (getContainer() instanceof Engine) {
Context context = (Context) manager.getContainer();
Container host = context.getParent();
if (host instanceof Host && clusterName != null && !(clusterName.startsWith(host.getName() + "#"))) {
clusterName = host.getName() + "#" + clusterName;
}
}
return clusterName;
}