public interface Request<T>
Modifier and Type | Method and Description |
---|---|
boolean |
canBeCancelled()
A request object may be canceled if this method returns true.
|
void |
cancel()
Cancel the current request; if the request was completed before the
cancel call, the cancel call will be silently ignored.
|
Response<T> |
execute()
Generate a response for the current request state.
|
RequestDelegate<T> |
getDelegate()
Returns our request delegate.
|
DispatchTarget |
getDispatchTarget()
Returns our dispatch target.
|
void |
setDispatchTarget(DispatchTarget pTarget)
Sets our dispatch target.
|
void |
setDispatchTarget(Object pTargetObject,
String pMethodName)
Sets our dispatch target.
|
void setDispatchTarget(DispatchTarget pTarget)
pTarget
- the target to set (null is o.k.)void setDispatchTarget(Object pTargetObject, String pMethodName)
pTargetObject
- target to call, must not be nullpMethodName
- method to call, must not be null and match the
void <pMethodname>(Response pResponse) signatureDispatchTarget getDispatchTarget()
RequestDelegate<T> getDelegate()
Response<T> execute()
boolean canBeCancelled()
void cancel() throws IllegalStateException
IllegalStateException
- if we can't be canceled at allCopyright © 2017 Jürgen Zeller (privat). All rights reserved.