|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.utils.handlers.events.Monitor
public abstract class Monitor
Abstract specialisation of GCUBEConsumer for consumers of Events.
Monitor implements GCUBEConsumer.onEvent(GCUBEEvent...) to dispatch LifetimeEvents
to event-specific callbacks and any other Event to a catch-all callback (cf. onAnyEvent(Event).
Subclasses may also extend onEvent(GCUBEEvent...) to extend the callback pattern to other types of Event.
| Constructor Summary | |
|---|---|
Monitor()
|
|
| Method Summary | ||
|---|---|---|
protected void |
onAnyEvent(Event<?,?> e)
Callback for any handle event. |
|
protected void |
onCompletion(Event.Done e)
Callback for a Event.Done event. |
|
|
onEvent(GCUBEEvent<T1,P1>... events)
Notifies the consumer of one of more events about topics for which the consumer has previously subscribed with a GCUBEProducer |
|
protected void |
onFailure(Event.Failed e)
Callback for a Event.Failed event. |
|
protected void |
onRunning(Event.Running e)
Callback for a Event.Running event. |
|
protected void |
onSuspension(Event.Suspended e)
Callback for a Event.Suspended event. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Monitor()
| Method Detail |
|---|
public <T1 extends Topic,P1> void onEvent(GCUBEEvent<T1,P1>... events)
GCUBEProducer
onEvent in interface GCUBEConsumer<Topic,Object>T1 - the topic type.P1 - the payload type.events - the events.protected void onRunning(Event.Running e)
Event.Running event.
e - the event.protected void onCompletion(Event.Done e)
Event.Done event.
e - the event.protected void onFailure(Event.Failed e)
Event.Failed event.
e - the event.protected void onSuspension(Event.Suspended e)
Event.Suspended event.
e - the event.protected void onAnyEvent(Event<?,?> e)
e - the event.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||