Java 类com.sun.net.httpserver.spi.HttpServerProvider 实例源码

项目:Equella    文件:Main.java   
public void startServer() throws Exception
{
    executeUpgrader();

    Authenticator auth = new MyAuthenticator(config);
    server = HttpServerProvider.provider().createHttpServer(
        new InetSocketAddress(config.getManagerDetails().getManagerPort()), 50);

    AjaxState ajaxState = new AjaxStateImpl();

    createContext(server, "/", new WebRootHandler()); //$NON-NLS-1$
    createContext(server, "/pages/", new PagesHandler(config), auth); //$NON-NLS-1$
    createContext(server, "/server/", new ServerHandler(config), auth); //$NON-NLS-1$
    createContext(server, "/deploy/", new DeployHandler(config, ajaxState), auth); //$NON-NLS-1$
    createContext(server, "/ajax/", new AjaxProgressHandler(ajaxState)); //$NON-NLS-1$
    createContext(server, "/upload/", new UploadHandler(config)); //$NON-NLS-1$

    server.start();
}
项目:arquillian-algeron    文件:PactConsumerArchiveAppender.java   
@Override
public Archive<?> createAuxiliaryArchive() {
    JavaArchive arquillianPactConsumer = null;
    arquillianPactConsumer = ShrinkWrap.create(JavaArchive.class, "arquillian-pact-consumer.jar")
        // Add Core classes required in container part
        .addClasses(AbstractConsumerPactTest.class,
            RemoteConsumerPactTest.class, PactConsumerConfiguration.class,
            MockProviderConfigCreator.class, PactConsumerConfigurator.class,
            PactConsumerRemoteExtension.class, PactFilesCommand.class, ConsumerProviderPair.class,
            PactMismatchesException.class, ConsumerPactRunnerKt.class, HttpHandler.class, HttpServer.class,
            HttpServerProvider.class,
            ResolveClassAnnotation.class, StubServer.class, StubServerEnricher.class,
            HttpsServer.class, HttpContext.class)
        .addPackages(true, Pact.class.getPackage())
        .addAsServiceProvider(RemoteLoadableExtension.class, PactConsumerRemoteExtension.class);

    arquillianPactConsumer = addSunHttpServer(arquillianPactConsumer);

    final Properties properties = pactConsumerConfigurationInstance.get().asProperties();
    String configuration = toString(properties);

    arquillianPactConsumer.add(new StringAsset(configuration), "/pact-consumer-configuration.properties");

    final JavaArchive[] pactConsumerDeps = Maven.resolver()
        .resolve("au.com.dius:pact-jvm-consumer_2.11:" + getVersion())
        .withTransitivity().as(JavaArchive.class);

    final JavaArchive merge = merge(arquillianPactConsumer, pactConsumerDeps);
    return merge;
}
项目:easyStor    文件:YNSHttpServer.java   
public static void httpserverService() throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    HttpServer httpserver =provider.createHttpServer(new InetSocketAddress(6666), 100);//�����˿�6666,��ͬʱ�� ��100������
    httpserver.createContext("/yns3_hdfs", new MyHttpHandler()); 
    httpserver.setExecutor(null);
    httpserver.start();
    System.out.println("server started");
}
项目:OpenJSharp    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:jdk8u-jdk    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:openjdk-jdk10    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:openjdk9    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:jdk8u_jdk    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:lookaside_java-1.8.0-openjdk    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:infobip-open-jdk-8    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:jdk8u-dev-jdk    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:jdk7-jdk    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:openjdk-source-code-learn    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:OLD-OpenJDK8    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:openjdk-jdk7u-jdk    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}
项目:openjdk-icedtea7    文件:HttpServer.java   
/**
 * Create a <code>HttpServer</code> instance which will bind to the
 * specified {@link java.net.InetSocketAddress} (IP address and port number)
 *
 * A maximum backlog can also be specified. This is the maximum number of
 * queued incoming connections to allow on the listening socket.
 * Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
 * The HttpServer is acquired from the currently installed {@link HttpServerProvider}
 *
 * @param addr the address to listen on, if <code>null</code> then bind() must be called
 *  to set the address
 * @param backlog the socket backlog. If this value is less than or equal to zero,
 *          then a system default value is used.
 * @throws BindException if the server cannot bind to the requested address,
 *          or if the server is already bound.
 * @throws IOException
 */

public static HttpServer create (
    InetSocketAddress addr, int backlog
) throws IOException {
    HttpServerProvider provider = HttpServerProvider.provider();
    return provider.createHttpServer (addr, backlog);
}