@Override
 public void dump(Appendable out, String indent) throws IOException {
   ContainerLifeCycle.dumpObject(out, this + " - requests queued: " + exchanges.size());
   List<String> connections = new ArrayList<>();
   for (Connection connection : idleConnections) connections.add(connection + " - IDLE");
   for (Connection connection : activeConnections) connections.add(connection + " - ACTIVE");
   ContainerLifeCycle.dump(out, indent, connections);
 }
  @Override
  protected void doStop() throws Exception {
    if (LOG.isDebugEnabled()) LOG.debug("stopping - {}", this);

    if (getConnection() != null) {
      try {
        getConnection().close(StatusCode.SHUTDOWN, "Shutdown");
      } catch (Throwable t) {
        LOG.debug("During Connection Shutdown", t);
      }
    }
    super.doStop();
  }
  @Override
  protected void doStop() throws Exception {
    // Tell the acceptors we are stopping
    interruptAcceptors();

    // If we have a stop timeout
    long stopTimeout = getStopTimeout();
    if (stopTimeout > 0 && _stopping != null) _stopping.await(stopTimeout, TimeUnit.MILLISECONDS);
    _stopping = null;

    super.doStop();

    LOG.info("Stopped {}", this);
  }
  @Override
  protected void doStart() throws Exception {
    _defaultConnectionFactory = getConnectionFactory(_defaultProtocol);
    if (_defaultConnectionFactory == null)
      throw new IllegalStateException(
          "No protocol factory for default protocol: " + _defaultProtocol);

    super.doStart();

    _stopping = new CountDownLatch(_acceptors.length);
    for (int i = 0; i < _acceptors.length; i++) getExecutor().execute(new Acceptor(i));

    LOG.info("Started {}", this);
  }
  @Override
  public void dump(Appendable out, String indent) throws IOException {
    super.dump(out, indent);
    out.append(indent).append(" +- incomingHandler : ");
    if (incomingHandler instanceof Dumpable) {
      ((Dumpable) incomingHandler).dump(out, indent + "    ");
    } else {
      out.append(incomingHandler.toString()).append('\n');
    }

    out.append(indent).append(" +- outgoingHandler : ");
    if (outgoingHandler instanceof Dumpable) {
      ((Dumpable) outgoingHandler).dump(out, indent + "    ");
    } else {
      out.append(outgoingHandler.toString()).append('\n');
    }
  }
예제 #6
0
  @Override
  protected void doStop() throws Exception {
    super.doStop();
    close(
        ErrorCode.NO_ERROR.code,
        "stop",
        new Callback() {
          @Override
          public void succeeded() {
            disconnect();
          }

          @Override
          public void failed(Throwable x) {
            disconnect();
          }

          @Override
          public InvocationType getInvocationType() {
            return InvocationType.NON_BLOCKING;
          }
        });
  }
예제 #7
0
파일: Holder.java 프로젝트: Nextzero/Jetty
 /* ------------------------------------------------------------ */
 @Override
 public String dump() {
   return ContainerLifeCycle.dump(this);
 }
예제 #8
0
파일: Holder.java 프로젝트: Nextzero/Jetty
 /* ------------------------------------------------------------ */
 @Override
 public void dump(Appendable out, String indent) throws IOException {
   out.append(toString()).append(" - ").append(AbstractLifeCycle.getState(this)).append("\n");
   ContainerLifeCycle.dump(out, indent, _initParams.entrySet());
 }
예제 #9
0
 @Override
 public void dump(Appendable out, String indent) throws IOException {
   ContainerLifeCycle.dumpObject(out, this);
   ContainerLifeCycle.dump(out, indent, Collections.singletonList(controller), streams.values());
 }
예제 #10
0
 @Override
 protected void doStart() throws Exception {
   addBean(flowControl);
   super.doStart();
 }
  @Override
  protected void doStart() throws Exception {
    if (LOG.isDebugEnabled()) LOG.debug("starting - {}", this);

    super.doStart();
  }
예제 #12
0
 @Override
 public void dump(Appendable out, String indent) throws IOException {
   ContainerLifeCycle.dumpObject(out, toString());
 }
 @Override
 public void dump(Appendable out, String indent) throws IOException {
   super.dump(out, indent);
   ContainerLifeCycle.dump(out, indent, Collections.singletonList(connectionPool));
 }