Package net.sf.cindy

Examples of net.sf.cindy.Session


    }

    public void sessionStarted(SessionFilterChain filterChain) throws Exception {
        // init engine
        Session session = filterChain.getSession();
        SocketAddress address = session.getRemoteAddress();
        if (clientMode && (address instanceof InetSocketAddress)) {
            InetSocketAddress netAddress = (InetSocketAddress) address;
            engine = sslc.createSSLEngine(netAddress.getAddress()
                    .getHostAddress(), netAddress.getPort());
        } else {
            engine = sslc.createSSLEngine();
        }
        engine.setUseClientMode(clientMode);
        engine.setNeedClientAuth(needClientAuth);
        initSSLEngine(engine);

        appBufferSize = engine.getSession().getApplicationBufferSize();
        netBufferSize = engine.getSession().getPacketBufferSize();

        // handshake
        engine.beginHandshake();

        super.sessionStarted(filterChain);
        if (clientMode)
            session.flush(new HandshakePacket());
    }
View Full Code Here


        Class c = (Class) SESSION_MAP.get(type);
        if (c == null)
            throw new IllegalArgumentException("unsupported session type: "
                    + type);
        try {
            Session session = (Session) c.newInstance();
            if (MBEAN_SERVER != null)
                MBEAN_SERVER.registerMBean(new JmxSession(session),
                        getObjectName("Session-"
                                + SESSION_COUNTER.incrementAndGet()));
            return session;
View Full Code Here

            thread = THREAD_FACTORY.newThread(new Runnable() {

                public void run() {
                    while (true) {
                        try {
                            Session session = accept();
                            if (session == null)
                                break;
                            sessionAccepted(session);
                        } catch (IOException e) {
                            exceptionCaught(e);
View Full Code Here

* @version $id$
*/
public class SessionHandlerFilter extends NullFilter {

    public void exceptionCaught(SessionFilterChain filterChain, Throwable cause) {
        Session session = filterChain.getSession();
        SessionHandler handler = session.getSessionHandler();
        if (handler != null)
            handler.exceptionCaught(session, cause);
    }
View Full Code Here

            handler.exceptionCaught(session, cause);
    }

    public void objectReceived(SessionFilterChain filterChain, Object obj)
            throws Exception {
        Session session = filterChain.getSession();
        SessionHandler handler = session.getSessionHandler();
        if (handler != null)
            handler.objectReceived(session, obj);
    }
View Full Code Here

TOP

Related Classes of net.sf.cindy.Session

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.