public interface FabricGroupLink
Title: Service Event Fabric Core
Description: Defines a link of the Fabric Component to the Fabric Group.
Copyright: Copyright (c) 2013
Company: StreamScape Technologies
Modifier and Type | Method and Description |
---|---|
EventAsyncConsumer |
createEventAsyncConsumer(java.lang.String consumerName,
FabricEventListener listener,
java.lang.String eventFilter,
java.lang.String eventSelector,
EventScope eventScope,
boolean noLocal)
Creates a new event asynchronous consumer and adds this consumer the link's dispatcher.
|
EventReceiver |
createEventReceiver(java.lang.String receiverName,
java.lang.String eventFilter,
java.lang.String eventSelector,
EventScope eventScope,
boolean noLocal)
Creates a new event receiver and adds this receiver to the the link's dispatcher.
|
void |
dropEventAsyncConsumer(java.lang.String consumerName)
Drops an event asynchronous with the specified name from the link's dispatcher.
|
void |
dropEventReceiver(java.lang.String receiverName)
Drops a receiver with the specified name.
|
EventAsyncConsumer |
getEventAsyncConsumer(java.lang.String consumerName)
Finds and returns an event asynchronous consumer with the specified name.
|
EventReceiver |
getEventReceiver(java.lang.String receiverName)
Finds and returns an event receiver with the specified name.
|
FabricGroup |
getGroup()
Returns the group associated with the link.
|
void |
leaveGroup()
Leaves the group.
|
java.util.List |
listEventAsyncConsumers()
Returns a list of names of all event asynchronous consumers of the connection.
|
java.util.List |
listEventReceivers()
Returns a list of names of all event receivers.
|
void |
raiseEvent(ImmutableEventDatagram event,
EventScope eventScope,
long timeToLive)
Raises the specified event.
|
FabricGroup getGroup()
void raiseEvent(ImmutableEventDatagram event, EventScope eventScope, long timeToLive) throws FabricConnectionException, FabricEventSourceException, FabricUnboundEventException, FabricEventException
event
- the event to be raised.eventScope
- the scope of the raised event.timeToLive
- the time interval (in milliseconds) within that the event persists (in a queue, cache or internal buffer)
before it will be discarded. Non-positive value implies ignoring of this parameter.
FabricConnectionException
- if the associated connection is not opened.FabricEventSourceException
- if some error occurs in the Exchange.FabricUnboundEventException
- if the specified event is not bound to the associated connection.FabricEventException
- if some error occurs during processing of the event in the listener.
This exception won't be raised for asynchronous listeners (EventAsyncConsumer
).EventAsyncConsumer createEventAsyncConsumer(java.lang.String consumerName, FabricEventListener listener, java.lang.String eventFilter, java.lang.String eventSelector, EventScope eventScope, boolean noLocal) throws FabricConnectionException, FabricEventDispatcherException
QUEUE DEPTH
, DELIVERY WAIT
and FLOW CONTROL
strategies may be configured prior to starting the consumer.consumerName
- the name of the consumer.listener
- the listener associated with the consumer.eventFilter
- the event filter of the consumer.eventSelector
- the event selector of the consumer.
Selector allows to specify almost any conditions on event properties which should
be satisfied for an event to be consumed.
See EventDispatcher
for details.eventScope
- the event scope of the consumer.noLocal
- true
if the consumer will not process events raised by this link.FabricConnectionException
- if the associated connection is not opened.FabricEventDispatcherException
- if some error occurs in the Exchange.void dropEventAsyncConsumer(java.lang.String consumerName) throws FabricConnectionException, FabricEventDispatcherException
EventAsyncConsumer.DEFAULT_CLOSE_TIMEOUT
seconds until all remaining events
in the underlying event queue will be processed and stops the delivery thread after that.consumerName
- the name of consumer to be dropped.FabricConnectionException
- if the associated connection is not opened.FabricEventDispatcherException
- if the specified consumer name is invalid.EventAsyncConsumer getEventAsyncConsumer(java.lang.String consumerName) throws FabricConnectionException
consumerName
- the name of a consumer which is to be found.null
if consumer is not found.FabricConnectionException
- if the associated connection is not opened.java.util.List listEventAsyncConsumers() throws FabricConnectionException
FabricConnectionException
- if the associated connection is not opened.EventReceiver createEventReceiver(java.lang.String receiverName, java.lang.String eventFilter, java.lang.String eventSelector, EventScope eventScope, boolean noLocal) throws FabricConnectionException, FabricEventDispatcherException
receiverName
- the name of the receiver.eventFilter
- the event filter of the receiver.eventSelector
- the event selector of the receiver.
Selector allows to specify almost any conditions on event properties which should
be satisfied for an event to be received.
See EventDispatcher
for details.eventScope
- the event scope of the receiver.noLocal
- true
if the receiver will not get events raised by this link.FabricConnectionException
- if the associated connection is not opened.FabricEventDispatcherException
- if some error occurs in the Exchange.void dropEventReceiver(java.lang.String receiverName) throws FabricConnectionException, FabricEventDispatcherException
receiverName
- the name of the receiver to be dropped.FabricConnectionException
- if the associated connection is not opened.FabricEventDispatcherException
- if the specified consumer name is invalid.EventReceiver getEventReceiver(java.lang.String receiverName) throws FabricConnectionException
receiverName
- the name of a receiver which is to be found.null
if receiver is not found.FabricConnectionException
- if the associated connection is not opened.java.util.List listEventReceivers() throws FabricConnectionException
FabricConnectionException
- if the associated connection is not opened.void leaveGroup() throws FabricConnectionException
This method just invokes the method FabricConnection.leaveGroup(String)
of the associated connection.
FabricConnectionException
- if the associated connection is not opened or
if some error occurs in the Exchange.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.