LDAP 経由の tls を有効にするために、コードで次のコードを使用しています。
import javax.naming.ldap.*;
// Open an LDAP association
LdapContext ctx = new InitialLdapContext();
// Perform a StartTLS extended operation
StartTlsResponse tls =
(StartTlsResponse) ctx.extendedOperation(new StartTlsRequest());
// Open a TLS connection (over the existing LDAP association) and get details
// of the negotiated TLS session: cipher suite, peer certificate, ...
SSLSession session = tls.negotiate();
// ... use ctx to perform protected LDAP operations
// Close the TLS connection (revert back to the underlying LDAP association)
tls.close();
// ... use ctx to perform unprotected LDAP operations
// Close the LDAP association
ctx.close;
私の質問は、StartTLSResponse クラスが抽象クラスであり、そのネゴシエートやクローズなどのメソッドが抽象であるためです。このメソッドを実装する必要がありますか、それとも上記のコードを使用するだけで機能しますか。
http://docs.oracle.com/javase/7/docs/api/javax/naming/ldap/StartTlsResponse.html#close%28%29からコードを取得したので