case classFor(topic: Topic, payload: Any) extends MessageBusMessage with Product with Serializable
The payload of For message will be delivered by MessageBus to all LiftActors that subscribed
to the given Topic. For example:
caseobject WombatPhotosTopic extends Topic {
val name = "wombat-photos"
}
MessageBus ! For(WombatPhotosTopic, WombatPhoto('wombat.jpg'))
The WombatPhoto('wombat.jpg') message will be delivered to all LiftActors that previously subscribed to
WombatPhotosTopic sending Subscribe to MessageBus.
Actors should listen for messages delivered from MessageBus as an effect of For sent by sender in the
same way as for any other message types (e.g. implementing messageHandler method or low/medium/highPriority
method).
topic
reference to Topic to which the message should be sent
payload
message that should be sent to Topic
Linear Supertypes
Serializable, Serializable, Product, Equals, MessageBusMessage, AnyRef, Any
The
payload
ofFor
message will be delivered byMessageBus
to allLiftActor
s that subscribed to the givenTopic
. For example:The
WombatPhoto('wombat.jpg')
message will be delivered to allLiftActor
s that previously subscribed toWombatPhotosTopic
sendingSubscribe
toMessageBus
.Actors should listen for messages delivered from
MessageBus
as an effect ofFor
sent by sender in the same way as for any other message types (e.g. implementingmessageHandler
method orlow
/medium
/highPriority
method).reference to
Topic
to which the message should be sentmessage that should be sent to
Topic