congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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