Java Doc for TlsProtocolHandler.java in  » Security » Bouncy-Castle » org » bouncycastle » crypto » tls » 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 » Security » Bouncy Castle » org.bouncycastle.crypto.tls 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.bouncycastle.crypto.tls.TlsProtocolHandler

TlsProtocolHandler
public class TlsProtocolHandler (Code)
An implementation of all high level protocols in TLS 1.0.


Field Summary
final protected static  shortAL_fatal
    
final protected static  shortAL_warning
    
final protected static  shortAP_access_denied
    
final protected static  shortAP_bad_certificate
    
final protected static  shortAP_bad_record_mac
    
final protected static  shortAP_certificate_expired
    
final protected static  shortAP_certificate_revoked
    
final protected static  shortAP_certificate_unknown
    
final protected static  shortAP_close_notify
    
final protected static  shortAP_decode_error
    
final protected static  shortAP_decompression_failure
    
final protected static  shortAP_decrypt_error
    
final protected static  shortAP_decryption_failed
    
final protected static  shortAP_export_restriction
    
final protected static  shortAP_handshake_failure
    
final protected static  shortAP_illegal_parameter
    
final protected static  shortAP_insufficient_security
    
final protected static  shortAP_internal_error
    
final protected static  shortAP_no_renegotiation
    
final protected static  shortAP_protocol_version
    
final protected static  shortAP_record_overflow
    
final protected static  shortAP_unexpected_message
    
final protected static  shortAP_unknown_ca
    
final protected static  shortAP_unsupported_certificate
    
final protected static  shortAP_user_canceled
    

Constructor Summary
public  TlsProtocolHandler(InputStream is, OutputStream os)
    
public  TlsProtocolHandler(InputStream is, OutputStream os, SecureRandom sr)
    

Method Summary
protected  voidassertEmpty(ByteArrayInputStream is)
     Make sure the InputStream is now empty.
public  voidclose()
     Closes this connection.
public  voidconnect(CertificateVerifyer verifyer)
     Connects to the remote system.
protected  voidfailWithError(short alertLevel, short alertDescription)
     Terminate this connection whith an alert.
protected  voidflush()
    
public  InputStreamgetInputStream()
    
public  OutputStreamgetOutputStream()
    
public  TlsInputStreamgetTlsInputStream()
    
public  TlsOuputStreamgetTlsOuputStream()
    
protected  voidprocessData(short protocol, byte[] buf, int offset, int len)
    
protected  intreadApplicationData(byte[] buf, int offset, int len)
     Read data from the network.
protected  voidwriteData(byte[] buf, int offset, int len)
     Send some application data to the remote system.

Field Detail
AL_fatal
final protected static short AL_fatal(Code)



AL_warning
final protected static short AL_warning(Code)



AP_access_denied
final protected static short AP_access_denied(Code)



AP_bad_certificate
final protected static short AP_bad_certificate(Code)



AP_bad_record_mac
final protected static short AP_bad_record_mac(Code)



AP_certificate_expired
final protected static short AP_certificate_expired(Code)



AP_certificate_revoked
final protected static short AP_certificate_revoked(Code)



AP_certificate_unknown
final protected static short AP_certificate_unknown(Code)



AP_close_notify
final protected static short AP_close_notify(Code)



AP_decode_error
final protected static short AP_decode_error(Code)



AP_decompression_failure
final protected static short AP_decompression_failure(Code)



AP_decrypt_error
final protected static short AP_decrypt_error(Code)



AP_decryption_failed
final protected static short AP_decryption_failed(Code)



AP_export_restriction
final protected static short AP_export_restriction(Code)



AP_handshake_failure
final protected static short AP_handshake_failure(Code)



AP_illegal_parameter
final protected static short AP_illegal_parameter(Code)



AP_insufficient_security
final protected static short AP_insufficient_security(Code)



AP_internal_error
final protected static short AP_internal_error(Code)



AP_no_renegotiation
final protected static short AP_no_renegotiation(Code)



AP_protocol_version
final protected static short AP_protocol_version(Code)



AP_record_overflow
final protected static short AP_record_overflow(Code)



AP_unexpected_message
final protected static short AP_unexpected_message(Code)



AP_unknown_ca
final protected static short AP_unknown_ca(Code)



AP_unsupported_certificate
final protected static short AP_unsupported_certificate(Code)



AP_user_canceled
final protected static short AP_user_canceled(Code)




Constructor Detail
TlsProtocolHandler
public TlsProtocolHandler(InputStream is, OutputStream os)(Code)



TlsProtocolHandler
public TlsProtocolHandler(InputStream is, OutputStream os, SecureRandom sr)(Code)




Method Detail
assertEmpty
protected void assertEmpty(ByteArrayInputStream is) throws IOException(Code)
Make sure the InputStream is now empty. Fail otherwise.
Parameters:
  is - The InputStream to check.
throws:
  IOException - If is is not empty.



close
public void close() throws IOException(Code)
Closes this connection.
throws:
  IOException - If something goes wrong during closing.



connect
public void connect(CertificateVerifyer verifyer) throws IOException(Code)
Connects to the remote system.
Parameters:
  verifyer - Will be used when a certificate is received to verifythat this certificate is accepted by the client.
throws:
  IOException - If handshake was not successfull.



failWithError
protected void failWithError(short alertLevel, short alertDescription) throws IOException(Code)
Terminate this connection whith an alert.

Can be used for normal closure too.
Parameters:
  alertLevel - The level of the alert, an be AL_fatal or AL_warning.
Parameters:
  alertDescription - The exact alert message.
throws:
  IOException - If alert was fatal.




flush
protected void flush() throws IOException(Code)



getInputStream
public InputStream getInputStream()(Code)
An InputStream which can be used to read data.



getOutputStream
public OutputStream getOutputStream()(Code)
An OutputStream which can be used to send data.



getTlsInputStream
public TlsInputStream getTlsInputStream()(Code)



getTlsOuputStream
public TlsOuputStream getTlsOuputStream()(Code)



processData
protected void processData(short protocol, byte[] buf, int offset, int len) throws IOException(Code)



readApplicationData
protected int readApplicationData(byte[] buf, int offset, int len) throws IOException(Code)
Read data from the network. The method will return immed, if there is still some data left in the buffer, or block untill some application data has been read from the network.
Parameters:
  buf - The buffer where the data will be copied to.
Parameters:
  offset - The position where the data will be placed in the buffer.
Parameters:
  len - The maximum number of bytes to read. The number of bytes read.
throws:
  IOException - If something goes wrong during reading data.



writeData
protected void writeData(byte[] buf, int offset, int len) throws IOException(Code)
Send some application data to the remote system.

The method will handle fragmentation internally.
Parameters:
  buf - The buffer with the data.
Parameters:
  offset - The position in the buffer where the data is placed.
Parameters:
  len - The length of the data.
throws:
  IOException - If something goes wrong during sending.




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.