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

x33g5p2x  于2022-01-30 转载在 其他  
字(9.6k)|赞(0)|评价(0)|浏览(106)

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

Service.start介绍

暂无

代码示例

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

/**
 * Start nested components ({@link Service}s) and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  fireLifecycleEvent(CONFIGURE_START_EVENT, null);
  setState(LifecycleState.STARTING);
  // Start our defined Services
  synchronized (services) {
    for (int i = 0; i < services.length; i++) {
      services[i].start();
    }
  }
}

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

/**
 * Start nested components ({@link Service}s) and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  fireLifecycleEvent(CONFIGURE_START_EVENT, null);
  setState(LifecycleState.STARTING);
  // Start our defined Services
  synchronized (services) {
    for (int i = 0; i < services.length; i++) {
      services[i].start();
    }
  }
}

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

/**
 * Add a new Service to the set of defined Services.
 *
 * @param service The Service to be added
 */
@Override
public void addService(Service service) {
  service.setServer(this);
  synchronized (services) {
    Service results[] = new Service[services.length + 1];
    System.arraycopy(services, 0, results, 0, services.length);
    results[services.length] = service;
    services = results;
    if (getState().isAvailable()) {
      try {
        service.start();
      } catch (LifecycleException e) {
        // Ignore
      }
    }
    // Report this property change to interested listeners
    support.firePropertyChange("service", null, service);
  }
}

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

/**
 * Start nested components ({@link Service}s) and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  fireLifecycleEvent(CONFIGURE_START_EVENT, null);
  setState(LifecycleState.STARTING);
  // Start our defined Services
  synchronized (services) {
    for (int i = 0; i < services.length; i++) {
      services[i].start();
    }
  }
}

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

/**
 * Add a new Service to the set of defined Services.
 *
 * @param service The Service to be added
 */
@Override
public void addService(Service service) {
  service.setServer(this);
  synchronized (servicesLock) {
    Service results[] = new Service[services.length + 1];
    System.arraycopy(services, 0, results, 0, services.length);
    results[services.length] = service;
    services = results;
    if (getState().isAvailable()) {
      try {
        service.start();
      } catch (LifecycleException e) {
        // Ignore
      }
    }
    // Report this property change to interested listeners
    support.firePropertyChange("service", null, service);
  }
}

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

/**
 * Add a new Service to the set of defined Services.
 *
 * @param service The Service to be added
 */
@Override
public void addService(Service service) {
  service.setServer(this);
  synchronized (servicesLock) {
    Service results[] = new Service[services.length + 1];
    System.arraycopy(services, 0, results, 0, services.length);
    results[services.length] = service;
    services = results;
    if (getState().isAvailable()) {
      try {
        service.start();
      } catch (LifecycleException e) {
        // Ignore
      }
    }
    // Report this property change to interested listeners
    support.firePropertyChange("service", null, service);
  }
}

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

/**
 * Add a new Service to the set of defined Services.
 *
 * @param service The Service to be added
 */
@Override
public void addService(Service service) {
  service.setServer(this);
  synchronized (services) {
    Service results[] = new Service[services.length + 1];
    System.arraycopy(services, 0, results, 0, services.length);
    results[services.length] = service;
    services = results;
    if (getState().isAvailable()) {
      try {
        service.start();
      } catch (LifecycleException e) {
        // Ignore
      }
    }
    // Report this property change to interested listeners
    support.firePropertyChange("service", null, service);
  }
}

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

/**
 * Add a new Service to the set of defined Services.
 *
 * @param service The Service to be added
 */
@Override
public void addService(Service service) {
  service.setServer(this);
  synchronized (services) {
    Service results[] = new Service[services.length + 1];
    System.arraycopy(services, 0, results, 0, services.length);
    results[services.length] = service;
    services = results;
    if (getState().isAvailable()) {
      try {
        service.start();
      } catch (LifecycleException e) {
        // Ignore
      }
    }
    // Report this property change to interested listeners
    support.firePropertyChange("service", null, service);
  }
}

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

/**
 * Add a new Service to the set of defined Services.
 *
 * @param service The Service to be added
 */
@Override
public void addService(Service service) {
  service.setServer(this);
  synchronized (services) {
    Service results[] = new Service[services.length + 1];
    System.arraycopy(services, 0, results, 0, services.length);
    results[services.length] = service;
    services = results;
    if (getState().isAvailable()) {
      try {
        service.start();
      } catch (LifecycleException e) {
        // Ignore
      }
    }
    // Report this property change to interested listeners
    support.firePropertyChange("service", null, service);
  }
}

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

/**
 * Add a new Service to the set of defined Services.
 *
 * @param service The Service to be added
 */
@Override
public void addService(Service service) {
  service.setServer(this);
  synchronized (servicesLock) {
    Service results[] = new Service[services.length + 1];
    System.arraycopy(services, 0, results, 0, services.length);
    results[services.length] = service;
    services = results;
    if (getState().isAvailable()) {
      try {
        service.start();
      } catch (LifecycleException e) {
        // Ignore
      }
    }
    // Report this property change to interested listeners
    support.firePropertyChange("service", null, service);
  }
}

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

/**
 * Add a new Service to the set of defined Services.
 *
 * @param service The Service to be added
 */
@Override
public void addService(Service service) {
  service.setServer(this);
  synchronized (services) {
    Service results[] = new Service[services.length + 1];
    System.arraycopy(services, 0, results, 0, services.length);
    results[services.length] = service;
    services = results;
    if (getState().isAvailable()) {
      try {
        service.start();
      } catch (LifecycleException e) {
        // Ignore
      }
    }
    // Report this property change to interested listeners
    support.firePropertyChange("service", null, service);
  }
}

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

/**
 * Start nested components ({@link Service}s) and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  fireLifecycleEvent(CONFIGURE_START_EVENT, null);
  setState(LifecycleState.STARTING);
  globalNamingResources.start();
  // Start our defined Services
  synchronized (servicesLock) {
    for (int i = 0; i < services.length; i++) {
      services[i].start();
    }
  }
}

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

/**
 * Start nested components ({@link Service}s) and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  fireLifecycleEvent(CONFIGURE_START_EVENT, null);
  setState(LifecycleState.STARTING);
  globalNamingResources.start();
  
  // Start our defined Services
  synchronized (services) {
    for (int i = 0; i < services.length; i++) {
      services[i].start();
    }
  }
}

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

/**
 * Start nested components ({@link Service}s) and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  fireLifecycleEvent(CONFIGURE_START_EVENT, null);
  setState(LifecycleState.STARTING);
  globalNamingResources.start();
  
  // Start our defined Services
  synchronized (services) {
    for (int i = 0; i < services.length; i++) {
      services[i].start();
    }
  }
}

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

/**
 * Start nested components ({@link Service}s) and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  fireLifecycleEvent(CONFIGURE_START_EVENT, null);
  setState(LifecycleState.STARTING);
  globalNamingResources.start();
  // Start our defined Services
  synchronized (servicesLock) {
    for (int i = 0; i < services.length; i++) {
      services[i].start();
    }
  }
}

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

/**
 * Start nested components ({@link Service}s) and implement the requirements
 * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
 *
 * @exception LifecycleException if this component detects a fatal error
 *  that prevents this component from being used
 */
@Override
protected void startInternal() throws LifecycleException {
  fireLifecycleEvent(CONFIGURE_START_EVENT, null);
  setState(LifecycleState.STARTING);
  globalNamingResources.start();
  // Start our defined Services
  synchronized (servicesLock) {
    for (int i = 0; i < services.length; i++) {
      services[i].start();
    }
  }
  if (periodicEventDelay > 0) {
    monitorFuture = getUtilityExecutor().scheduleWithFixedDelay(
        new Runnable() {
          @Override
          public void run() {
            startPeriodicLifecycleEvent();
          }
        }, 0, 60, TimeUnit.SECONDS);
  }
}

相关文章