ru.primetalk.synapse.akka.ActorComponent.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of synapse-grid-akka_2.11 Show documentation
Show all versions of synapse-grid-akka_2.11 Show documentation
SynapseGrid is a framework for constructing reactive real-time immutable data flow systems. -core contains everything to run a single-threaded system, -akka contains everything to run systems over Akka actors, -slf4j - enables logging, -concurrent - running systems directly over ExecutorContext without the need for Akka, -examples - a few test systems. Also there are -frames - a framework for type construction with meta information (see relations.scala). -typed-expressions - a framework for defining parsers and generators for natural language. The current version is 1.4.0
The newest version!
package ru.primetalk.synapse.akka
import ru.primetalk.synapse.core._
import akka.actor._
/**
* ActorComponent is a component that can be added to any system. When
* the system is converted to dynamic system this component will be converted to an actor.
* The state will reside in that actor.
*
* Inputs and outputs are the same as in the inner system.
* @author А.Жижелев
* TODO: do not return StaticSystem without ActorComponent. in #encapsulate method this leads to
* exclusion of the ActorComponent from the hierarchy.
*/
case class ActorComponent(subsystem: StaticSystem,
supervisorStrategy: SupervisorStrategy = defaultSupervisorStrategy)
extends Component
with ComponentWithInternalStructure {
def name = subsystem.name
val inputContacts = subsystem.inputContacts
val outputContacts = subsystem.outputContacts
def toStaticSystem: StaticSystem = subsystem
}
// TODO: support for ActorBlackBox.
case class ActorBlackBox(subsystem: StaticSystem,
supervisorStrategy: SupervisorStrategy = defaultSupervisorStrategy) extends Component{
def name = subsystem.name
val inputContacts = subsystem.inputContacts
val outputContacts = subsystem.outputContacts
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy