Java Doc for SslHandler.java in  » Net » mina-2.0.0-M1 » org » apache » mina » filter » ssl » 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 » Net » mina 2.0.0 M1 » org.apache.mina.filter.ssl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.mina.filter.ssl.SslHandler

SslHandler
class SslHandler (Code)
A helper class using the SSLEngine API to decrypt/encrypt data.

Each connection has a SSLEngine that is used through the lifetime of the connection. We allocate buffers for use as the outbound and inbound network buffers. These buffers handle all of the intermediary data for the SSL connection. To make things easy, we'll require outNetBuffer be completely flushed before trying to wrap any more data.
author:
   The Apache MINA Project (dev@mina.apache.org)
version:
   $Rev: 616100 $, $Date: 2008-01-28 15:58:32 -0700 (Mon, 28 Jan 2008) $




Constructor Summary
public  SslHandler(SslFilter parent, SSLContext sslc, IoSession session)
     Constuctor.

Method Summary
public  booleancloseOutbound()
     Start SSL shutdown process.
public static  IoBuffercopy(ByteBuffer src)
    
public  voiddestroy()
     Release allocated buffers.
public  voidencrypt(ByteBuffer src)
     Encrypt provided buffer.
public  IoBufferfetchAppBuffer()
     Get decrypted application data.
public  IoBufferfetchOutNetBuffer()
     Get encrypted data to be sent.
public  voidflushPreHandshakeEvents()
    
public  voidflushScheduledEvents()
    
public  SslFiltergetParent()
    
public  IoSessiongetSession()
    
public  voidhandshake(NextFilter nextFilter)
     Perform any handshaking processing.
public  voidinit()
    
public  booleanisHandshakeComplete()
     Check if handshake is completed.
public  booleanisInboundDone()
    
public  booleanisOutboundDone()
    
public  booleanisWritingEncryptedData()
     Check we are writing encrypted data.
public  voidmessageReceived(NextFilter nextFilter, ByteBuffer buf)
     Call when data read from net.
public  booleanneedToCompleteHandshake()
     Check if there is any need to complete handshake.
public  voidscheduleFilterWrite(NextFilter nextFilter, WriteRequest writeRequest)
    
public  voidscheduleMessageReceived(NextFilter nextFilter, Object message)
    
public  voidschedulePreHandshakeWriteRequest(NextFilter nextFilter, WriteRequest writeRequest)
    
public  WriteFuturewriteNetBuffer(NextFilter nextFilter)
    


Constructor Detail
SslHandler
public SslHandler(SslFilter parent, SSLContext sslc, IoSession session) throws SSLException(Code)
Constuctor.
Parameters:
  sslc -
throws:
  SSLException -




Method Detail
closeOutbound
public boolean closeOutbound() throws SSLException(Code)
Start SSL shutdown process. true if shutdown process is started.false if shutdown process is already finished.
throws:
  SSLException - on errors



copy
public static IoBuffer copy(ByteBuffer src)(Code)
Creates a new MINA buffer that is a deep copy of the remaining bytes in the given buffer (between index buf.position() and buf.limit())
Parameters:
  src - the buffer to copy the new buffer, ready to read from



destroy
public void destroy()(Code)
Release allocated buffers.



encrypt
public void encrypt(ByteBuffer src) throws SSLException(Code)
Encrypt provided buffer. Encytpted data reurned by getOutNetBuffer().
Parameters:
  src - data to encrypt
throws:
  SSLException - on errors



fetchAppBuffer
public IoBuffer fetchAppBuffer()(Code)
Get decrypted application data. buffer with data



fetchOutNetBuffer
public IoBuffer fetchOutNetBuffer()(Code)
Get encrypted data to be sent. buffer with data



flushPreHandshakeEvents
public void flushPreHandshakeEvents() throws SSLException(Code)



flushScheduledEvents
public void flushScheduledEvents()(Code)



getParent
public SslFilter getParent()(Code)



getSession
public IoSession getSession()(Code)



handshake
public void handshake(NextFilter nextFilter) throws SSLException(Code)
Perform any handshaking processing.



init
public void init() throws SSLException(Code)



isHandshakeComplete
public boolean isHandshakeComplete()(Code)
Check if handshake is completed.



isInboundDone
public boolean isInboundDone()(Code)



isOutboundDone
public boolean isOutboundDone()(Code)



isWritingEncryptedData
public boolean isWritingEncryptedData()(Code)
Check we are writing encrypted data.



messageReceived
public void messageReceived(NextFilter nextFilter, ByteBuffer buf) throws SSLException(Code)
Call when data read from net. Will perform inial hanshake or decrypt provided Buffer. Decrytpted data reurned by getAppBuffer(), if any.
Parameters:
  buf - buffer to decrypt
Parameters:
  nextFilter - Next filter in chain
throws:
  SSLException - on errors



needToCompleteHandshake
public boolean needToCompleteHandshake()(Code)
Check if there is any need to complete handshake.



scheduleFilterWrite
public void scheduleFilterWrite(NextFilter nextFilter, WriteRequest writeRequest)(Code)



scheduleMessageReceived
public void scheduleMessageReceived(NextFilter nextFilter, Object message)(Code)



schedulePreHandshakeWriteRequest
public void schedulePreHandshakeWriteRequest(NextFilter nextFilter, WriteRequest writeRequest)(Code)



writeNetBuffer
public WriteFuture writeNetBuffer(NextFilter nextFilter) throws SSLException(Code)



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.