Tabnine Logo
Connector.getPort
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: stackoverflow.com

Server server = ServerFactory.getServer();
   Service[] services = server.findServices();
   for (Service service : services) {
     for (Connector connector : service.findConnectors()) {
       ProtocolHandler protocolHandler = connector.getProtocolHandler();
       if (protocolHandler instanceof Http11Protocol
         || protocolHandler instanceof Http11AprProtocol
         || protocolHandler instanceof Http11NioProtocol) {
         serverPort = connector.getPort();
         System.out.println("HTTP Port: " + connector.getPort());
       }
     }
   }
origin: org.apache.cxf/cxf-bundle-jaxrs

private void checkConnectorPort() throws IOException {
  if (null != connector && port != connector.getPort()) {
    throw new IOException("Error: Connector port " + connector.getPort() + " does not match"
          + " with the server engine port " + port);
  }
}

origin: CoreMedia/jangaroo-tools

protected String getJettyUrl(Server server) {
 return "http://" + jooUnitJettyHost + ":" + server.getConnectors()[0].getPort();
}
origin: SurveyMan/SurveyMan

public int getPort() {
 return server.getConnectors()[0].getPort();
}
origin: com.azaptree/azaptree-http-service

@PreDestroy
public void destroy() {
  log.info("STOPPING HTTP SERVICE ON PORT: {}", server.getConnectors()[0].getPort());
  stopAndWait();
  log.info("STOPPED HTTP SERVICE ON PORT: {}", server.getConnectors()[0].getPort());
  server.destroy();
  log.info("DESTROYED HTTP SERVICE ON PORT: {}", server.getConnectors()[0].getPort());
}
origin: com.azaptree/azaptree-http-service

@Override
@ManagedAttribute
public int getPort() {
  return server.getConnectors()[0].getPort();
}
origin: eclipse-jetty/eclipse-jetty-plugin

/**
 * {@inheritDoc}
 * 
 * @see net.sourceforge.eclipsejetty.starter.common.ServerAdapter#getPorts()
 */
public Collection<Integer> getPorts()
{
  Collection<Integer> results = new LinkedHashSet<Integer>();
  Connector[] connectors = server.getConnectors();
  if (connectors != null)
  {
    for (Connector connector : connectors)
    {
      if (!connector.getClass().getSimpleName().toLowerCase().contains("ssl"))
      {
        results.add(connector.getPort());
      }
    }
  }
  return results;
}
origin: eclipse-jetty/eclipse-jetty-plugin

/**
 * {@inheritDoc}
 * 
 * @see net.sourceforge.eclipsejetty.starter.common.ServerAdapter#getSecurePorts()
 */
@Override
public Collection<Integer> getSecurePorts()
{
  Collection<Integer> results = new LinkedHashSet<Integer>();
  Connector[] connectors = server.getConnectors();
  if (connectors != null)
  {
    for (Connector connector : connectors)
    {
      if (connector.getClass().getSimpleName().toLowerCase().contains("ssl"))
      {
        results.add(connector.getPort());
      }
    }
  }
  return results;
}
origin: eclipse-jetty/eclipse-jetty-plugin

/**
 * {@inheritDoc}
 * 
 * @see net.sourceforge.eclipsejetty.starter.common.ServerAdapter#getPorts()
 */
@Override
public Collection<Integer> getPorts()
{
  Collection<Integer> results = new LinkedHashSet<Integer>();
  Connector[] connectors = server.getConnectors();
  if (connectors != null)
  {
    for (Connector connector : connectors)
    {
      if (!connector.getClass().getSimpleName().toLowerCase().contains("ssl"))
      {
        results.add(connector.getPort());
      }
    }
  }
  return results;
}
origin: eclipse-jetty/eclipse-jetty-plugin

/**
 * {@inheritDoc}
 * 
 * @see net.sourceforge.eclipsejetty.starter.common.ServerAdapter#getSecurePorts()
 */
public Collection<Integer> getSecurePorts()
{
  Collection<Integer> results = new LinkedHashSet<Integer>();
  Connector[] connectors = server.getConnectors();
  if (connectors != null)
  {
    for (Connector connector : connectors)
    {
      if (connector.getClass().getSimpleName().toLowerCase().contains("ssl"))
      {
        results.add(connector.getPort());
      }
    }
  }
  return results;
}
origin: stackoverflow.com

 @Inject
private EmbeddedWebApplicationContext appContext;

public String getBaseUrl() throws UnknownHostException {
  Connector connector = ((TomcatEmbeddedServletContainer) appContext.getEmbeddedServletContainer()).getTomcat().getConnector();
  String scheme = connector.getScheme();
  String ip = InetAddress.getLocalHost().getHostAddress();
  int port = connector.getPort();
  String contextPath = appContext.getServletContext().getContextPath()
  return scheme + "://" + ip + ":" + port + contextPath;
}
origin: org.jboss.arquillian.protocol/arquillian-protocol-servlet

protected URI createBaseURL() {
  return URI.create("http://localhost:" + server.getConnectors()[0].getPort() + "/arquillian-protocol");
}
origin: stackoverflow.com

for (Connector connector : engine.getService().findConnectors()) {
  System.out.println(connector.getPort());
origin: arquillian/arquillian-core

protected URI createBaseURL() {
  return URI.create("http://localhost:" + server.getConnectors()[0].getPort() + "/arquillian-protocol");
}
origin: stackoverflow.com

 private int getTomcatContainerPort() throws MalformedObjectNameException, AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException {
  int serverPort = 0;
  MBeanServer mBeanServer = MBeanServerFactory.findMBeanServer(null).get(0);
  ObjectName name = new ObjectName("Catalina", "type", "Server");
  Server server = (Server) mBeanServer.getAttribute(name, "managedResource");
  Service[] services = server.findServices();
  for (Service service : services) {
    for (Connector connector : service.findConnectors()) {
      ProtocolHandler protocolHandler = connector.getProtocolHandler();
      if (protocolHandler instanceof Http11Protocol
        || protocolHandler instanceof Http11AprProtocol
        || protocolHandler instanceof Http11NioProtocol) {
        serverPort = connector.getPort();
        break;
      }
    }
  }
  return serverPort;
}
origin: org.eclipse.jetty.aggregate/jetty-webapp

  port = connectors[0].getPort();
canonicalName.append(port);
canonicalName.append("-");
origin: org.eclipse.jetty.aggregate/jetty-plus

  port = connectors[0].getPort();
canonicalName.append(port);
canonicalName.append("-");
origin: org.eclipse.jetty.aggregate/jetty-all-server

  port = connectors[0].getPort();
canonicalName.append(port);
canonicalName.append("-");
origin: org.testatoo.container/testatoo-container-jetty

settings().port(jetty.getConnectors()[0].getPort());
origin: org.sonatype.plexus/plexus-jetty7

"Adding Jetty Connector " + conn.getClass().getName() + " on port " + conn.getPort() );
org.eclipse.jetty.serverConnectorgetPort

Popular methods of Connector

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top plugins for Android Studio
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