Class HttpsParameters

java.lang.Object
com.sun.net.httpserver.HttpsParameters

public abstract class HttpsParameters extends Object
Represents the set of parameters for each https connection negotiated with clients. One of these is created and passed to HttpsConfigurator.configure(HttpsParameters) for every incoming https connection, in order to determine the parameters to use.

The underlying SSL parameters may be established either via the set/get methods of this class, or else via a SSLParameters object. SSLParameters is the preferred method, because in the future, additional configuration capabilities may be added to that class, and it is easier to determine the set of supported parameters and their default values with SSLParameters. Also, if an SSLParameters object is provided via setSSLParameters(SSLParameters) then those parameter settings are used, and any settings made in this object are ignored.

Since:
1.6
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor for subclasses to call.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
    Returns the address of the remote client initiating the connection.
    Returns the HttpsConfigurator for this HttpsParameters.
    boolean
    Deprecated.
    It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
    Deprecated.
    It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
    boolean
    Deprecated.
    It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
    void
    setCipherSuites(String[] cipherSuites)
    Deprecated.
    It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
    void
    setNeedClientAuth(boolean needClientAuth)
    Deprecated.
    It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
    void
    setProtocols(String[] protocols)
    Deprecated.
    It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
    abstract void
    Sets the SSLParameters to use for this HttpsParameters.
    void
    setWantClientAuth(boolean wantClientAuth)
    Deprecated.
    It is recommended that the SSL parameters be configured and read through the use of SSLParameters.

    Methods declared in class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
    Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
    boolean
    Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    May cause performance issues, deadlocks and hangs.
    final Class<? extends Object>
    Answers the unique instance of java.lang.Class which represents the class of the receiver.
    int
    Answers an integer hash code for the receiver.
    final void
    Causes one thread which is waiting on the receiver to be made ready to run.
    final void
    Causes all threads which are waiting on the receiver to be made ready to run.
    Answers a string containing a concise, human-readable description of the receiver.
    final void
    Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated by notify or notifyAll).
    final void
    wait(long time)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
    final void
    wait(long time, int frac)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
  • Constructor Details

    • HttpsParameters

      protected HttpsParameters()
      Constructor for subclasses to call.
  • Method Details

    • getHttpsConfigurator

      public abstract HttpsConfigurator getHttpsConfigurator()
      Returns the HttpsConfigurator for this HttpsParameters.
      Returns:
      HttpsConfigurator for this instance of HttpsParameters
    • getClientAddress

      public abstract InetSocketAddress getClientAddress()
      Returns the address of the remote client initiating the connection.
      Returns:
      address of the remote client initiating the connection
    • setSSLParameters

      public abstract void setSSLParameters(SSLParameters params)
      Sets the SSLParameters to use for this HttpsParameters. The parameters must be supported by the SSLContext contained by the HttpsConfigurator associated with this HttpsParameters. If no parameters are set, then the default behavior is to use the default parameters from the associated SSLContext.
      Parameters:
      params - the SSLParameters to set. If null then the existing parameters (if any) remain unchanged
      Throws:
      IllegalArgumentException - if any of the parameters are invalid or unsupported
    • getCipherSuites

      @Deprecated(since="23") public String[] getCipherSuites()
      Deprecated.
      It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
      Returns a copy of the array of ciphersuites or null if none have been set.
      Returns:
      a copy of the array of ciphersuites or null if none have been set
    • setCipherSuites

      @Deprecated(since="23") public void setCipherSuites(String[] cipherSuites)
      Deprecated.
      It is recommended that the SSL parameters be configured and read through the use of SSLParameters. Use SSLParameters.setCipherSuites(String[]) instead.
      Sets the array of ciphersuites.
      Parameters:
      cipherSuites - the array of ciphersuites (or null)
    • getProtocols

      @Deprecated(since="23") public String[] getProtocols()
      Deprecated.
      It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
      Returns a copy of the array of protocols or null if none have been set.
      Returns:
      a copy of the array of protocols or null if none have been set
    • setProtocols

      @Deprecated(since="23") public void setProtocols(String[] protocols)
      Deprecated.
      It is recommended that the SSL parameters be configured and read through the use of SSLParameters. Use SSLParameters.setProtocols(String[]) instead.
      Sets the array of protocols.
      Parameters:
      protocols - the array of protocols (or null)
    • getWantClientAuth

      @Deprecated(since="23") public boolean getWantClientAuth()
      Deprecated.
      It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
      Returns whether client authentication should be requested.
      Returns:
      whether client authentication should be requested
    • setWantClientAuth

      @Deprecated(since="23") public void setWantClientAuth(boolean wantClientAuth)
      Deprecated.
      It is recommended that the SSL parameters be configured and read through the use of SSLParameters. Use SSLParameters.setWantClientAuth(boolean) instead.
      Sets whether client authentication should be requested. Calling this method clears the needClientAuth flag.
      Parameters:
      wantClientAuth - whether client authentication should be requested
    • getNeedClientAuth

      @Deprecated(since="23") public boolean getNeedClientAuth()
      Deprecated.
      It is recommended that the SSL parameters be configured and read through the use of SSLParameters.
      Returns whether client authentication should be required.
      Returns:
      whether client authentication should be required
    • setNeedClientAuth

      @Deprecated(since="23") public void setNeedClientAuth(boolean needClientAuth)
      Deprecated.
      It is recommended that the SSL parameters be configured and read through the use of SSLParameters. Use SSLParameters.setNeedClientAuth(boolean) instead.
      Sets whether client authentication should be required. Calling this method clears the wantClientAuth flag.
      Parameters:
      needClientAuth - whether client authentication should be required