Examples of VmPipeSessionImpl


Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

            return DefaultConnectFuture.newFailedFuture(new IOException(
                    "Endpoint unavailable: " + address));
        }

        DefaultConnectFuture future = new DefaultConnectFuture();
        VmPipeSessionImpl localSession = new VmPipeSessionImpl(this,
                                                               config,getListeners(),
                                                               new AnonymousSocketAddress(),
                                                               handler,
                                                               entry);

        // initialize connector session
        try {
            IoFilterChain filterChain = localSession.getFilterChain();
            this.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            localSession.setAttribute(AbstractIoFilterChain.CONNECT_FUTURE, future);
            getListeners().fireSessionCreated(localSession);
            VmPipeIdleStatusChecker.getInstance().addSession(localSession);
        } catch (Throwable t) {
            future.setException(t);
            return future;
        }

        // initialize acceptor session
        VmPipeSessionImpl remoteSession = localSession.getRemoteSession();
        try {
            IoFilterChain filterChain = remoteSession.getFilterChain();
            entry.getAcceptor().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            entry.getListeners().fireSessionCreated(remoteSession);
            VmPipeIdleStatusChecker.getInstance().addSession(remoteSession);
        } catch (Throwable t) {
            ExceptionMonitor.getInstance().exceptionCaught(t);
            remoteSession.close();
        }


        // Start chains, and then allow and messages read/written to be processed. This is to ensure that
        // sessionOpened gets received before a messageReceived
        ((VmPipeFilterChain) localSession.getFilterChain()).start();
        ((VmPipeFilterChain) remoteSession.getFilterChain()).start();

        return future;
    }
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

            return DefaultConnectFuture.newFailedFuture(new IOException(
                    "Endpoint unavailable: " + address));
        }

        DefaultConnectFuture future = new DefaultConnectFuture();
        VmPipeSessionImpl localSession = new VmPipeSessionImpl(this,
                                                               config,getListeners(),
                                                               new AnonymousSocketAddress(),
                                                               handler,
                                                               entry);

        // initialize connector session
        try {
            IoFilterChain filterChain = localSession.getFilterChain();
            this.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            localSession.setAttribute(AbstractIoFilterChain.CONNECT_FUTURE, future);
            getListeners().fireSessionCreated(localSession);
            VmPipeIdleStatusChecker.getInstance().addSession(localSession);
        } catch (Throwable t) {
            future.setException(t);
            return future;
        }

        // initialize acceptor session
        VmPipeSessionImpl remoteSession = localSession.getRemoteSession();
        try {
            IoFilterChain filterChain = remoteSession.getFilterChain();
            entry.getAcceptor().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            entry.getListeners().fireSessionCreated(remoteSession);
            VmPipeIdleStatusChecker.getInstance().addSession(remoteSession);
        } catch (Throwable t) {
            ExceptionMonitor.getInstance().exceptionCaught(t);
            remoteSession.close();
        }


        // Start chains, and then allow and messages read/written to be processed. This is to ensure that
        // sessionOpened gets received before a messageReceived
        ((VmPipeFilterChain) localSession.getFilterChain()).start();
        ((VmPipeFilterChain) remoteSession.getFilterChain()).start();

        return future;
    }
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

            return DefaultConnectFuture.newFailedFuture(
                    new IOException( "Endpoint unavailable: " + address ) );
        }

        DefaultConnectFuture future = new DefaultConnectFuture();
        VmPipeSessionImpl localSession =
            new VmPipeSessionImpl(
                    this,
                    config,
                    getListeners(),
                    new Object(), // lock
                    new AnonymousSocketAddress(),
                    handler,
                    entry );
       
        // initialize connector session
        try
        {
            IoFilterChain filterChain = localSession.getFilterChain();
            this.getFilterChainBuilder().buildFilterChain( filterChain );
            config.getFilterChainBuilder().buildFilterChain( filterChain );
            config.getThreadModel().buildFilterChain( filterChain );

            // The following sentences don't throw any exceptions.
            localSession.setAttribute( AbstractIoFilterChain.CONNECT_FUTURE, future );
            getListeners().fireSessionCreated( localSession );
            VmPipeIdleStatusChecker.getInstance().addSession( localSession);
        }
        catch( Throwable t )
        {
            future.setException( t );
            return future;
        }
       
        // initialize acceptor session
        VmPipeSessionImpl remoteSession = localSession.getRemoteSession();
        try
        {
            IoFilterChain filterChain = remoteSession.getFilterChain();
            entry.getAcceptor().getFilterChainBuilder().buildFilterChain( filterChain );
            entry.getConfig().getFilterChainBuilder().buildFilterChain( filterChain );
            entry.getConfig().getThreadModel().buildFilterChain( filterChain );
           
            // The following sentences don't throw any exceptions.
            entry.getListeners().fireSessionCreated( remoteSession );
            VmPipeIdleStatusChecker.getInstance().addSession( remoteSession );
        }
        catch( Throwable t )
        {
            ExceptionMonitor.getInstance().exceptionCaught( t );
            remoteSession.close();
        }
       
        ( ( VmPipeFilterChain ) localSession.getFilterChain() ).start();
        ( ( VmPipeFilterChain ) remoteSession.getFilterChain() ).start();

        return future;
    }
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

            return DefaultConnectFuture.newFailedFuture(new IOException(
                    "Endpoint unavailable: " + address));
        }

        DefaultConnectFuture future = new DefaultConnectFuture();
        VmPipeSessionImpl localSession = new VmPipeSessionImpl(this, config,
                getListeners(), // lock
                new AnonymousSocketAddress(), handler, entry);

        // initialize connector session
        try {
            IoFilterChain filterChain = localSession.getFilterChain();
            this.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            localSession.setAttribute(AbstractIoFilterChain.CONNECT_FUTURE,
                    future);
            getListeners().fireSessionCreated(localSession);
            VmPipeIdleStatusChecker.getInstance().addSession(localSession);
        } catch (Throwable t) {
            future.setException(t);
            return future;
        }

        // initialize acceptor session
        VmPipeSessionImpl remoteSession = localSession.getRemoteSession();
        try {
            IoFilterChain filterChain = remoteSession.getFilterChain();
            entry.getAcceptor().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            entry.getListeners().fireSessionCreated(remoteSession);
            VmPipeIdleStatusChecker.getInstance().addSession(remoteSession);
        } catch (Throwable t) {
            ExceptionMonitor.getInstance().exceptionCaught(t);
            remoteSession.close();
        }

        // Start chains, and then allow and messages read/written to be processed. This is to ensure that
        // sessionOpened gets received before a messageReceived
        ((VmPipeFilterChain) localSession.getFilterChain()).start();
        ((VmPipeFilterChain) remoteSession.getFilterChain()).start();

        return future;
    }
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

        }

        DefaultConnectFuture future = new DefaultConnectFuture();
        try
        {
            VmPipeSessionImpl session =
                new VmPipeSessionImpl(
                        this,
                        config,
                        new Object(), // lock
                        new AnonymousSocketAddress(),
                        handler,
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

            return DefaultConnectFuture.newFailedFuture(new IOException(
                    "Endpoint unavailable: " + address));
        }

        DefaultConnectFuture future = new DefaultConnectFuture();
        VmPipeSessionImpl localSession = new VmPipeSessionImpl(this, config,
                getListeners(), new Object(), // lock
                new AnonymousSocketAddress(), handler, entry);

        // initialize connector session
        try {
            IoFilterChain filterChain = localSession.getFilterChain();
            this.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            localSession.setAttribute(AbstractIoFilterChain.CONNECT_FUTURE,
                    future);
            getListeners().fireSessionCreated(localSession);
            VmPipeIdleStatusChecker.getInstance().addSession(localSession);
        } catch (Throwable t) {
            future.setException(t);
            return future;
        }

        // initialize acceptor session
        VmPipeSessionImpl remoteSession = localSession.getRemoteSession();
        try {
            IoFilterChain filterChain = remoteSession.getFilterChain();
            entry.getAcceptor().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            entry.getListeners().fireSessionCreated(remoteSession);
            VmPipeIdleStatusChecker.getInstance().addSession(remoteSession);
        } catch (Throwable t) {
            ExceptionMonitor.getInstance().exceptionCaught(t);
            remoteSession.close();
        }

        ((VmPipeFilterChain) localSession.getFilterChain()).start();
        ((VmPipeFilterChain) remoteSession.getFilterChain()).start();

        return future;
    }
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

        }

        ConnectFuture future = new ConnectFuture();
        try
        {
            VmPipeSessionImpl session =
                new VmPipeSessionImpl(
                        this,
                        new Object(), // lock
                        AnonymousSocketAddress.INSTANCE,
                        handler,
                        config.getFilterChainBuilder(),
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

            return DefaultConnectFuture.newFailedFuture(new IOException(
                    "Endpoint unavailable: " + address));
        }

        DefaultConnectFuture future = new DefaultConnectFuture();
        VmPipeSessionImpl localSession = new VmPipeSessionImpl(this, config,
                getListeners(), // lock
                new AnonymousSocketAddress(), handler, entry);

        // initialize connector session
        try {
            IoFilterChain filterChain = localSession.getFilterChain();
            this.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getFilterChainBuilder().buildFilterChain(filterChain);
            config.getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            localSession.setAttribute(AbstractIoFilterChain.CONNECT_FUTURE,
                    future);
            getListeners().fireSessionCreated(localSession);
            VmPipeIdleStatusChecker.getInstance().addSession(localSession);
        } catch (Throwable t) {
            future.setException(t);
            return future;
        }

        // initialize acceptor session
        VmPipeSessionImpl remoteSession = localSession.getRemoteSession();
        try {
            IoFilterChain filterChain = remoteSession.getFilterChain();
            entry.getAcceptor().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getFilterChainBuilder().buildFilterChain(
                    filterChain);
            entry.getConfig().getThreadModel().buildFilterChain(filterChain);

            // The following sentences don't throw any exceptions.
            entry.getListeners().fireSessionCreated(remoteSession);
            VmPipeIdleStatusChecker.getInstance().addSession(remoteSession);
        } catch (Throwable t) {
            ExceptionMonitor.getInstance().exceptionCaught(t);
            remoteSession.close();
        }

        // Start chains, and then allow and messages read/written to be processed. This is to ensure that
        // sessionOpened gets received before a messageReceived
        ((VmPipeFilterChain) localSession.getFilterChain()).start();
        ((VmPipeFilterChain) remoteSession.getFilterChain()).start();

        return future;
    }
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

        }

        DefaultConnectFuture future = new DefaultConnectFuture();
        try
        {
            VmPipeSessionImpl session =
                new VmPipeSessionImpl(
                        this,
                        config,
                        getListeners(),
                        new Object(), // lock
                        new AnonymousSocketAddress(),
View Full Code Here

Examples of org.apache.mina.transport.vmpipe.support.VmPipeSessionImpl

            return DefaultConnectFuture.newFailedFuture(
                    new IOException( "Endpoint unavailable: " + address ) );
        }

        DefaultConnectFuture future = new DefaultConnectFuture();
        VmPipeSessionImpl localSession =
            new VmPipeSessionImpl(
                    this,
                    config,
                    getListeners(),
                    new Object(), // lock
                    new AnonymousSocketAddress(),
                    handler,
                    entry );

           // initialize acceptor session
        VmPipeSessionImpl remoteSession = localSession.getRemoteSession();
        try
        {
            IoFilterChain filterChain = remoteSession.getFilterChain();
            entry.getAcceptor().getFilterChainBuilder().buildFilterChain( filterChain );
            entry.getConfig().getFilterChainBuilder().buildFilterChain( filterChain );
            entry.getConfig().getThreadModel().buildFilterChain( filterChain );

            // The following sentences don't throw any exceptions.
            entry.getListeners().fireSessionCreated( remoteSession );
            VmPipeIdleStatusChecker.getInstance().addSession( remoteSession );
        }
        catch( Throwable t )
        {
            ExceptionMonitor.getInstance().exceptionCaught( t );
            remoteSession.close();
        }


        // initialize connector session
        try
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.