Class TopicSubscriber
- java.lang.Object
-
- br.pucrio.tecgraf.soma.logsmonitor.flow.TopicSubscriber
-
- All Implemented Interfaces:
Flow.Subscriber<ResourceMonitorEvent>
@Component @Scope("prototype") public class TopicSubscriber extends Object implements Flow.Subscriber<ResourceMonitorEvent>
-
-
Constructor Summary
Constructors Constructor Description TopicSubscriber(String sessionId, String subscriptionId, Topic topic, TopicEventMapper mapper, Long initialSeqnum)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetSessionId()StringgetSubscriptionId()inthashCode()voidonComplete()voidonError(Throwable throwable)voidonNext(ResourceMonitorEvent event)Callback para notificar mudança no recurso monitorado.voidonSubscribe(Flow.Subscription subscription)
-
-
-
Constructor Detail
-
TopicSubscriber
public TopicSubscriber(String sessionId, String subscriptionId, Topic topic, TopicEventMapper mapper, Long initialSeqnum)
-
-
Method Detail
-
getSessionId
public String getSessionId()
-
getSubscriptionId
public String getSubscriptionId()
-
onSubscribe
public void onSubscribe(Flow.Subscription subscription)
- Specified by:
onSubscribein interfaceFlow.Subscriber<ResourceMonitorEvent>
-
onNext
public void onNext(ResourceMonitorEvent event)
Callback para notificar mudança no recurso monitorado. O evento contém as informações sobre a alteração.- Specified by:
onNextin interfaceFlow.Subscriber<ResourceMonitorEvent>- Parameters:
event- o evento notificado pelo monitor de recurso
-
onError
public void onError(Throwable throwable)
- Specified by:
onErrorin interfaceFlow.Subscriber<ResourceMonitorEvent>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceFlow.Subscriber<ResourceMonitorEvent>
-
-