javax.naming.ldap
Class StartTlsResponse

java.lang.Object
  extended by javax.naming.ldap.StartTlsResponse
All Implemented Interfaces:
Serializable, ExtendedResponse

public abstract class StartTlsResponse
extends Object
implements ExtendedResponse

Since:
1.4
See Also:
Serialized Form

Field Summary
static String OID
          The assigned object identifier for this response.
 
Constructor Summary
protected StartTlsResponse()
          Create a new instance.
 
Method Summary
abstract  void close()
          Close the connection.
 byte[] getEncodedValue()
          Return the encoded value.
 String getID()
          Return the response identifier.
abstract  SSLSession negotiate()
          Negotiate the TLS session using the default SSL socket factory.
abstract  SSLSession negotiate(SSLSocketFactory factory)
          Negotiate the TLS session using the supplied SSL socket factory.
abstract  void setEnabledCipherSuites(String[] cipherSuites)
          Set the list of cipher suites to use.
abstract  void setHostnameVerifier(HostnameVerifier verifier)
          Set the hostname verifier to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OID

public static final String OID
The assigned object identifier for this response.

See Also:
Constant Field Values
Constructor Detail

StartTlsResponse

protected StartTlsResponse()
Create a new instance.

Method Detail

getID

public String getID()
Return the response identifier. This is simply the value of the OID field.

Specified by:
getID in interface ExtendedResponse

getEncodedValue

public byte[] getEncodedValue()
Return the encoded value. This implementation always returns null.

Specified by:
getEncodedValue in interface ExtendedResponse

setEnabledCipherSuites

public abstract void setEnabledCipherSuites(String[] cipherSuites)
Set the list of cipher suites to use.

Parameters:
cipherSuites - the list of suites
See Also:
SSLSocketFactory.getSupportedCipherSuites()

setHostnameVerifier

public abstract void setHostnameVerifier(HostnameVerifier verifier)
Set the hostname verifier to use. This must be called before negotiate().

Parameters:
verifier - the hostname verifier

negotiate

public abstract SSLSession negotiate()
                              throws IOException
Negotiate the TLS session using the default SSL socket factory.

Returns:
the SSL session
Throws:
IOException - if communication fails for some reason

negotiate

public abstract SSLSession negotiate(SSLSocketFactory factory)
                              throws IOException
Negotiate the TLS session using the supplied SSL socket factory.

Parameters:
factory - the socket factory to use
Returns:
the SSL session
Throws:
IOException - if communication fails for some reason

close

public abstract void close()
                    throws IOException
Close the connection.

Throws:
IOException - if communication fails for some reason