JDK 11 jdk.httpserver.jmod - HTTP Server Module

JDK 11 jdk.httpserver.jmod is the JMOD file for JDK 11 HTTP Server module.

JDK 11 HTTP Server module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.httpserver.jmod.

JDK 11 HTTP Server module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 HTTP Server module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.httpserver.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

com/sun/net/httpserver/HttpsConfigurator.java

/*
 * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package com.sun.net.httpserver;

import java.net.*;
import java.io.*;
import java.nio.*;
import java.security.*;
import java.nio.channels.*;
import java.util.*;
import java.util.concurrent.*;
import javax.net.ssl.*;


/**
 * This class is used to configure the https parameters for each incoming
 * https connection on a HttpsServer. Applications need to override
 * the {@link #configure(HttpsParameters)} method in order to change
 * the default configuration.
 * <p>
 * The following <a id="example">example</a> shows how this may be done:
 *
 * <blockquote><pre>
 * SSLContext sslContext = SSLContext.getInstance (....);
 * HttpsServer server = HttpsServer.create();
 *
 * server.setHttpsConfigurator (new HttpsConfigurator(sslContext) {
 *     public void configure (HttpsParameters params) {
 *
 *         // get the remote address if needed
 *         InetSocketAddress remote = params.getClientAddress();
 *
 *         SSLContext c = getSSLContext();
 *
 *         // get the default parameters
 *         SSLParameters sslparams = c.getDefaultSSLParameters();
 *         if (remote.equals (...) ) {
 *             // modify the default set for client x
 *         }
 *
 *         params.setSSLParameters(sslparams);
 *     }
 * });
 * </pre></blockquote>
 * @since 1.6
 */
public class HttpsConfigurator {

    private SSLContext context;

    /**
     * Creates an Https configuration, with the given SSLContext.
     * @param context the SSLContext to use for this configurator
     * @throws NullPointerException if no SSLContext supplied
     */
    public HttpsConfigurator (SSLContext context) {
        if (context == null) {
            throw new NullPointerException ("null SSLContext");
        }
        this.context = context;
    }

    /**
     * Returns the SSLContext for this HttpsConfigurator.
     * @return the SSLContext
     */
    public SSLContext getSSLContext() {
        return context;
    }

//BEGIN_TIGER_EXCLUDE
   /**
    * Called by the HttpsServer to configure the parameters
    * for a https connection currently being established.
    * The implementation of configure() must call
    * {@link HttpsParameters#setSSLParameters(SSLParameters)}
    * in order to set the SSL parameters for the connection.
    * <p>
    * The default implementation of this method uses the
    * SSLParameters returned from <p>
    * {@code getSSLContext().getDefaultSSLParameters()}
    * <p>
    * configure() may be overridden in order to modify this behavior.
    * See, the example <a href="#example">above</a>.
    * @param params the HttpsParameters to be configured.
    *
    * @since 1.6
    */
    public void configure (HttpsParameters params) {
        params.setSSLParameters (getSSLContext().getDefaultSSLParameters());
    }
//END_TIGER_EXCLUDE
}

com/sun/net/httpserver/HttpsConfigurator.java

 

Or download all of them as a single archive file:

File name: jdk.httpserver-11.0.1-src.zip
File size: 66350 bytes
Release date: 2018-11-04
Download 

 

JDK 11 jdk.internal.ed.jmod - Internal Editor Module

JDK 11 jdk.hotspot.agent.jmod - Hotspot Agent Module

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-02-29, 16415👍, 0💬