microsoft.exchange.webservices.data.misc
Class AsyncRequestResult

java.lang.Object
  extended by microsoft.exchange.webservices.data.misc.AsyncRequestResult
All Implemented Interfaces:
Future<Object>, IAsyncResult

public class AsyncRequestResult
extends Object
implements IAsyncResult


Constructor Summary
AsyncRequestResult(ServiceRequestBase serviceRequest, HttpWebRequest webRequest, Future<?> task, Object asyncState)
           
 
Method Summary
 boolean cancel(boolean arg0)
           
static
<T extends SimpleServiceRequestBase>
T
extractServiceRequest(ExchangeService exchangeService, Future<?> asyncResult)
           
 Object get()
           
 Object get(long timeout, TimeUnit unit)
           
 Object getAsyncState()
           
 WaitHandle getAsyncWaitHanle()
           
 boolean getCompleteSynchronously()
           
 HttpWebRequest getHttpWebRequest()
           
 boolean getIsCompleted()
           
 FutureTask<?> getTask()
           
 boolean isCancelled()
           
 boolean isDone()
           
 void setHttpWebRequest(HttpWebRequest webRequest)
           
 void setServiceRequestBase(ServiceRequestBase serviceRequest)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncRequestResult

public AsyncRequestResult(ServiceRequestBase serviceRequest,
                          HttpWebRequest webRequest,
                          Future<?> task,
                          Object asyncState)
                   throws Exception
Throws:
Exception
Method Detail

setServiceRequestBase

public void setServiceRequestBase(ServiceRequestBase serviceRequest)

setHttpWebRequest

public void setHttpWebRequest(HttpWebRequest webRequest)

getHttpWebRequest

public HttpWebRequest getHttpWebRequest()

getTask

public FutureTask<?> getTask()

extractServiceRequest

public static <T extends SimpleServiceRequestBase> T extractServiceRequest(ExchangeService exchangeService,
                                                                           Future<?> asyncResult)
                                                                throws Exception
Throws:
Exception

cancel

public boolean cancel(boolean arg0)
Specified by:
cancel in interface Future<Object>

get

public Object get(long timeout,
                  TimeUnit unit)
           throws InterruptedException,
                  ExecutionException,
                  TimeoutException
Specified by:
get in interface Future<Object>
Throws:
InterruptedException
ExecutionException
TimeoutException

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface Future<Object>

isDone

public boolean isDone()
Specified by:
isDone in interface Future<Object>

getAsyncState

public Object getAsyncState()
Specified by:
getAsyncState in interface IAsyncResult

getAsyncWaitHanle

public WaitHandle getAsyncWaitHanle()
Specified by:
getAsyncWaitHanle in interface IAsyncResult

getCompleteSynchronously

public boolean getCompleteSynchronously()
Specified by:
getCompleteSynchronously in interface IAsyncResult

getIsCompleted

public boolean getIsCompleted()
Specified by:
getIsCompleted in interface IAsyncResult

get

public Object get()
           throws InterruptedException,
                  ExecutionException
Specified by:
get in interface Future<Object>
Throws:
InterruptedException
ExecutionException


Copyright © 2012–2015 Microsoft. All rights reserved.