Tabnine Logo
WebServerConnectorFactory
Code IndexAdd Tabnine to your IDE (free)

How to use
WebServerConnectorFactory
in
com.hotels.styx.server.netty

Best Java code snippets using com.hotels.styx.server.netty.WebServerConnectorFactory (Showing top 6 results out of 315)

origin: HotelsDotCom/styx

/**
 * Returns a new {@link com.hotels.styx.server.HttpServer} object, which runs on the provided port.
 *
 * @param name - Name of the server and associated IO thread.
 * @param httpConnectorConfig - HTTP connector configuration.
 * @param handler - Request handler.
 *
 * @return {@link com.hotels.styx.server.HttpServer} object
 * @see com.hotels.styx.server.netty.NettyServer
 */
public static HttpServer createHttpServer(String name, HttpConnectorConfig httpConnectorConfig, HttpHandler handler) {
  return NettyServerBuilder.newBuilder()
      .name(name)
      .setHttpConnector(new WebServerConnectorFactory().create(httpConnectorConfig))
      .httpHandler(handler)
      .build();
}
origin: HotelsDotCom/styx

public NettyServerBuilderSpec() {
  this("Styx", new ServerEnvironment(), new WebServerConnectorFactory());
}
origin: HotelsDotCom/styx

return new NettyServerBuilderSpec("Admin", environment.serverEnvironment(), new WebServerConnectorFactory())
    .toNettyServerBuilder(adminServerConfig)
    .httpHandler(httpRouter)
origin: HotelsDotCom/styx

/**
 * Returns a new {@link com.hotels.styx.server.HttpServer} object, using secure HTTPS protocol.
 *
 * @param name - Name of the server and associated IO thread.
 * @param httpsConnectorConfig - HTTPS endpoint configuration.
 * @param handler - Request handler.
 *
 * @return {@link com.hotels.styx.server.HttpServer} object
 * @see com.hotels.styx.server.netty.NettyServer
 */
public static HttpServer createHttpsServer(String name, HttpsConnectorConfig httpsConnectorConfig, HttpHandler handler) {
  return NettyServerBuilder.newBuilder()
      .name(name)
      .setHttpsConnector(new WebServerConnectorFactory().create(httpsConnectorConfig))
      .httpHandler(handler)
      .build();
}
origin: HotelsDotCom/styx

/**
 * Returns a new {@link com.hotels.styx.server.HttpServer} object, which runs on the provided port.
 *
 * @param port
 * @return {@link com.hotels.styx.server.HttpServer} object
 * @see com.hotels.styx.server.netty.NettyServer
 */
public static HttpServer createHttpServer(int port, HttpHandler handler) {
  return NettyServerBuilder.newBuilder()
      .name("NettyServer")
      .setHttpConnector(new WebServerConnectorFactory().create(new HttpConnectorConfig(port)))
      .httpHandler(new StandardHttpRouter().add("/", handler))
      .build();
}
origin: HotelsDotCom/styx

private static HttpServer createHttpServer(Origin origin) {
  LOG.info("creating server for {}", origin.hostAndPortString());
  return new NettyServerBuilder()
      .name(origin.hostAndPortString())
      .setServerEventLoopFactory(serverEventLoopFactory)
      .setHttpConnector(new WebServerConnectorFactory().create(new HttpConnectorConfig(origin.port())))
      .httpHandler(new StandardHttpRouter().add("/*", new AppHandler(origin)))
      .build();
}
com.hotels.styx.server.nettyWebServerConnectorFactory

Javadoc

Creates connectors for web servers.

Most used methods

  • <init>
  • create

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Collectors (java.util.stream)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top 12 Jupyter Notebook extensions
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