org.restlet.Restlet.stop()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(151)

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

Restlet.stop介绍

[英]Stops the Restlet. By default its only sets "started" internal property to false. WARNING: this method must be called at the beginning of the stopping process by subclasses otherwise concurrent threads could continue to (improperly) handle calls.
[中]停止休息。默认情况下,它仅将“启动”内部属性设置为false。警告:子类必须在停止进程开始时调用此方法,否则并发线程可能会继续(不正确)处理调用。

代码示例

代码示例来源:origin: org.restlet/org.restlet

@Override
public synchronized void stop() throws Exception {
  wrappedRestlet.stop();
}

代码示例来源:origin: org.restlet.osgi/org.restlet

@Override
public synchronized void stop() throws Exception {
  wrappedRestlet.stop();
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Attempts to {@link #stop()} the Restlet if it is still started.
 */
@Override
protected void finalize() throws Throwable {
  if (isStarted()) {
    stop();
  }
  super.finalize();
}

代码示例来源:origin: org.restlet.osgi/org.restlet

@Override
  public synchronized void stop() throws Exception {
    super.stop();
    for (Client client : clients.values()) {
      client.stop();
    }
  }
});

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Stops the filter and the next Restlet if attached.
 */
@Override
public synchronized void stop() throws Exception {
  if (isStarted()) {
    // Must be invoked as a first step
    super.stop();
    if (getNext() != null) {
      getNext().stop();
    }
  }
}

代码示例来源:origin: miltonio/milton2

@Override
public synchronized void stop() throws Exception {
  if (isStarted()) {
    httpManager.shutdown();
  }
  super.stop();
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Stop all applications attached to a virtual host
 * 
 * @param host
 * @throws Exception
 */
private void stopHostApplications(VirtualHost host) throws Exception {
  for (Route route : host.getRoutes()) {
    if (route.getNext().isStarted()) {
      route.getNext().stop();
    }
  }
}

代码示例来源:origin: org.restlet/org.restlet

/**
 * Stops the component. First it stops the component's internal helper and
 * then stops all the connectors (servers then clients). Finally it calls
 * the stop method of the super class.
 * 
 * @see #stopHelper()
 * @see #stopServers()
 * @see #stopClients()
 */
@Override
public synchronized void stop() throws Exception {
  stopHelper();
  stopServers();
  stopClients();
  stopServices();
  super.stop();
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Stops the application, the inbound and outbound roots then all the
 * enabled associated services. Finally, it clears the internal cache of
 * annotations.
 */
@Override
public synchronized void stop() throws Exception {
  if (isStarted()) {
    // Must be invoked as a first step
    super.stop();
    if (getOutboundRoot() != null) {
      getOutboundRoot().stop();
    }
    if (getInboundRoot() != null) {
      getInboundRoot().stop();
    }
    getServices().stop();
    if (getHelper() != null) {
      getHelper().stop();
    }
    // Clear the annotations cache
    AnnotationUtils.getInstance().clearCache();
  }
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Releases the resource by stopping any connector automatically created and
 * associated to the "next" property (see {@link #getNext()} method.
 */
@Override
protected void doRelease() throws ResourceException {
  if ((getNext() != null) && this.nextCreated) {
    if (getNext() instanceof Restlet) {
      try {
        ((Restlet) getNext()).stop();
      } catch (Exception e) {
        throw new ResourceException(e);
      }
    }
    setNext(null);
  }
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Stops the filter and the attached routes.
 */
@Override
public synchronized void stop() throws Exception {
  if (isStarted()) {
    // Must be invoked as a first step
    super.stop();
    if (getDefaultRoute() != null) {
      getDefaultRoute().stop();
    }
    for (Route route : getRoutes()) {
      route.stop();
    }
  }
}

代码示例来源:origin: org.restlet.osgi/org.restlet

/**
 * Stops the component. First it stops the component's internal helper, the
 * realms, the services, the routers and then stops all the connectors
 * (servers then clients) Finally it calls the stop method of the super
 * class.
 * 
 * @see #stopHelper()
 * @see #stopRealms()
 * @see #stopServices()
 * @see #stopRouters()
 * @see #stopServers()
 * @see #stopClients()
 */
@Override
public synchronized void stop() throws Exception {
  stopHelper();
  stopRealms();
  stopServices();
  stopRouters();
  stopServers();
  stopClients();
  super.stop();
}

代码示例来源:origin: org.restlet/org.restlet

super.stop();

相关文章