com.veriplace.client.util
Class AbstractRequestManager.AbstractRequest<ResultType>

java.lang.Object
  extended by com.veriplace.client.util.AbstractRequestManager.AbstractRequest<ResultType>
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
GetLocationRequestManager.LocationRequest
Enclosing class:
AbstractRequestManager<ResultType>

public abstract static class AbstractRequestManager.AbstractRequest<ResultType>
extends java.lang.Object
implements java.lang.Runnable

Generic inner class for background requests.


Field Summary
protected  Token accessToken
           
protected  Client client
           
protected  long id
           
protected  User user
           
 
Constructor Summary
protected AbstractRequestManager.AbstractRequest(Client client, User user, Token accessToken)
           
 
Method Summary
protected abstract  ResultType call()
           
 long getId()
           
 void run()
           
protected  void setId(long id)
           
protected  void setRequestStore(RequestStore<ResultWrapper<ResultType>> requestStore)
           
protected  void storeException(VeriplaceException exception)
           
protected  void storeResult(ResultType result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

protected final Client client

user

protected final User user

accessToken

protected final Token accessToken

id

protected long id
Constructor Detail

AbstractRequestManager.AbstractRequest

protected AbstractRequestManager.AbstractRequest(Client client,
                                                 User user,
                                                 Token accessToken)
Method Detail

getId

public long getId()

run

public void run()
Specified by:
run in interface java.lang.Runnable

call

protected abstract ResultType call()
                            throws VeriplaceException
Throws:
VeriplaceException

setId

protected void setId(long id)

setRequestStore

protected void setRequestStore(RequestStore<ResultWrapper<ResultType>> requestStore)

storeResult

protected void storeResult(ResultType result)

storeException

protected void storeException(VeriplaceException exception)