trait IEventPublisher extends AnyRef
An EventPublisher interface to publish events. The published events are published on a key determined by csw.params.events.EventKey in the csw.params.events.Event model. This key can be used by the subscribers using csw.event.api.javadsl.IEventSubscriber interface to subscribe to the events.
- Alphabetic
- By Inheritance
- IEventPublisher
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def publish(eventGenerator: Supplier[Optional[Event]], startTime: TMTTime, every: Duration, onError: Consumer[PublishFailure]): Cancellable
Publish csw.params.events.Event from an
eventGenerator
supplier, which will be started at the specifiedstartTime
and will be executed atevery
frequency.Publish csw.params.events.Event from an
eventGenerator
supplier, which will be started at the specifiedstartTime
and will be executed atevery
frequency. Also, provideonError
consumer to perform an operation for each event for which publishing failed.At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception and also provides the handle to the event which was failed to be published. The provided callback is executed on the failed element and the generator resumes to publish remaining elements.
Note that any exception thrown from
onError
consumer is expected to be handled by component developers.- eventGenerator
a supplier which can generate an event to be published at
every
frequency- startTime
the time at which the
eventGenerator
should start generating events- every
frequency with which the events are to be published
- onError
a consumer which defines an operation for each event for which publishing failed
- returns
a handle to cancel the event generation through
eventGenerator
- abstract def publish(eventGenerator: Supplier[Optional[Event]], every: Duration, onError: Consumer[PublishFailure]): Cancellable
Publish csw.params.events.Event from an
eventGenerator
supplier, which will be executed atevery
frequency.Publish csw.params.events.Event from an
eventGenerator
supplier, which will be executed atevery
frequency. Also, provideonError
consumer to perform an operation for each event for which publishing failed.At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception and also provides the handle to the event which was failed to be published. The provided callback is executed on the failed element and the generator resumes to publish remaining elements.
Note that any exception thrown from
onError
consumer is expected to be handled by component developers.- eventGenerator
a function which can generate an event to be published at
every
frequency- every
frequency with which the events are to be published
- onError
a consumer which defines an operation for each event for which publishing failed
- returns
a handle to cancel the event generation through
eventGenerator
- abstract def publish(eventGenerator: Supplier[Optional[Event]], startTime: TMTTime, every: Duration): Cancellable
Publish csw.params.events.Event from an
eventGenerator
supplier, which will be started at the specifiedstartTime
and will be executed atevery
frequency.Publish csw.params.events.Event from an
eventGenerator
supplier, which will be started at the specifiedstartTime
and will be executed atevery
frequency.Cancellable
can be used to cancel the execution ofeventGenerator
function.At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception. The generator resumes to publish remaining elements in case of this exception.
- eventGenerator
a supplier which can generate an event to be published at
every
frequency- startTime
the time at which the
eventGenerator
should start generating events- every
frequency with which the events are to be published
- returns
a handle to cancel the event generation through
eventGenerator
- abstract def publish(eventGenerator: Supplier[Optional[Event]], every: Duration): Cancellable
Publish csw.params.events.Event from an
eventGenerator
supplier, which will be executed atevery
frequency.Publish csw.params.events.Event from an
eventGenerator
supplier, which will be executed atevery
frequency.Cancellable
can be used to cancel the execution ofeventGenerator
function.At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception. The generator resumes to publish remaining elements in case of this exception.
- eventGenerator
a supplier which can generate an event to be published at
every
frequency- every
frequency with which the events are to be published
- returns
a handle to cancel the event generation through
eventGenerator
- abstract def publish[Mat](source: Source[Event, Mat], onError: Consumer[PublishFailure]): Mat
Publish from a stream of csw.params.events.Event, and perform an operation defined using
onError
consumer for each event for which publishing failedPublish from a stream of csw.params.events.Event, and perform an operation defined using
onError
consumer for each event for which publishing failedAt the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception and also provides the handle to the event which was failed to be published. The provided callback is executed on the failed element and the stream resumes to publish remaining elements.
- Mat
represents the type of materialized value as defined in the source to be obtained on running the stream
- source
a akka.stream.javadsl.Source of events to be published
- onError
a consumer which defines an operation for each event for which publishing failed
- returns
the materialized value obtained on running the stream
- abstract def publish[Mat](source: Source[Event, Mat]): Mat
Publish from a stream of csw.params.events.Event
Publish from a stream of csw.params.events.Event
At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception. The stream resumes to publish remaining elements in case of this exception.
- Mat
represents the type of materialized value as defined in the source to be obtained on running the stream
- source
a akka.stream.javadsl.Source of events to be published
- returns
the materialized value obtained on running the stream
- abstract def publish(event: Event): CompletableFuture[Done]
Publish a single csw.params.events.Event
Publish a single csw.params.events.Event
At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown, in all other cases csw.event.api.exceptions.PublishFailure exception is thrown which wraps the underlying exception and also provides the handle to the event which was failed to be published
- event
an event to be published
- returns
a completable future which completes when the event is published
- abstract def publishAsync(eventGenerator: Supplier[CompletableFuture[Optional[Event]]], startTime: TMTTime, every: Duration, onError: Consumer[PublishFailure]): Cancellable
Publish csw.params.events.Event from an
eventGenerator
supplier, which will be started at the specifiedstartTime
and will be executed atevery
frequency.Publish csw.params.events.Event from an
eventGenerator
supplier, which will be started at the specifiedstartTime
and will be executed atevery
frequency. Also, provideonError
callback for each event for which publishing failed. Prefer this version if eventGenerator closes over mutable state. This method allows caller to prepare future on it's own execution context to make it thread safe.At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception and also provides the handle to the event which was failed to be published. The provided callback is executed on the failed element and the generator resumes to publish remaining elements.
Note that any exception thrown from
onError
consumer is expected to be handled by component developers.- eventGenerator
a supplier which can generate a Future of event to be published at
every
frequency- startTime
the time at which the
eventGenerator
should start generating events- every
frequency with which the events are to be published
- onError
a consumer to execute for each event for which publishing failed
- returns
a handle to cancel the event generation through
eventGenerator
- abstract def publishAsync(eventGenerator: Supplier[CompletableFuture[Optional[Event]]], every: Duration, onError: Consumer[PublishFailure]): Cancellable
Publish csw.params.events.Event from an
eventGenerator
supplier, which will be executed atevery
frequency.Publish csw.params.events.Event from an
eventGenerator
supplier, which will be executed atevery
frequency. Also, provideonError
consumer to perform an operation for each event for which publishing failed. Prefer this version if eventGenerator closes over mutable state. This method allows caller to prepare future on it's own execution context to make it thread safe.At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception and also provides the handle to the event which was failed to be published. The provided callback is executed on the failed element and the generator resumes to publish remaining elements.
Note that any exception thrown from
onError
callback is expected to be handled by component developers.- eventGenerator
a function which can generate Future of event to be published at
every
frequency- every
frequency with which the events are to be published
- onError
a consumer which defines an operation for each event for which publishing failed
- returns
a handle to cancel the event generation through
eventGenerator
- abstract def publishAsync(eventGenerator: Supplier[CompletableFuture[Optional[Event]]], startTime: TMTTime, every: Duration): Cancellable
Publish csw.params.events.Event from an
eventGenerator
supplier, which will be started at the specifiedstartTime
and will be executed atevery
frequency.Publish csw.params.events.Event from an
eventGenerator
supplier, which will be started at the specifiedstartTime
and will be executed atevery
frequency. Also, provideonError
callback for each event for which publishing failed. Prefer this version if eventGenerator closes over mutable state. This method allows caller to prepare future on it's own execution context to make it thread safe.At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception and also provides the handle to the event which was failed to be published.
- eventGenerator
a supplier which can generate a Future of event to be published at
every
frequency- startTime
the time at which the
eventGenerator
should start generating events- every
frequency with which the events are to be published
- returns
a handle to cancel the event generation through
eventGenerator
- abstract def publishAsync(eventGenerator: Supplier[CompletableFuture[Optional[Event]]], every: Duration): Cancellable
Publish csw.params.events.Event from an
eventGenerator
supplier, which will be executed atevery
frequency.Publish csw.params.events.Event from an
eventGenerator
supplier, which will be executed atevery
frequency.Cancellable
can be used to cancel the execution ofeventGenerator
function. Prefer this version if eventGenerator closes over mutable state. This method allows caller to prepare future on it's own execution context to make it thread safe.At the time of invocation, in case the underlying server is not available, csw.event.api.exceptions.EventServerNotAvailable exception is thrown and the stream is stopped after logging appropriately. In all other cases of exception, the stream receives a csw.event.api.exceptions.PublishFailure exception which wraps the underlying exception. The generator resumes to publish remaining elements in case of this exception.
- eventGenerator
a supplier which can generate Future of event to be published at
every
frequency- every
frequency with which the events are to be published
- returns
a handle to cancel the event generation through
eventGenerator
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])