public interface EventConsumer
Modifier and Type | Method and Description |
---|---|
void |
subscribe(EndpointSubscription subscription)
Subscribes with a specific
EndpointSubscription
Example code: |
void |
subscribe(EventTypeSubscription subscription)
Subscribes with a specific
EventTypeSubscription
Example code: |
void |
subscribe(org.apache.camel.Processor processor,
com.softwareag.eda.store.api.EDAEventTypeID eventTypeID)
Subscribes a processor to specific Event Type
|
void |
subscribe(org.apache.camel.Processor processor,
java.lang.String... endpointURIs)
Subscribes a processor to specific Event Type
|
void |
unsubscribe(EndpointSubscription subscription)
Unsubscribes the specified
EndpointSubscription object |
void |
unsubscribe(EventTypeSubscription subscription)
Unsubscribes the specified
EventTypeSubscription object |
void |
unsubscribe(org.apache.camel.Processor processor,
com.softwareag.eda.store.api.EDAEventTypeID eventTypeID)
Removes a processor subscription for specific Event Type
|
void |
unsubscribe(org.apache.camel.Processor processor,
java.lang.String... endpointURIs)
Removes a processor subscription for specific Event Type
|
void subscribe(org.apache.camel.Processor processor, com.softwareag.eda.store.api.EDAEventTypeID eventTypeID) throws NervException
processor
- - specific callback processor to be invoked on eventeventTypeID
- - the Event Type ID to which we subscribeNervException
- - An exception is thrown if no default endpoint is found for this Event Type or there is a
problem with the Event Bus connectionvoid subscribe(org.apache.camel.Processor processor, java.lang.String... endpointURIs) throws NervException
processor
- - specific callback processor to be invoked on eventendpointURIs
- - One or more endpoint URIs to which we subscribe, it is important that the component used in
the URI have to be already defined in NERV or is standard component like "http", "smtp" etc.NervException
- - An exception is thrown if there is a problem with the Event Bus connection or the
component in some of the URIs is not resolvedvoid unsubscribe(org.apache.camel.Processor processor, com.softwareag.eda.store.api.EDAEventTypeID eventTypeID) throws NervException
processor
- - specific callback processoreventTypeID
- - the Event Type ID to which we subscribedNervException
- - An exception is thrown if no default endpoint is found for this Event Type or there is a
problem with the Event Bus connectionvoid unsubscribe(org.apache.camel.Processor processor, java.lang.String... endpointURIs) throws NervException
processor
- - specific callback processorendpointURIs
- - the endpoint URIs to which we subscribedNervException
- - An exception is thrown if there is a problem with the Event Bus connectionvoid subscribe(EventTypeSubscription subscription) throws NervException
EventTypeSubscription
Example code:
EventSubscription subscription = new DefaultEventSubscription(myEventTypeId, myProcessor); eventConsumer.subscribe(subscription);
subscription
- An EventTypeSubscription
objectNervException
void subscribe(EndpointSubscription subscription) throws NervException
EndpointSubscription
Example code:
EndpointSubscription subscription = new DefaultEndpointSubscription(myProcessor, myEndpoint); eventConsumer.subscribe(subscription);
subscription
- An EndpointSubscription
objectNervException
void unsubscribe(EventTypeSubscription subscription) throws NervException
EventTypeSubscription
objectsubscription
- An EventTypeSubscription
objectNervException
void unsubscribe(EndpointSubscription subscription) throws NervException
EndpointSubscription
objectsubscription
- An EndpointSubscription
objectNervException