本文整理了Java中org.apache.catalina.Manager.getContainer()
方法的一些代码示例,展示了Manager.getContainer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Manager.getContainer()
方法的具体详情如下:
包路径:org.apache.catalina.Manager
类名称:Manager
方法名:getContainer
[英]Return the Container with which this Manager is associated.
[中]返回与此管理器关联的容器。
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Set the Manager within which this Session is valid.
*
* @param manager The new Manager
*/
public void setManager(Manager manager) {
this.manager = manager;
context = (StandardContext) manager.getContainer();
}
代码示例来源:origin: tomcat/catalina
/**
* Return the ServletContext to which this session belongs.
*/
public ServletContext getServletContext() {
if (manager == null)
return (null);
Context context = (Context) manager.getContainer();
if (context == null)
return (null);
else
return (context.getServletContext());
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Return the ServletContext to which this session belongs.
*/
public ServletContext getServletContext() {
if (manager == null)
return (null);
Context context = (Context) manager.getContainer();
if (context == null)
return (null);
else
return (context.getServletContext());
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Return the ServletContext to which this session belongs.
*/
public ServletContext getServletContext() {
if (manager == null)
return (null);
Context context = (Context) manager.getContainer();
if (context == null)
return (null);
else
return (context.getServletContext());
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Return the ServletContext to which this session belongs.
*/
@Override
public ServletContext getServletContext() {
if (manager == null)
return (null);
Context context = (Context) manager.getContainer();
if (context == null)
return (null);
else
return (context.getServletContext());
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Return the ServletContext to which this session belongs.
*/
@Override
public ServletContext getServletContext() {
if (manager == null)
return (null);
Context context = (Context) manager.getContainer();
if (context == null)
return (null);
else
return (context.getServletContext());
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Return the ServletContext to which this session belongs.
*/
@Override
public ServletContext getServletContext() {
if (manager == null)
return (null);
Context context = (Context) manager.getContainer();
if (context == null)
return (null);
else
return (context.getServletContext());
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Return the ServletContext to which this session belongs.
*/
@Override
public ServletContext getServletContext() {
if (manager == null)
return (null);
Context context = (Context) manager.getContainer();
if (context == null)
return (null);
else
return (context.getServletContext());
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Return the ServletContext to which this session belongs.
*/
@Override
public ServletContext getServletContext() {
if (manager == null)
return (null);
Context context = (Context) manager.getContainer();
if (context == null)
return (null);
else
return (context.getServletContext());
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Remove the Session with the specified session identifier from
* this Store, if present. If no such Session is present, this method
* takes no action.
*
* @param id Session identifier of the Session to be removed
*
* @exception IOException if an input/output error occurs
*/
public void remove(String id) throws IOException {
File file = file(id);
if (file == null) {
return;
}
if (manager.getContainer().getLogger().isDebugEnabled()) {
manager.getContainer().getLogger().debug(MESSAGES.fileStoreSessionRemove(id, file.getAbsolutePath()));
}
file.delete();
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Set the JNDI name of a DataSource-factory to use for db access
*
* @param dataSourceName The JNDI name of the DataSource-factory
*/
public void setDataSourceName(String dataSourceName) {
if (dataSourceName == null || "".equals(dataSourceName.trim())) {
manager.getContainer().getLogger().warn(
sm.getString(getStoreName() + ".missingDataSourceName"));
return;
}
this.dataSourceName = dataSourceName;
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Set the JNDI name of a DataSource-factory to use for db access
*
* @param dataSourceName The JNDI name of the DataSource-factory
*/
public void setDataSourceName(String dataSourceName) {
if (dataSourceName == null || "".equals(dataSourceName.trim())) {
manager.getContainer().getLogger().warn(
sm.getString(getStoreName() + ".missingDataSourceName"));
return;
}
this.dataSourceName = dataSourceName;
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Remove the Session with the specified session identifier from
* this Store, if present. If no such Session is present, this method
* takes no action.
*
* @param id Session identifier of the Session to be removed
*
* @exception IOException if an input/output error occurs
*/
public void remove(String id) throws IOException {
File file = file(id);
if (file == null) {
return;
}
if (manager.getContainer().getLogger().isDebugEnabled()) {
manager.getContainer().getLogger().debug(sm.getString(getStoreName()+".removing",
id, file.getAbsolutePath()));
}
file.delete();
}
代码示例来源:origin: zinin/tomcat-redis-session
@Override
public void setManager(Manager manager) {
log.trace(String.format("EXEC setId(%s);", manager));
this.manager = (RedisManager) manager;
this.pool = this.manager.getPool();
this.servletContext = ((Context) manager.getContainer()).getServletContext();
this.disableListeners = this.manager.isDisableListeners();
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina-ha
/**
* Register all cross context sessions inside endAccess.
* Use a list with contains check, that the Portlet API can include a lot of fragments from same or
* different applications with session changes.
*
* @param session cross context session
*/
public void registerReplicationSession(DeltaSession session) {
List<DeltaSession> sessions = crossContextSessions.get();
if(sessions != null) {
if(!sessions.contains(session)) {
if(log.isDebugEnabled())
log.debug(sm.getString("ReplicationValve.crossContext.registerSession",
session.getIdInternal(),
session.getManager().getContainer().getName()));
sessions.add(session);
}
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina-ha
/**
* Send all changed cross context sessions to backups
* @param containerCluster
*/
protected void sendCrossContextSession(CatalinaCluster containerCluster) {
List<DeltaSession> sessions = crossContextSessions.get();
if(sessions != null && sessions.size() >0) {
for(Iterator<DeltaSession> iter = sessions.iterator(); iter.hasNext() ;) {
Session session = iter.next();
if(log.isDebugEnabled())
log.debug(sm.getString("ReplicationValve.crossContext.sendDelta",
session.getManager().getContainer().getName() ));
sendMessage(session,(ClusterManager)session.getManager(),containerCluster);
if(doStatistics()) {
nrOfCrossContextSendRequests++;
}
}
}
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-tomcat
private FullyQualifiedSessionId getFullyQualifiedSessionId(Session session)
{
String id = session.getIdInternal();
Container context = session.getManager().getContainer();
String contextName = context.getName();
Container host = context.getParent();
String hostName = host.getName();
return new FullyQualifiedSessionId(id, contextName, hostName);
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina-ha
/**
* Reset DeltaRequest from session
* @param session HttpSession from current request or cross context session
*/
protected void resetDeltaRequest(Session session) {
if(log.isDebugEnabled()) {
log.debug(sm.getString("ReplicationValve.resetDeltaRequest" ,
session.getManager().getContainer().getName() ));
}
((DeltaSession)session).resetDeltaRequest();
}
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Log a message on the Logger associated with our Container (if any).
*
* @param message Message to be logged
*/
protected void log(String message) {
Logger logger = null;
String containerName = null;
Container container = manager.getContainer();
if (container != null) {
logger = container.getLogger();
containerName = container.getName();
}
if (logger != null) {
logger.log(neutralizeForLog(getStoreName()+"[" + containerName + "]: " +
message));
} else {
log.log(Level.FINE, neutralizeForLog(getStoreName() + "[" + containerName + "]: " + message));
}
}
代码示例来源:origin: tomcat/catalina-optional
/**
* Return the name for this instance (built from container name)
*/
public String getName() {
if (name == null) {
Container container = manager.getContainer();
String contextName = container.getName();
String hostName = "";
String engineName = "";
if (container.getParent() != null) {
Container host = container.getParent();
hostName = host.getName();
if (host.getParent() != null) {
engineName = host.getParent().getName();
}
}
name = "/" + engineName + "/" + hostName + contextName;
}
return name;
}
内容来源于网络,如有侵权,请联系作者删除!