Packages

t

csw.event.api.scaladsl

EventPublisher

trait EventPublisher 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.scaladsl.EventSubscriber interface to subscribe to the events.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EventPublisher
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def publish(eventGenerator: => Option[Event], startTime: TMTTime, every: FiniteDuration, onError: (PublishFailure) => Unit): Cancellable

    Publish csw.params.events.Event from an eventGenerator function, which will be started at the specified startTime and will be executed at every frequency.

    Publish csw.params.events.Event from an eventGenerator function, which will be started at the specified startTime and will be executed at every frequency. Also, execute onError callback for events whose 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.

    eventGenerator

    a function 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 callback to execute for each event for which publishing failed

    returns

    a handle to cancel the event generation through eventGenerator

    Note

    Callbacks like eventGenerator and onError are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor. Also note that any exception thrown from onError callback is expected to be handled by component developers.

  2. abstract def publish(eventGenerator: => Option[Event], every: FiniteDuration, onError: (PublishFailure) => Unit): Cancellable

    Publish csw.params.events.Event from an eventGenerator function, which will be executed at every frequency And execute onError callback for events whose publishing failed.

    Publish csw.params.events.Event from an eventGenerator function, which will be executed at every frequency And execute onError callback for events whose 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.

    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 callback to execute for each event for which publishing failed

    returns

    a handle to cancel the event generation through eventGenerator

    Note

    Callbacks like eventGenerator and onError are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor. Also note that any exception thrown from onError callback is expected to be handled by component developers.

  3. abstract def publish(eventGenerator: => Option[Event], startTime: TMTTime, every: FiniteDuration): Cancellable

    Publish csw.params.events.Event from an eventGenerator function, which will be started at the specified startTime and will be executed at every frequency.

    Publish csw.params.events.Event from an eventGenerator function, which will be started at the specified startTime and will be executed at every frequency. Cancellable can be used to cancel the execution of eventGenerator 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 function 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

    Note

    Callbacks like eventGenerator are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor.

  4. abstract def publish(eventGenerator: => Option[Event], every: FiniteDuration): Cancellable

    Publish csw.params.events.Event from an eventGenerator function, which will be executed at every frequency.

    Publish csw.params.events.Event from an eventGenerator function, which will be executed at every frequency. Cancellable can be used to cancel the execution of eventGenerator 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 function 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

    Note

    Callbacks like eventGenerator are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor.

  5. abstract def publish[Mat](source: Source[Event, Mat], onError: (PublishFailure) => Unit): Mat

    Publish from a stream of csw.params.events.Event, and execute onError callback for events whose publishing failed.

    Publish from a stream of csw.params.events.Event, and execute onError callback for events whose 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 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.scaladsl.Source of events to be published. Any resource cleanup or exception handling of the provided source is to be managed by the source provider

    onError

    a callback to execute for each event for which publishing failed

    returns

    the materialized value obtained on running the stream

    Note

    Callbacks like onError are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor.

  6. 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.scaladsl.Source of events to be published. Any resource cleanup or exception handling of the provided source is to be managed by the source provider

    returns

    the materialized value obtained on running the stream

  7. abstract def publish(event: Event): Future[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 future which completes when the event is published

  8. abstract def publishAsync(eventGenerator: => Future[Option[Event]], startTime: TMTTime, every: FiniteDuration, onError: (PublishFailure) => Unit): Cancellable

    Publish csw.params.events.Event from an asynchronous eventGenerator function, which will be started at the specified startTime and will be executed at every frequency.

    Publish csw.params.events.Event from an asynchronous eventGenerator function, which will be started at the specified startTime and will be executed at every frequency. Also, execute onError callback for events whose publishing failed. This API is useful if your eventGenerator function generates an event asynchronously and returns a Future[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 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.

    eventGenerator

    a function 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 callback to execute for each event for which publishing failed

    returns

    a handle to cancel the event generation through eventGenerator

    Note

    Callbacks like eventGenerator and onError are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor. Also note that any exception thrown from onError callback is expected to be handled by component developers.

  9. abstract def publishAsync(eventGenerator: => Future[Option[Event]], every: FiniteDuration, onError: (PublishFailure) => Unit): Cancellable

    Publish csw.params.events.Event from an asynchronous eventGenerator function, which will be executed at every frequency And execute onError callback for events whose publishing failed.

    Publish csw.params.events.Event from an asynchronous eventGenerator function, which will be executed at every frequency And execute onError callback for events whose publishing failed. This API is useful if your eventGenerator function generates an event asynchronously and returns a Future[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 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.

    eventGenerator

    a function which can generate a Future of event to be published at every frequency

    every

    frequency with which the events are to be published

    onError

    a callback to execute for each event for which publishing failed

    returns

    a handle to cancel the event generation through eventGenerator

    Note

    Callbacks like eventGenerator and onError are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor. Also note that any exception thrown from onError callback is expected to be handled by component developers.

  10. abstract def publishAsync(eventGenerator: => Future[Option[Event]], startTime: TMTTime, every: FiniteDuration): Cancellable

    Publish csw.params.events.Event from an asynchronous eventGenerator function, which will be started at the specified startTime and will be executed at every frequency.

    Publish csw.params.events.Event from an asynchronous eventGenerator function, which will be started at the specified startTime and will be executed at every frequency. This API is useful if your eventGenerator function generates an event asynchronously and returns a Future[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 and also provides the handle to the event which was failed to be published.

    eventGenerator

    a function 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

    Note

    Callbacks like eventGenerator are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor.

  11. abstract def publishAsync(eventGenerator: => Future[Option[Event]], every: FiniteDuration): Cancellable

    Publish csw.params.events.Event from an asynchronous eventGenerator function, which will be executed at every frequency.

    Publish csw.params.events.Event from an asynchronous eventGenerator function, which will be executed at every frequency. This API is useful if your eventGenerator function generates an event asynchronously and returns a Future[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 and also provides the handle to the event which was failed to be published.

    eventGenerator

    a function which can generate a 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

    Note

    Callbacks like eventGenerator are not thread-safe on the JVM. If you are doing side effects/mutations inside the callback, you should ensure that it is done in a thread-safe way inside an actor.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped