|
||||||||||
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.SpiceServiceListenerNotifier
public class SpiceServiceListenerNotifier
The Observer Manager manages observers and passes on request events to the interested observers.
Constructor Summary | |
---|---|
SpiceServiceListenerNotifier()
|
Method Summary | ||
---|---|---|
void |
addSpiceServiceListener(SpiceServiceListener spiceServiceListener)
|
|
protected void |
createMessageQueue()
|
|
void |
notifyObserversOfRequestAdded(CachedSpiceRequest<?> request,
Set<RequestListener<?>> requestListeners)
Inform the observers of a request. |
|
void |
notifyObserversOfRequestAggregated(CachedSpiceRequest<?> request,
Set<RequestListener<?>> requestListeners)
Inform the observers of a request. |
|
void |
notifyObserversOfRequestCancellation(CachedSpiceRequest<?> request)
Notify interested observers that the request was cancelled. |
|
void |
notifyObserversOfRequestFailure(CachedSpiceRequest<?> request)
Notify interested observers that the request failed. |
|
void |
notifyObserversOfRequestNotFound(CachedSpiceRequest<?> request)
Inform the observers of a request. |
|
void |
notifyObserversOfRequestProcessed(CachedSpiceRequest<?> request,
Set<RequestListener<?>> requestListeners)
Notify interested observers of request completion. |
|
void |
notifyObserversOfRequestProgress(CachedSpiceRequest<?> request,
RequestProgress requestProgress)
Notify interested observers of request progress. |
|
|
notifyObserversOfRequestSuccess(CachedSpiceRequest<T> request)
Notify interested observers that the request succeeded. |
|
protected void |
onStopped()
|
|
protected void |
post(Runnable runnable)
Add the request update to the observer message queue. |
|
void |
removeSpiceServiceListener(SpiceServiceListener spiceServiceListener)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpiceServiceListenerNotifier()
Method Detail |
---|
public void addSpiceServiceListener(SpiceServiceListener spiceServiceListener)
public void removeSpiceServiceListener(SpiceServiceListener spiceServiceListener)
protected void createMessageQueue()
public void notifyObserversOfRequestNotFound(CachedSpiceRequest<?> request)
request
- the request that couldn't be aggregated to another request.public void notifyObserversOfRequestAdded(CachedSpiceRequest<?> request, Set<RequestListener<?>> requestListeners)
request
- the request that has been added to processing queue.public void notifyObserversOfRequestAggregated(CachedSpiceRequest<?> request, Set<RequestListener<?>> requestListeners)
request
- the request that has been aggregated.public void notifyObserversOfRequestFailure(CachedSpiceRequest<?> request)
request
- the request that failed.public <T> void notifyObserversOfRequestSuccess(CachedSpiceRequest<T> request)
request
- the request that succeeded.public void notifyObserversOfRequestCancellation(CachedSpiceRequest<?> request)
request
- the request that was cancelled.public void notifyObserversOfRequestProgress(CachedSpiceRequest<?> request, RequestProgress requestProgress)
request
- the request in progress.requestProgress
- the progress of the request.public void notifyObserversOfRequestProcessed(CachedSpiceRequest<?> request, Set<RequestListener<?>> requestListeners)
request
- the request that has completed.requestListeners
- the listeners to notify.protected void post(Runnable runnable)
runnable
- a runnable to be posted immediatly on the queue.protected void onStopped()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |