Package org.apache.mina.core.future

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


      IoFutureListener<CloseFuture> listener = new IoFutureListener<CloseFuture>() {
        @SuppressWarnings({ "unchecked", "rawtypes" })
        public void operationComplete(CloseFuture future) {
          // now connection should be closed
          log.debug("Close operation completed {}: {}", sessionId, future.isClosed());
          future.removeListener(this);
          for (Object key : session.getAttributeKeys()) {
            Object obj = session.getAttribute(key);
            log.debug("Attribute: {}", obj.getClass().getName());
            if (obj instanceof IoProcessor) {
              log.debug("Flushing session in processor");
View Full Code Here


              handler.connectionClosed(conn);
            }
          } else {
            log.debug("Connection is not yet closed");
          }
          future.removeListener(this);
        }
      };
      future.addListener(listener);
    }
    log.debug("Connection state: {}", getState());
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.