Package net.sf.cindy

Examples of net.sf.cindy.SessionFilterAdapter


    }

    public void testFilter() {
        assertEquals(0, session.getSessionFilters().length);

        SessionFilter first = new SessionFilterAdapter();
        session.addSessionFilter(first);
        assertEquals(1, session.getSessionFilters().length);
        assertEquals(first, session.getSessionFilters()[0]);

        SessionFilter second = new SessionFilterAdapter();
        session.addSessionFilter(second);
        assertEquals(2, session.getSessionFilters().length);
        assertEquals(first, session.getSessionFilters()[0]);
        assertEquals(second, session.getSessionFilters()[1]);

        SessionFilter third = new SessionFilterAdapter();
        session.addSessionFilter(1, third);
        assertEquals(3, session.getSessionFilters().length);
        assertEquals(first, session.getSessionFilters()[0]);
        assertEquals(third, session.getSessionFilters()[1]);
        assertEquals(second, session.getSessionFilters()[2]);
View Full Code Here


    protected Future send(final Object obj, Packet packet, final int priority) {
        if (packet == null || packet.getContent() == null || !isStarted())
            return new DefaultFuture(this, false);
        final DefaultFuture future = new DefaultFuture(this);
        getSessionFilterChain(new SessionFilterAdapter() {

            public void packetSend(SessionFilterChain filterChain, Packet packet)
                    throws Exception {
                if (packet == null || packet.getContent() == null) {
                    future.setSucceeded(false);
View Full Code Here

TOP

Related Classes of net.sf.cindy.SessionFilterAdapter

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.