Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-120

Callbacks for IoFutures

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.0
    • None
    • None

    Description

      IoFuture provides only blocking-way ('join' method) for user to find out the result of an I/O request. It would be great if users can specify a callback:

      ConnectFuture future = connector.connect(...);
      future.setCallback( new ConnectFuture.Callback() {
      public void connectionEstablished( IoSession session ) {
      }
      public void connectionFailed( Throwable cause ) {
      }
      } );

      There can be a race condition if the connection process ends before a user calls setCallback() method, but we can resolve this carefully so users don't notice any issue.

      Attachments

        1. IoFuture.java
          4 kB
          dave irving
        2. ConnectFuture.java
          4 kB
          dave irving

        Activity

          People

            trustin Trustin Lee
            trustin Trustin Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: