org.apache.catalina.Context.addLifecycleListener()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(159)

本文整理了Java中org.apache.catalina.Context.addLifecycleListener()方法的一些代码示例,展示了Context.addLifecycleListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.addLifecycleListener()方法的具体详情如下:
包路径:org.apache.catalina.Context
类名称:Context
方法名:addLifecycleListener

Context.addLifecycleListener介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-framework

@Override
public void start() throws Exception {
  this.tomcatServer.start();
  this.port = this.tomcatServer.getConnector().getLocalPort();
  this.context.addLifecycleListener(event -> {
    if (logger.isDebugEnabled()) {
      logger.debug("Event: " + event.getType());
    }
  });
}

代码示例来源:origin: org.springframework.boot/spring-boot

context.addLifecycleListener((event) -> {
  if (context.equals(event.getSource())
      && Lifecycle.START_EVENT.equals(event.getType())) {

代码示例来源:origin: line/armeria

ctx.addLifecycleListener(TomcatUtil.getDefaultWebXmlListener());
ctx.setConfigFile(TomcatUtil.getWebAppConfigFile(ROOT_CONTEXT_PATH, config.docBase()));
ctx.addLifecycleListener(ctxCfg);

代码示例来源:origin: org.springframework.boot/spring-boot

private void configureSession(Context context) {
  long sessionTimeout = getSessionTimeoutInMinutes();
  context.setSessionTimeout((int) sessionTimeout);
  Boolean httpOnly = getSession().getCookie().getHttpOnly();
  if (httpOnly != null) {
    context.setUseHttpOnly(httpOnly);
  }
  if (getSession().isPersistent()) {
    Manager manager = context.getManager();
    if (manager == null) {
      manager = new StandardManager();
      context.setManager(manager);
    }
    configurePersistSession(manager);
  }
  else {
    context.addLifecycleListener(new DisablePersistSessionListener());
  }
}

代码示例来源:origin: org.springframework.boot/spring-boot

context.addLifecycleListener(lifecycleListener);

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

private void registerContextListener(Context context) {
  context.addLifecycleListener(this);
}

代码示例来源:origin: codefollower/Tomcat-Research

private void registerContextListener(Context context) {
  context.addLifecycleListener(this);
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

private void registerContextListener(Context context) {
  context.addLifecycleListener(this);
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

private void registerContextListener(Context context) {
  context.addLifecycleListener(this);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

public void install() {
  engine.addPropertyChangeListener(this);
  if (host != null) {
    host.addContainerListener(this);
    host.addLifecycleListener(this);
  }
  if (context != null) {
    context.addLifecycleListener(this);
  }
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

public void install() {
  engine.addPropertyChangeListener(this);
  if (host != null) {
    host.addContainerListener(this);
    host.addLifecycleListener(this);
  }
  if (context != null) {
    context.addLifecycleListener(this);
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

public void install() {
  engine.addPropertyChangeListener(this);
  if (host != null) {
    host.addContainerListener(this);
    host.addLifecycleListener(this);
  }
  if (context != null) {
    context.addLifecycleListener(this);
  }
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

public void install() {
  engine.addPropertyChangeListener(this);
  if (host != null) {
    host.addContainerListener(this);
    host.addLifecycleListener(this);
  }
  if (context != null) {
    context.addLifecycleListener(this);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

public void install() {
  engine.addPropertyChangeListener(this);
  if (host != null) {
    host.addContainerListener(this);
    host.addLifecycleListener(this);
  }
  if (context != null) {
    context.addLifecycleListener(this);
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

public void install() {
  engine.addPropertyChangeListener(this);
  if (host != null) {
    host.addContainerListener(this);
    host.addLifecycleListener(this);
  }
  if (context != null) {
    context.addLifecycleListener(this);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void install() {
  engine.addPropertyChangeListener(this);
  if (host != null) {
    host.addContainerListener(this);
    host.addLifecycleListener(this);
  }
  if (context != null) {
    context.addLifecycleListener(this);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void install() {
  engine.addPropertyChangeListener(this);
  if (host != null) {
    host.addContainerListener(this);
    host.addLifecycleListener(this);
  }
  if (context != null) {
    context.addLifecycleListener(this);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public Context addContext(Host host, String contextPath, String dir) {
  silence(contextPath);
  Context ctx = new StandardContext();
  ctx.setPath( contextPath );
  ctx.setDocBase(dir);
  ctx.addLifecycleListener(new FixContextListener());
  
  if (host == null) {
    getHost().addChild(ctx);
  } else {
    host.addChild(ctx);
  }
  return ctx;
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public Context addContext(Host host, String contextPath, String dir) {
  silence(contextPath);
  Context ctx = new StandardContext();
  ctx.setPath( contextPath );
  ctx.setDocBase(dir);
  ctx.addLifecycleListener(new FixContextListener());
  
  if (host == null) {
    getHost().addChild(ctx);
  } else {
    host.addChild(ctx);
  }
  return ctx;
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

public Context addContext(Host host, String contextPath, String dir) {
  silence(contextPath);
  Context ctx = new StandardContext();
  ctx.setPath( contextPath );
  ctx.setDocBase(dir);
  ctx.addLifecycleListener(new FixContextListener());
  
  if (host == null) {
    getHost().addChild(ctx);
  } else {
    host.addChild(ctx);
  }
  return ctx;
}

相关文章

微信公众号

最新文章

更多

Context类方法