jdk/src/share/classes/javax/security/sasl/Sasl.java
changeset 14340 e150cbaf584e
parent 10709 d865c9f21240
child 14342 8435a30053c1
--- a/jdk/src/share/classes/javax/security/sasl/Sasl.java	Thu Nov 01 18:09:43 2012 -0400
+++ b/jdk/src/share/classes/javax/security/sasl/Sasl.java	Fri Nov 02 10:48:04 2012 +0800
@@ -119,6 +119,18 @@
     "javax.security.sasl.server.authentication";
 
     /**
+     * The name of a property that specifies the bound server name for
+     * an unbound server. A server is created as an unbound server by setting
+     * the {@code serverName} argument in {@link #createSaslServer} as null.
+     * The property contains the bound host name after the authentication
+     * exchange has completed. It is only available on the server side.
+     * <br>The value of this constant is
+     * <tt>"javax.security.sasl.bound.server.name"</tt>.
+     */
+    public static final String BOUND_SERVER_NAME =
+    "javax.security.sasl.bound.server.name";
+
+    /**
      * The name of a property that specifies the maximum size of the receive
      * buffer in bytes of <tt>SaslClient</tt>/<tt>SaslServer</tt>.
      * The property contains the string representation of an integer.
@@ -449,7 +461,10 @@
      * IANA-registered name of a SASL mechanism. (e.g. "GSSAPI", "CRAM-MD5").
      * @param protocol The non-null string name of the protocol for which
      * the authentication is being performed (e.g., "ldap").
-     * @param serverName The non-null fully qualified host name of the server.
+     * @param serverName The fully qualified host name of the server, or null
+     * if the server is not bound to any specific host name. If the mechanism
+     * does not allow an unbound server, a <code>SaslException</code> will
+     * be thrown.
      * @param props The possibly null set of properties used to
      * select the SASL mechanism and to configure the authentication
      * exchange of the selected mechanism.