javax.naming.ldap

Class StartTlsResponse

public abstract class StartTlsResponse extends Object implements ExtendedResponse

Since: 1.4

Field Summary
static StringOID
The assigned object identifier for this response.
Constructor Summary
protected StartTlsResponse()
Create a new instance.
Method Summary
abstract voidclose()
Close the connection.
byte[]getEncodedValue()
Return the encoded value.
StringgetID()
Return the response identifier.
abstract SSLSessionnegotiate()
Negotiate the TLS session using the default SSL socket factory.
abstract SSLSessionnegotiate(SSLSocketFactory factory)
Negotiate the TLS session using the supplied SSL socket factory.
abstract voidsetEnabledCipherSuites(String[] cipherSuites)
Set the list of cipher suites to use.
abstract voidsetHostnameVerifier(HostnameVerifier verifier)
Set the hostname verifier to use.

Field Detail

OID

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

Constructor Detail

StartTlsResponse

protected StartTlsResponse()
Create a new instance.

Method Detail

close

public abstract void close()
Close the connection.

Throws: IOException if communication fails for some reason

getEncodedValue

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

getID

public String getID()
Return the response identifier. This is simply the value of the {@link #OID} field.

negotiate

public abstract SSLSession negotiate()
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)
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

setEnabledCipherSuites

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

Parameters: cipherSuites the list of suites

See Also: getSupportedCipherSuites

setHostnameVerifier

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

Parameters: verifier the hostname verifier