jdk/src/share/classes/com/sun/net/httpserver/HttpsParameters.java
changeset 6906 d57020b6118f
parent 5506 202f599c92aa
child 7271 17d3fc18872d
equal deleted inserted replaced
6905:a0b9d2cd7731 6906:d57020b6118f
    22  * or visit www.oracle.com if you need additional information or have any
    22  * or visit www.oracle.com if you need additional information or have any
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 package com.sun.net.httpserver;
    26 package com.sun.net.httpserver;
    27 import java.net.*;
    27 import java.net.InetSocketAddress;
    28 import java.io.*;
       
    29 import java.util.*;
       
    30 import javax.net.ssl.SSLParameters;
    28 import javax.net.ssl.SSLParameters;
    31 
    29 
    32 /**
    30 /**
    33  * Represents the set of parameters for each https
    31  * Represents the set of parameters for each https
    34  * connection negotiated with clients. One of these
    32  * connection negotiated with clients. One of these
    88      *
    86      *
    89      * @return a copy of the array of ciphersuites or null if none
    87      * @return a copy of the array of ciphersuites or null if none
    90      * have been set.
    88      * have been set.
    91      */
    89      */
    92     public String[] getCipherSuites() {
    90     public String[] getCipherSuites() {
    93         return cipherSuites;
    91         return cipherSuites != null ? cipherSuites.clone() : null;
    94     }
    92     }
    95 
    93 
    96     /**
    94     /**
    97      * Sets the array of ciphersuites.
    95      * Sets the array of ciphersuites.
    98      *
    96      *
    99      * @param cipherSuites the array of ciphersuites (or null)
    97      * @param cipherSuites the array of ciphersuites (or null)
   100      */
    98      */
   101     public void setCipherSuites(String[] cipherSuites) {
    99     public void setCipherSuites(String[] cipherSuites) {
   102         this.cipherSuites = cipherSuites;
   100         this.cipherSuites = cipherSuites != null ? cipherSuites.clone() : null;
   103     }
   101     }
   104 
   102 
   105     /**
   103     /**
   106      * Returns a copy of the array of protocols or null if none
   104      * Returns a copy of the array of protocols or null if none
   107      * have been set.
   105      * have been set.
   108      *
   106      *
   109      * @return a copy of the array of protocols or null if none
   107      * @return a copy of the array of protocols or null if none
   110      * have been set.
   108      * have been set.
   111      */
   109      */
   112     public String[] getProtocols() {
   110     public String[] getProtocols() {
   113         return protocols;
   111         return protocols != null ? protocols.clone() : null;
   114     }
   112     }
   115 
   113 
   116     /**
   114     /**
   117      * Sets the array of protocols.
   115      * Sets the array of protocols.
   118      *
   116      *
   119      * @param protocols the array of protocols (or null)
   117      * @param protocols the array of protocols (or null)
   120      */
   118      */
   121     public void setProtocols(String[] protocols) {
   119     public void setProtocols(String[] protocols) {
   122         this.protocols = protocols;
   120         this.protocols = protocols != null ? protocols.clone() : null;
   123     }
   121     }
   124 
   122 
   125     /**
   123     /**
   126      * Returns whether client authentication should be requested.
   124      * Returns whether client authentication should be requested.
   127      *
   125      *