org.atmosphere.cpr
Class BroadcasterFuture<E>

java.lang.Object
  extended by org.atmosphere.cpr.BroadcasterFuture<E>
All Implemented Interfaces:
Future

public class BroadcasterFuture<E>
extends Object
implements Future

Simple Future that can be used when awaiting for a Broadcaster to finish it's broadcast operations to AtmosphereHandler

Author:
Jeanfrancois Arcand

Constructor Summary
BroadcasterFuture(E msg, Broadcaster b)
           
BroadcasterFuture(E msg, int latchCount, Broadcaster b)
           
BroadcasterFuture(Future<?> innerFuture, E msg, Broadcaster b)
           
BroadcasterFuture(Future<?> innerFuture, E msg, int latchCount, Broadcaster b)
           
 
Method Summary
 boolean cancel(boolean b)
          
 BroadcasterFuture<E> done()
          Invoked when a Broadcaster completed it broadcast operation.
 E get()
          
 E get(long l, TimeUnit tu)
          
 boolean isCancelled()
          
 boolean isDone()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BroadcasterFuture

public BroadcasterFuture(E msg,
                         Broadcaster b)

BroadcasterFuture

public BroadcasterFuture(Future<?> innerFuture,
                         E msg,
                         Broadcaster b)

BroadcasterFuture

public BroadcasterFuture(E msg,
                         int latchCount,
                         Broadcaster b)

BroadcasterFuture

public BroadcasterFuture(Future<?> innerFuture,
                         E msg,
                         int latchCount,
                         Broadcaster b)
Method Detail

cancel

public boolean cancel(boolean b)

Specified by:
cancel in interface Future

isCancelled

public boolean isCancelled()

Specified by:
isCancelled in interface Future

isDone

public boolean isDone()

Specified by:
isDone in interface Future

done

public BroadcasterFuture<E> done()
Invoked when a Broadcaster completed it broadcast operation.


get

public E get()
      throws InterruptedException,
             ExecutionException

Specified by:
get in interface Future
Throws:
InterruptedException
ExecutionException

get

public E get(long l,
             TimeUnit tu)
      throws InterruptedException,
             ExecutionException,
             TimeoutException

Specified by:
get in interface Future
Throws:
InterruptedException
ExecutionException
TimeoutException


Copyright © 2012. All Rights Reserved.