Java Doc for StartTlsResponseImpl.java in  » 6.0-JDK-Modules-com.sun » jndi » com » sun » jndi » ldap » ext » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules com.sun » jndi » com.sun.jndi.ldap.ext 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.naming.ldap.StartTlsResponse
      com.sun.jndi.ldap.ext.StartTlsResponseImpl

StartTlsResponseImpl
final public class StartTlsResponseImpl extends StartTlsResponse (Code)
This class implements the LDAPv3 Extended Response for StartTLS as defined in Lightweight Directory Access Protocol (v3): Extension for Transport Layer Security The object identifier for StartTLS is 1.3.6.1.4.1.1466.20037 and no extended response value is defined.

The Start TLS extended request and response are used to establish a TLS connection over the existing LDAP connection associated with the JNDI context on which extendedOperation() is invoked.
See Also:   StartTlsRequest
author:
   Vincent Ryan




Constructor Summary
public  StartTlsResponseImpl()
    

Method Summary
public  voidclose()
     Closes the TLS connection gracefully and reverts back to the underlying connection.
public  SSLSessionnegotiate()
     Negotiates a TLS session using the default SSL socket factory.
public  SSLSessionnegotiate(SSLSocketFactory factory)
     Negotiates a TLS session using an SSL socket factory.

Creates an SSL socket using the supplied SSL socket factory and attaches it to the existing connection.

public  voidsetConnection(Connection ldapConnection, String hostname)
     Sets the connection for TLS to use.
public  voidsetEnabledCipherSuites(String[] suites)
     Overrides the default list of cipher suites enabled for use on the TLS connection.
public  voidsetHostnameVerifier(HostnameVerifier verifier)
     Overrides the default hostname verifier used by negotiate() after the TLS handshake has completed.


Constructor Detail
StartTlsResponseImpl
public StartTlsResponseImpl()(Code)




Method Detail
close
public void close() throws IOException(Code)
Closes the TLS connection gracefully and reverts back to the underlying connection.



negotiate
public SSLSession negotiate() throws IOException(Code)
Negotiates a TLS session using the default SSL socket factory.

This method is equivalent to negotiate(null). The negotiated SSL session
See Also:   StartTlsResponseImpl.setEnabledCipherSuites
See Also:   StartTlsResponseImpl.setHostnameVerifier




negotiate
public SSLSession negotiate(SSLSocketFactory factory) throws IOException(Code)
Negotiates a TLS session using an SSL socket factory.

Creates an SSL socket using the supplied SSL socket factory and attaches it to the existing connection. Performs the TLS handshake and returns the negotiated session information.

If cipher suites have been set via setEnabledCipherSuites then they are enabled before the TLS handshake begins.

Hostname verification is performed after the TLS handshake completes. The default check performs a case insensitive match of the server's hostname against that in the server's certificate. The server's hostname is extracted from the subjectAltName in the server's certificate (if present). Otherwise the value of the common name attribute of the subject name is used. If a callback has been set via setHostnameVerifier then that verifier is used if the default check fails.

If an error occurs then the SSL socket is closed and an IOException is thrown. The underlying connection remains intact.
Parameters:
  factory - The possibly null SSL socket factory to use.If null, the default SSL socket factory is used. The negotiated SSL session
See Also:   StartTlsResponseImpl.setEnabledCipherSuites
See Also:   StartTlsResponseImpl.setHostnameVerifier




setConnection
public void setConnection(Connection ldapConnection, String hostname)(Code)
Sets the connection for TLS to use. The TLS connection will be attached to this connection.
Parameters:
  ldapConnection - The non-null connection to use.
Parameters:
  hostname - The server's hostname. If null, the hostname used toopen the connection will be used instead.



setEnabledCipherSuites
public void setEnabledCipherSuites(String[] suites)(Code)
Overrides the default list of cipher suites enabled for use on the TLS connection. The cipher suites must have already been listed by SSLSocketFactory.getSupportedCipherSuites() as being supported. Even if a suite has been enabled, it still might not be used because the peer does not support it, or because the requisite certificates (and private keys) are not available.
Parameters:
  suites - The non-null list of names of all the cipher suites toenable.
See Also:   StartTlsResponseImpl.negotiate



setHostnameVerifier
public void setHostnameVerifier(HostnameVerifier verifier)(Code)
Overrides the default hostname verifier used by negotiate() after the TLS handshake has completed. If setHostnameVerifier() has not been called before negotiate() is invoked, negotiate() will perform a simple case ignore match. If called after negotiate(), this method does not do anything.
Parameters:
  verifier - The non-null hostname verifier callback.
See Also:   StartTlsResponseImpl.negotiate



Fields inherited from javax.naming.ldap.StartTlsResponse
final public static String OID(Code)(Java Doc)

Methods inherited from javax.naming.ldap.StartTlsResponse
abstract public void close() throws IOException(Code)(Java Doc)
public byte[] getEncodedValue()(Code)(Java Doc)
public String getID()(Code)(Java Doc)
abstract public SSLSession negotiate() throws IOException(Code)(Java Doc)
abstract public SSLSession negotiate(SSLSocketFactory factory) throws IOException(Code)(Java Doc)
abstract public void setEnabledCipherSuites(String[] suites)(Code)(Java Doc)
abstract public void setHostnameVerifier(HostnameVerifier verifier)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.