|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.octo.android.robospice.request.notifier.DefaultRequestListenerNotifier
public class DefaultRequestListenerNotifier
Default implementation of RequestListenerNotifier. It will notify listeners on the ui thread.
Constructor Summary | |
---|---|
DefaultRequestListenerNotifier()
|
Method Summary | ||
---|---|---|
|
clearNotificationsForRequest(CachedSpiceRequest<T> request,
Set<RequestListener<?>> listeners)
Clears all pending notifications for a given request. |
|
|
notifyListenersOfRequestAdded(CachedSpiceRequest<T> request,
Set<RequestListener<?>> listeners)
Notify listeners that a pending request has been found. |
|
|
notifyListenersOfRequestAggregated(CachedSpiceRequest<T> request,
Set<RequestListener<?>> listeners)
Notify listeners that a pending request has been found. |
|
|
notifyListenersOfRequestCancellation(CachedSpiceRequest<T> request,
Set<RequestListener<?>> listeners)
Notify listeners of a request's cancelation. |
|
|
notifyListenersOfRequestFailure(CachedSpiceRequest<T> request,
SpiceException e,
Set<RequestListener<?>> listeners)
Notify listeners of a request's failure. |
|
|
notifyListenersOfRequestNotFound(CachedSpiceRequest<T> request,
Set<RequestListener<?>> listRequestListener)
Notify listeners that no pending request is found (used by SpiceManager.addListenerIfPending(Class, Object, com.octo.android.robospice.request.listener.PendingRequestListener)
. |
|
|
notifyListenersOfRequestProgress(CachedSpiceRequest<T> request,
Set<RequestListener<?>> listeners,
RequestProgress progress)
Notify listeners of a request's progress. |
|
|
notifyListenersOfRequestSuccess(CachedSpiceRequest<T> request,
T result,
Set<RequestListener<?>> listeners)
Notify listeners of a request's success. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultRequestListenerNotifier()
Method Detail |
---|
public <T> void notifyListenersOfRequestNotFound(CachedSpiceRequest<T> request, Set<RequestListener<?>> listRequestListener)
RequestListenerNotifier
SpiceManager.addListenerIfPending(Class, Object, com.octo.android.robospice.request.listener.PendingRequestListener)
.
notifyListenersOfRequestNotFound
in interface RequestListenerNotifier
request
- a given request.listRequestListener
- a set of RequestListener
. Only instances of
PendingRequestListener
will be notified of the event.public <T> void notifyListenersOfRequestAdded(CachedSpiceRequest<T> request, Set<RequestListener<?>> listeners)
RequestListenerNotifier
notifyListenersOfRequestAdded
in interface RequestListenerNotifier
request
- a given request.listeners
- a set of RequestListener
.public <T> void notifyListenersOfRequestAggregated(CachedSpiceRequest<T> request, Set<RequestListener<?>> listeners)
RequestListenerNotifier
notifyListenersOfRequestAggregated
in interface RequestListenerNotifier
request
- a given request.listeners
- a set of RequestListener
.public <T> void notifyListenersOfRequestProgress(CachedSpiceRequest<T> request, Set<RequestListener<?>> listeners, RequestProgress progress)
RequestListenerNotifier
notifyListenersOfRequestProgress
in interface RequestListenerNotifier
request
- a given request.listeners
- a set of RequestListener
. Only
RequestProgressListener
will be notified of the event.public <T> void notifyListenersOfRequestSuccess(CachedSpiceRequest<T> request, T result, Set<RequestListener<?>> listeners)
RequestListenerNotifier
notifyListenersOfRequestSuccess
in interface RequestListenerNotifier
request
- a given request.listeners
- a set of RequestListener
.public <T> void notifyListenersOfRequestFailure(CachedSpiceRequest<T> request, SpiceException e, Set<RequestListener<?>> listeners)
RequestListenerNotifier
notifyListenersOfRequestFailure
in interface RequestListenerNotifier
request
- a given request.listeners
- a set of RequestListener
.public <T> void notifyListenersOfRequestCancellation(CachedSpiceRequest<T> request, Set<RequestListener<?>> listeners)
RequestListenerNotifier
notifyListenersOfRequestCancellation
in interface RequestListenerNotifier
request
- a given request.listeners
- a set of RequestListener
.public <T> void clearNotificationsForRequest(CachedSpiceRequest<T> request, Set<RequestListener<?>> listeners)
RequestListenerNotifier
clearNotificationsForRequest
in interface RequestListenerNotifier
request
- the request not to notify listeners of.listeners
- the listeners that won't be notified.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |