congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Connector.stop
Code IndexAdd Tabnine to your IDE (free)

How to use
stop
method
in
org.eclipse.jetty.server.Connector

Best Java code snippets using org.eclipse.jetty.server.Connector.stop (Showing top 20 results out of 315)

origin: Alluxio/alluxio

/**
 * Shuts down the web server.
 */
public void stop() throws Exception {
 // close all connectors and release all binding ports
 for (Connector connector : mServer.getConnectors()) {
  connector.stop();
 }
 mServer.stop();
}
origin: 4thline/cling

@Override
synchronized public void removeConnector(String host, int port)  {
  Connector[] connectors = server.getConnectors();
  for (Connector connector : connectors) {
    if (connector.getHost().equals(host) && connector.getLocalPort() == port) {
      if (connector.isStarted() || connector.isStarting()) {
        try {
          connector.stop();
        } catch (Exception ex) {
          log.severe("Couldn't stop connector: " + connector + " " + ex);
          throw new RuntimeException(ex);
        }
      }
      server.removeConnector(connector);
      if (connectors.length == 1) {
        log.info("No more connectors, stopping Jetty server");
        stopIfRunning();
      }
      break;
    }
  }
}
origin: org.alluxio/alluxio-core-server-common

/**
 * Shuts down the web server.
 */
public void stop() throws Exception {
 // close all connectors and release all binding ports
 for (Connector connector : mServer.getConnectors()) {
  connector.stop();
 }
 mServer.stop();
}
origin: apache/attic-polygene-java

@Override
public final void stopJetty()
  throws Exception
{
  server.stop();
  for( Connector connector : server.getConnectors() )
  {
    connector.stop();
  }
  server = null;
}
origin: org.mule.transports/mule-transport-jetty

@Override
public void stop() throws MuleException
{
  try
  {
    connector.stop();
    started = false;
  }
  catch (Exception e)
  {
    logger.warn("Jetty connector did not close cleanly: " + e.getMessage());
  }
}
origin: org.qi4j.library/org.qi4j.library.http

@Override
public final void stopJetty()
  throws Exception
{
  server.stop();
  for( Connector connector : server.getConnectors() )
  {
    connector.stop();
  }
  server = null;
}
origin: org.apache.polygene.libraries/org.apache.polygene.library.http

@Override
public final void stopJetty()
  throws Exception
{
  server.stop();
  for( Connector connector : server.getConnectors() )
  {
    connector.stop();
  }
  server = null;
}
origin: com.intuit.autumn/autumn-web

  /**
   * @throws Exception
   */

  @Override
  protected void shutDown() throws Exception {
    if (server == null) {
      LOGGER.error("Server is already stopped");
    } else {
      LOGGER.debug("stopping {}", serviceName());

      try {
        for (Connector c : server.getConnectors()) {
          c.stop();
        }
      } finally {
        server.stop();
        server = null;
      }

      LOGGER.debug("stopped {}", serviceName());
    }
  }
}
origin: com.intuit.data.autumn/autumn.web

  /**
   * @throws Exception
   */

  @Override
  protected void shutDown() throws Exception {
    if (server == null) {
      LOGGER.error("Server is already stopped");
    } else {
      LOGGER.debug("stopping {}", serviceName());

      try {
        for (Connector c : server.getConnectors()) {
          c.stop();
        }
      } finally {
        server.stop();
        server = null;
      }

      LOGGER.debug("stopped {}", serviceName());
    }
  }
}
origin: org.ow2.petals/petals-bc-rest

/**
 * We need to stop only the connectors because if we stop {@link #server}, then it will remove all the registered
 * REST services from it.
 */
public void stop() {
  final List<Exception> exceptions = new ArrayList<>();
  final Connector[] connectors = this.server.getConnectors();
  if (connectors != null) {
    for (final Connector c : connectors) {
      try {
        c.stop();
      } catch (Exception e) {
        exceptions.add(e);
      }
    }
  }
  if (!exceptions.isEmpty()) {
    JBIException jbiException = new JBIException("Error while stopping RESTServer");
    for (final Exception e : exceptions) {
      jbiException.addSuppressed(e);
    }
  }
}
origin: org.apache.cxf/cxf-bundle-jaxrs

/**
 * This method is called by the ServerEngine Factory to destroy the 
 * listener.
 *
 */
protected void stop() throws Exception {
  registedPaths.clear();
  if (server != null) {
    try {
      connector.stop();
      connector.close();            
    } finally {         
      server.stop();
      server.destroy();
      server = null;
    }
  }
}

origin: org.fourthline.cling/cling-core

@Override
synchronized public void removeConnector(String host, int port)  {
  Connector[] connectors = server.getConnectors();
  for (Connector connector : connectors) {
    if (connector.getHost().equals(host) && connector.getLocalPort() == port) {
      if (connector.isStarted() || connector.isStarting()) {
        try {
          connector.stop();
        } catch (Exception ex) {
          log.severe("Couldn't stop connector: " + connector + " " + ex);
          throw new RuntimeException(ex);
        }
      }
      server.removeConnector(connector);
      if (connectors.length == 1) {
        log.info("No more connectors, stopping Jetty server");
        stopIfRunning();
      }
      break;
    }
  }
}
origin: apache/felix

  @Override
  public void removedService(ServiceReference<ConnectorFactory> reference, Connector service)
  {
    Connector connector = service;
    if (connector.isStarted())
    {
      try
      {
        connector.stop();
      }
      catch (Exception e)
      {
        SystemLogger.info("Failed stopping connector '" + connector + "' provided by " + reference + ": " + e);
      }
    }
    this.server.removeConnector(connector);
  }
}
origin: org.apache.cxf/cxf-rt-transports-http-jetty

try {
  if (connector != null) {
    connector.stop();
    if (connector instanceof Closeable) {
      ((Closeable)connector).close();
origin: apache/cxf

try {
  if (connector != null) {
    connector.stop();
    if (connector instanceof Closeable) {
      ((Closeable)connector).close();
origin: org.eclipse.jetty.aggregate/jetty-plus

try{_connectors[i].stop();}catch(Throwable e){mex.add(e);}
origin: org.eclipse.jetty.aggregate/jetty-webapp

try{_connectors[i].stop();}catch(Throwable e){mex.add(e);}
origin: org.eclipse.jetty/server

try{_connectors[i].stop();}catch(Throwable e){mex.add(e);}
origin: org.eclipse.jetty.aggregate/jetty-all-server

try{_connectors[i].stop();}catch(Throwable e){mex.add(e);}
origin: org.eclipse.jetty.aggregate/jetty-server

try{_connectors[i].stop();}catch(Throwable e){mex.add(e);}
org.eclipse.jetty.serverConnectorstop

Popular methods of Connector

  • setPort
  • getLocalPort
  • getName
  • start
  • getServer
  • setHost
    Set the hostname of the interface to bind to.
  • getConnectionFactories
  • getPort
  • getConnectionFactory
  • getExecutor
  • getHost
  • getByteBufferPool
  • getHost,
  • getByteBufferPool,
  • close,
  • getProtocols,
  • getScheduler,
  • isConfidential,
  • isIntegral,
  • shutdown,
  • getDefaultConnectionFactory

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • onCreateOptionsMenu (Activity)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • JOptionPane (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now