congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Connector.getHost
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.eclipse.jetty.server.Connector.getHost (Showing top 12 results out of 342)

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.tachyonproject/tachyon-servers

/**
 * Gets the actual bind hostname.
 *
 * @return the bind host
 */
public String getBindHost() {
 String bindHost = mServer.getServer().getConnectors()[0].getHost();
 return bindHost == null ? "0.0.0.0" : bindHost;
}
origin: com.nesscomputing.components/ness-config

public String getHost()
{
  return connector.getHost();
}
origin: cdapio/cdap

/**
 * Get the InetSocketAddress of the server.
 *
 * @return InetSocketAddress of server.
 */
public InetSocketAddress getSocketAddress() {
 if (!server.isRunning()) {
  throw new IllegalStateException("Server not started yet");
 }
 // assumes we only have one connector
 Connector connector = server.getConnectors()[0];
 return new InetSocketAddress(connector.getHost(), connector.getLocalPort());
}
origin: com.madgag/org.eclipse.jgit.junit.http

/**
 * Get the URI to reference this server.
 * <p>
 * The returned URI includes the proper host name and port number, but does
 * not contain a path.
 *
 * @return URI to reference this server's root context.
 */
public URI getURI() {
  assertAlreadySetUp();
  String host = connector.getHost();
  if (host.contains(":") && !host.startsWith("["))
    host = "[" + host + "]";
  final String uri = "http://" + host + ":" + getPort();
  try {
    return new URI(uri);
  } catch (URISyntaxException e) {
    throw new RuntimeException("Unexpected URI error on " + uri, e);
  }
}
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: io.provis/provisio-webserver-jetty8

public void start() throws Exception {
 Connector connector;
 if (enableSsl) {
  SslContextFactory sslContextFactory = new SslContextFactory();
  if (sslContext == null) {
  } else {
   System.out.println("Using provided SSLContext");
   System.out.println(sslContext);
   sslContextFactory.setSslContext(sslContext);
  }
  connector = new SslSelectChannelConnector();
  ((SslSelectChannelConnector) connector).setSslContext(sslContext);
 } else {
  connector = new SelectChannelConnector();
 }
 connector.setPort(port);
 server.addConnector(connector);
 connector.open();
 server.setHandler(contexts);
 server.start();
 if (enableSsl) {
  protocol = "https";
 } else {
  protocol = "http";
 }
 port = connector.getLocalPort();
 host = connector.getHost();
}
origin: org.eclipse.jetty.aggregate/jetty-plus

String host = (connectors==null||connectors[0]==null?"":connectors[0].getHost());
if (host == null)
  host = "0.0.0.0";
origin: org.eclipse.jetty.aggregate/jetty-all-server

String host = (connectors==null||connectors[0]==null?"":connectors[0].getHost());
if (host == null)
  host = "0.0.0.0";
origin: org.eclipse.jetty.aggregate/jetty-webapp

String host = (connectors==null||connectors[0]==null?"":connectors[0].getHost());
if (host == null)
  host = "0.0.0.0";
origin: org.apache.cxf/cxf-bundle-jaxrs

if (LOG.isLoggable(Level.FINER)) {
  LOG.finer("connector.host: " 
       + connector.getHost() == null 
        ? "null" 
        : "\"" + connector.getHost() + "\"");
  LOG.finer("connector.port: " + connector.getPort());
origin: cdapio/cdap

InetSocketAddress inetSocketAddress = new InetSocketAddress(connector.getHost(), connector.getLocalPort());
serviceCancellable = discoveryService.register(
 ResolvingDiscoverable.of(new Discoverable(Constants.Service.EXTERNAL_AUTHENTICATION, inetSocketAddress)));
org.eclipse.jetty.serverConnectorgetHost

Popular methods of Connector

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

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JCheckBox (javax.swing)
  • JPanel (javax.swing)
  • Top 25 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