Package org.apache.mina.core.future

Examples of org.apache.mina.core.future.CloseFuture.addListener()


    System.out.println("session.close called");
    //Thread.sleep(5);

    // wait for session close and then dispose the connector
    closeFuture.addListener(new IoFutureListener<IoFuture>() {

      public void operationComplete(IoFuture future) {
        System.out.println("managed session count=" + connector.getManagedSessionCount());
        System.out.println("Disposing connector ...");
        connector.dispose(true);
View Full Code Here


        // Get the close future for this session
        CloseFuture closeFuture = connectionFuture.getSession().getCloseFuture();

        // Add a listener to close the session in the session.
        closeFuture.addListener( new IoFutureListener<IoFuture>()
        {
            public void operationComplete( IoFuture future )
            {
                // Process all the waiting operations and cancel them
                LOG.debug( "received a NoD, closing everything" );
View Full Code Here

        // Get the close future for this session
        CloseFuture closeFuture = connectionFuture.getSession().getCloseFuture();

        // Add a listener to close the session in the session.
        closeFuture.addListener( new IoFutureListener<IoFuture>()
        {
            public void operationComplete( IoFuture future )
            {
                // Process all the waiting operations and cancel them
                LOG.debug( "received a NoD, closing everything" );
View Full Code Here

        // Get the close future for this session
        CloseFuture closeFuture = connectionFuture.getSession().getCloseFuture();

        // Add a listener to close the session in the session.
        closeFuture.addListener( new IoFutureListener<IoFuture>()
        {
            public void operationComplete( IoFuture future )
            {
                // Process all the waiting operations and cancel them
                LOG.debug( "received a NoD, closing everything" );
View Full Code Here

        // Get the close future for this session
        CloseFuture closeFuture = connectionFuture.getSession().getCloseFuture();

        // Add a listener to close the session in the session.
        closeFuture.addListener( new IoFutureListener<IoFuture>()
        {
            public void operationComplete( IoFuture future )
            {
                // Process all the waiting operations and cancel them
                LOG.debug( "received a NoD, closing everything" );
View Full Code Here

        // Get the close future for this session
        CloseFuture closeFuture = connectionFuture.getSession().getCloseFuture();

        // Add a listener to close the session in the session.
        closeFuture.addListener( ( IoFutureListener<?> ) new IoFutureListener<IoFuture>()
        {
            public void operationComplete( IoFuture future )
            {
                // Process all the waiting operations and cancel them
                LOG.debug( "received a NoD, closing everything" );
View Full Code Here

        // Get the close future for this session
        CloseFuture closeFuture = connectionFuture.getSession().getCloseFuture();

        // Add a listener to close the session in the session.
        closeFuture.addListener( new IoFutureListener<IoFuture>()
        {
            public void operationComplete( IoFuture future )
            {
                // Process all the waiting operations and cancel them
                LOG.debug( "received a NoD, closing everything" );
View Full Code Here

    public void addSession(AbstractIoSession session) {
        sessions.add(session);
        CloseFuture closeFuture = session.getCloseFuture();
       
        // isn't service reponsability to remove the session nicely ?
        closeFuture.addListener(sessionCloseListener);
    }

    /**
     * remove a session from the list of session being checked.
     * @param session
View Full Code Here

    System.out.println("session.close called");
    //Thread.sleep(5);

    // wait for session close and then dispose the connector
    closeFuture.addListener(new IoFutureListener<IoFuture>() {

      public void operationComplete(IoFuture future) {
        System.out.println("managed session count=" + connector.getManagedSessionCount());
        System.out.println("Disposing connector ...");
        connector.dispose(true);
View Full Code Here

        // Get the close future for this session
        CloseFuture closeFuture = connectionFuture.getSession().getCloseFuture();

        // Add a listener to close the session in the session.
        closeFuture.addListener( new IoFutureListener<IoFuture>()
        {
            public void operationComplete( IoFuture future )
            {
                // Process all the waiting operations and cancel them
                LOG.debug( "received a NoD, closing everything" );
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.