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)
           
BroadcasterFuture(Future<?> innerFuture, E msg)
           
 
Method Summary
 boolean cancel(boolean b)
          
 void 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)

BroadcasterFuture

public BroadcasterFuture(Future<?> innerFuture,
                         E msg)
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 void 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 © 2011. All Rights Reserved.