net.sf.cindy.filter
Class SSLFilter

java.lang.Object
  extended by net.sf.cindy.SessionFilterAdapter
      extended by net.sf.cindy.filter.SSLFilter
All Implemented Interfaces:
SessionFilter

public class SSLFilter
extends SessionFilterAdapter

SSL/TLS filter, require java 5.0.

Version:
$id$
Author:
Roger Chen

Constructor Summary
SSLFilter(javax.net.ssl.SSLContext context)
           
 
Method Summary
 javax.net.ssl.SSLContext getSSLContext()
           
protected  void initSSLEngine(javax.net.ssl.SSLEngine engine)
          Templet method.
 boolean isClientMode()
           
 boolean isNeedClientAuth()
           
 void packetReceived(SessionFilterChain filterChain, Packet packet)
          Session received a packet.
 void packetSend(SessionFilterChain filterChain, Packet packet)
          Filter before send packet.
 void sessionClosed(SessionFilterChain filterChain)
          Session have closed.
 void sessionStarted(SessionFilterChain filterChain)
          Session have started.
 void setClientMode(boolean clientMode)
           
 void setNeedClientAuth(boolean needClientAuth)
           
 
Methods inherited from class net.sf.cindy.SessionFilterAdapter
exceptionCaught, objectReceived, objectSent, packetSent, sessionTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLFilter

public SSLFilter(javax.net.ssl.SSLContext context)
Method Detail

getSSLContext

public javax.net.ssl.SSLContext getSSLContext()

isClientMode

public boolean isClientMode()

setClientMode

public void setClientMode(boolean clientMode)

isNeedClientAuth

public boolean isNeedClientAuth()

setNeedClientAuth

public void setNeedClientAuth(boolean needClientAuth)

sessionStarted

public void sessionStarted(SessionFilterChain filterChain)
                    throws java.lang.Exception
Description copied from interface: SessionFilter
Session have started.

Specified by:
sessionStarted in interface SessionFilter
Overrides:
sessionStarted in class SessionFilterAdapter
Parameters:
filterChain - session filter chain
Throws:
java.lang.Exception - any exception

sessionClosed

public void sessionClosed(SessionFilterChain filterChain)
                   throws java.lang.Exception
Description copied from interface: SessionFilter
Session have closed.

Specified by:
sessionClosed in interface SessionFilter
Overrides:
sessionClosed in class SessionFilterAdapter
Parameters:
filterChain - session filter chain
Throws:
java.lang.Exception - any exception

initSSLEngine

protected void initSSLEngine(javax.net.ssl.SSLEngine engine)
Templet method.


packetReceived

public void packetReceived(SessionFilterChain filterChain,
                           Packet packet)
                    throws java.lang.Exception
Description copied from interface: SessionFilter
Session received a packet.

Specified by:
packetReceived in interface SessionFilter
Overrides:
packetReceived in class SessionFilterAdapter
Parameters:
filterChain - session filter chain
packet - the received packet
Throws:
java.lang.Exception - any exception

packetSend

public void packetSend(SessionFilterChain filterChain,
                       Packet packet)
                throws java.lang.Exception
Description copied from interface: SessionFilter
Filter before send packet. This event will be dispatched in the reversed order.

Specified by:
packetSend in interface SessionFilter
Overrides:
packetSend in class SessionFilterAdapter
Parameters:
filterChain - session filter chain
packet - send packet
Throws:
java.lang.Exception - any exception