Class/Object

be.wegenenverkeer.atomium.client

AbstractAtomiumFeedClientActor

Related Docs: object AbstractAtomiumFeedClientActor | package client

Permalink

abstract class AbstractAtomiumFeedClientActor[EVENT <: HasPosition, T] extends PersistentActor with ActorLogging

Generic Actor that consumes Atomium feeds (in json format) via the AtomiumClient. If the feed handling goes wrong, the actor will stop (whatever the failure type is). It is therefore suggested to run this actor within a BackoffSupervisor or similar construct.

This actor only sends messages to itself. The feed entries are reported by the publishEvent method.

It's the job of the subclass to decide what to do with these entries.

EVENT

type of the event that will be put on the eventbus

T

(domain) type to deserialize the json feed entries to

Linear Supertypes
ActorLogging, PersistentActor, Eventsourced, ProcessorImpl, Recovery, StashFactory, Stash, RequiresMessageQueue[DequeBasedMessageQueueSemantics], UnrestrictedStash, StashSupport, Snapshotter, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractAtomiumFeedClientActor
  2. ActorLogging
  3. PersistentActor
  4. Eventsourced
  5. ProcessorImpl
  6. Recovery
  7. StashFactory
  8. Stash
  9. RequiresMessageQueue
  10. UnrestrictedStash
  11. StashSupport
  12. Snapshotter
  13. Actor
  14. AnyRef
  15. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractAtomiumFeedClientActor(config: FeedConfig, eventFormat: Format[EVENT], feedEntryFormat: Reads[T], monitorActor: ActorRef)

    Permalink

    config

    feed and actor config

    eventFormat

    format for EventBus events

    feedEntryFormat

    Reads for reading entries in the feed

Type Members

  1. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor

Abstract Value Members

  1. abstract def createEventToPublish(entryReceivedMessage: NewFeedEntryReceived[T]): EVENT

    Permalink

    Abstract method to be implemented by concrete AtomiumFeedClients.

    Abstract method to be implemented by concrete AtomiumFeedClients. Should convert a NewFeedEntryReceived message (containing the feed entry and position) to an event of type EVENT. The event will than be published via the publishEvent method, after it has been persisted.

    entryReceivedMessage

    a message that contains a new feed entry and position

    returns

    an event of type EVENT

  2. abstract def persistenceId: String

    Permalink
    Definition Classes
    Recovery
  3. abstract def publishEvent(event: EVENT): Unit

    Permalink

    New entries in the feed are transformed into events.

    New entries in the feed are transformed into events. This method will be called with the event as parameter when new entries are received.

    event

    The event that is based on an new entry in the feed.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def aroundPostRestart(reason: Throwable): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  5. def aroundPostStop(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    ProcessorImpl → Actor
  6. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Eventsourced → ProcessorImpl → Actor
  7. def aroundPreStart(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    ProcessorImpl → Actor
  8. def aroundReceive(receive: Receive, message: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Eventsourced → Recovery → Actor
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. lazy val atomiumClient: AtomiumClient

    Permalink
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  13. final def defer[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  14. final def defer[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  15. def deleteMessages(toSequenceNr: Long, permanent: Boolean): Unit

    Permalink
    Definition Classes
    ProcessorImpl
  16. def deleteMessages(toSequenceNr: Long): Unit

    Permalink
    Definition Classes
    ProcessorImpl
  17. def deleteSnapshot(sequenceNr: Long, timestamp: Long): Unit

    Permalink
    Definition Classes
    Snapshotter
  18. def deleteSnapshots(criteria: SnapshotSelectionCriteria): Unit

    Permalink
    Definition Classes
    Snapshotter
  19. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. val initialBehavior: Receive

    Permalink
    Attributes
    protected[akka.persistence]
    Definition Classes
    Eventsourced
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. def lastSequenceNr: Long

    Permalink
    Definition Classes
    Recovery
  27. def loadSnapshot(persistenceId: String, criteria: SnapshotSelectionCriteria, toSequenceNr: Long): Unit

    Permalink
    Definition Classes
    Snapshotter
  28. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  29. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. def onJsValueEvent(jsValue: JsValue): Unit

    Permalink
  33. final def persist[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  34. final def persist[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  35. final def persistAsync[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  36. final def persistAsync[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  37. def persistEvent[E <: EVENT](event: E)(handler: (E) ⇒ Unit): Unit

    Permalink
  38. def persistEvents[E <: EVENT](events: Seq[E])(handler: (E) ⇒ Unit): Unit

    Permalink
  39. var positionInFeed: Option[FeedPosition]

    Permalink
  40. def postRestart(reason: Throwable): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  41. def postStop(): Unit

    Permalink
    Definition Classes
    Eventsourced → UnrestrictedStash → Actor
  42. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    Eventsourced → ProcessorImpl → UnrestrictedStash → Actor
  43. def preRestartDefault(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    ProcessorImpl
  44. def preStart(): Unit

    Permalink
    Definition Classes
    ProcessorImpl → Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  45. def receive: Receive

    Permalink
    Definition Classes
    PersistentActor → Actor
  46. def receiveCommand: Receive

    Permalink
    Definition Classes
    AbstractAtomiumFeedClientActor → Eventsourced
  47. def receiveRecover: Receive

    Permalink
    Definition Classes
    AbstractAtomiumFeedClientActor → Eventsourced
  48. def recoveryFinished: Boolean

    Permalink
    Definition Classes
    ProcessorImpl
  49. def recoveryRunning: Boolean

    Permalink
    Definition Classes
    ProcessorImpl
  50. def saveSnapshot(snapshot: Any): Unit

    Permalink
    Definition Classes
    Snapshotter
  51. implicit final val self: ActorRef

    Permalink
    Definition Classes
    Actor
  52. final def sender(): ActorRef

    Permalink
    Definition Classes
    Actor
  53. def snapshotSequenceNr: Long

    Permalink
    Definition Classes
    Recovery → Snapshotter
  54. def snapshotterId: String

    Permalink
    Definition Classes
    ProcessorImpl → Snapshotter
  55. def stash(): Unit

    Permalink
    Definition Classes
    StashSupport
  56. def status(atomiumFeedClientStatus: AtomiumFeedClientStatus): Unit

    Permalink

    Implement this method to get informed about the status of the feed client.

    Implement this method to get informed about the status of the feed client. The default implementation just ignores the info.

    atomiumFeedClientStatus

    the current status

  57. def subscribeToFeed(): Unit

    Permalink
    Attributes
    protected
  58. def supervisorStrategy: SupervisorStrategy

    Permalink
    Definition Classes
    Actor
  59. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  60. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  61. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    ProcessorImpl → Actor
  62. def unstashAll(): Unit

    Permalink
    Definition Classes
    Eventsourced → StashSupport
  63. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. implicit def currentPersistentMessage: Option[Persistent]

    Permalink
    Definition Classes
    Recovery
    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.4) currentPersistentMessage will be removed, sequence number can be retrieved with lastSequenceNr.

  2. def deleteMessage(sequenceNr: Long, permanent: Boolean): Unit

    Permalink
    Definition Classes
    ProcessorImpl
    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.4) deleteMessage(sequenceNr) will be removed. Instead, validate before persist, and use deleteMessages for pruning.

  3. def deleteMessage(sequenceNr: Long): Unit

    Permalink
    Definition Classes
    ProcessorImpl
    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.4) deleteMessage(sequenceNr) will be removed. Instead, validate before persist, and use deleteMessages for pruning.

  4. def getCurrentPersistentMessage: Persistent

    Permalink
    Definition Classes
    Recovery
    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.4) getCurrentPersistentMessage will be removed, sequence number can be retrieved with lastSequenceNr.

  5. def processorId: String

    Permalink
    Definition Classes
    ProcessorImpl → Recovery
    Annotations
    @deprecated
    Deprecated

    (Since version 2.3.4) Override persistenceId: String instead. Processor will be removed.

Inherited from ActorLogging

Inherited from PersistentActor

Inherited from Eventsourced

Inherited from ProcessorImpl

Inherited from Recovery

Inherited from StashFactory

Inherited from Stash

Inherited from RequiresMessageQueue[DequeBasedMessageQueueSemantics]

Inherited from UnrestrictedStash

Inherited from StashSupport

Inherited from Snapshotter

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped