Trait

ru.primetalk.synapse.core.subsystems

BaseTypedSystemApi

Related Doc: package subsystems

Permalink

trait BaseTypedSystemApi extends SystemBuilderApi with BaseTypedSystemDsl

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BaseTypedSystemApi
  2. BaseTypedSystemDsl
  3. SystemBuilderApi
  4. ExceptionHandlingExt
  5. TrellisApi
  6. SignalsApi
  7. ContactsDsl
  8. ComponentsApi
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractTypedSystem extends AnyRef

    Permalink
  2. abstract class BaseTypedSystem extends WithStaticSystem

    Permalink

    A very convenient way to define a StaticSystem is by implementing BaseTypedSystem.

    A very convenient way to define a StaticSystem is by implementing BaseTypedSystem.

    Why is it so? We define both the outer world interface (inputs and outputs) and implementation (in defineSystem). Both are declared altogether, in the same class.

    However there is another way for system's construction, which provides better decomposition. It is described in comment to TypedSystemConstructor

  3. type Component = components.Component

    Permalink
    Definition Classes
    ComponentsApi
  4. type ComponentWithInternalStructure = components.ComponentWithInternalStructure

    Permalink
    Definition Classes
    ComponentsApi
  5. type Contact[T] = components.Contact[T]

    Permalink
    Definition Classes
    ComponentsApi
  6. implicit class ContactExtractor[T] extends AnyRef

    Permalink

    Extractor of contacts' data from result.

    Extractor of contacts' data from result.

    Definition Classes
    SignalsApi
  7. type Context = Map[Contact[_], _]

    Permalink

    The context for system is a map from state handles to values.

    The context for system is a map from state handles to values.

    Definition Classes
    TrellisApi
  8. type FlatMapLink[-T1, +T2] = components.FlatMapLink[T1, T2]

    Permalink
    Definition Classes
    ComponentsApi
  9. type Link[T1, T2, -TL1 >: T1, +TL2 <: T2] = components.Link[T1, T2, TL1, TL2]

    Permalink
    Definition Classes
    ComponentsApi
  10. type LinkInfo[-T1, +T2] = components.LinkInfo[T1, T2]

    Permalink
    Definition Classes
    ComponentsApi
  11. type Named = components.Named

    Permalink
    Definition Classes
    ComponentsApi
  12. type NopLink[-T1, +T2 >: T1] = components.NopLink[T1, T2]

    Permalink
    Definition Classes
    ComponentsApi
  13. trait OuterInterfaceBuilder extends AnyRef

    Permalink

    An interface of some object that can collect information about outer interface of a system.

    An interface of some object that can collect information about outer interface of a system. Not only it create contact instances, but it usually transforms and collect them.

    Definition Classes
    SystemBuilderApi
  14. type RedMapLink[-T1, +T2] = components.RedMapLink[T1, T2]

    Permalink
    Definition Classes
    ComponentsApi
  15. implicit class RichSignalList extends AnyRef

    Permalink
    Definition Classes
    SignalsApi
  16. implicit class RichSimpleSignalProcessor extends AnyRef

    Permalink
    Definition Classes
    TrellisApi
  17. implicit class RichTotalTrellisProducer extends AnyRef

    Permalink
    Definition Classes
    TrellisApi
  18. type Signal[T] = components.Signal[T]

    Permalink
    Definition Classes
    ComponentsApi
  19. type SignalCollection[+T] = Iterable[T]

    Permalink
    Definition Classes
    ComponentsApi
  20. type SignalDist = components.SignalDist

    Permalink
    Definition Classes
    ComponentsApi
  21. type SimpleSignalProcessor = (Signal[_]) ⇒ SignalCollection[Signal[_]]

    Permalink

    The simplest signal processor.

    The simplest signal processor. Corresponds to FlatMap.

    Definition Classes
    TrellisApi
  22. type StateHandle[T] = components.StateHandle[T]

    Permalink
    Definition Classes
    ComponentsApi
  23. type StateZipLink[S, -T1, +T2 >: T1] = components.StateZipLink[S, T1, T2]

    Permalink
    Definition Classes
    ComponentsApi
  24. type StatefulFlatMapLink[S, -T1, +T2] = components.StatefulFlatMapLink[S, T1, T2]

    Permalink
    Definition Classes
    ComponentsApi
  25. type StaticSystem = components.StaticSystem

    Permalink
    Definition Classes
    ComponentsApi
  26. type StaticSystemExtensionId[+T] = components.StaticSystemExtensionId[T]

    Permalink
    Definition Classes
    ComponentsApi
  27. implicit class StaticSystemWithUnhandledExceptionHandler extends AnyRef

    Permalink
    Definition Classes
    ExceptionHandlingExt
  28. case class SubsystemDirectSignal[T](subsystemName: String, signal: SignalsApi.Signal[T]) extends SubsystemDirectSignal0 with Product with Serializable

    Permalink

    An encapsulation of the signal that targets a subsystem's internal contact.

    An encapsulation of the signal that targets a subsystem's internal contact.

    Definition Classes
    SignalsApi
  29. sealed trait SubsystemDirectSignal0 extends AnyRef

    Permalink
    Definition Classes
    SignalsApi
  30. case class SubsystemDirectSignalDist(subsystemName: String, signal: SignalsApi.SignalDist) extends SubsystemDirectSignal0 with Product with Serializable

    Permalink
    Definition Classes
    SignalsApi
  31. trait SystemBuilder extends OuterInterfaceBuilder with WithStaticSystem

    Permalink

    DSL for constructing systems.

    DSL for constructing systems.

    This builder supports step-by-step creation of contact system. At the end one must convert it to StaticSystem.

    The builder supports the notion of extensions (much like akka actor system extensions). When we need to store additional information during system construction, we may request an extention instance from the builder. The builder creates the singleton instance if it is not available yet and returns it.

    The builder is used in BaseTypedSystem as a DSL for system's construction.

    Definition Classes
    SystemBuilderApi
  32. class SystemBuilderC extends SystemBuilder

    Permalink
    Definition Classes
    SystemBuilderApi
  33. trait SystemBuilderExtension extends AnyRef

    Permalink

    An extension that adds some additional state to SystemBuilder.

    An extension that adds some additional state to SystemBuilder. It also has an opportunity to adjust the generated StaticSystem via hook #postProcess

    Definition Classes
    SystemBuilderApi
  34. final class SystemBuilderExtensionId[T <: SystemBuilderExtension] extends AnyRef

    Permalink

    ExtensionId for a system builder.

    ExtensionId for a system builder. Every extension can be installed only once on the same SystemBuilder. An instance of the extension is created by the extend method.

    Definition Classes
    SystemBuilderApi
  35. trait SystemImplementation[T] extends AnyRef

    Permalink

    Implements a system of type T.

    Implements a system of type T. Uses external SystemBuilder instance to define internal System's structure.

    Definition Classes
    BaseTypedSystemDsl
  36. type TotalTrellisProducer = (Context, Signal[_]) ⇒ TrellisElement

    Permalink

    A function that takes a single signal on input and returns the last trellis element.

    A function that takes a single signal on input and returns the last trellis element. This producer does not store managed state in it.

    Definition Classes
    TrellisApi
  37. type TrellisElement = (Context, SignalCollection[Signal[_]])

    Permalink

    A snapshot of a running system at some discrete time moment.

    A snapshot of a running system at some discrete time moment.

    Definition Classes
    TrellisApi
  38. type TrellisProducer = (TrellisElement) ⇒ TrellisElement

    Permalink

    A function that makes single step (or a few steps) over time.

    A function that makes single step (or a few steps) over time.

    Definition Classes
    TrellisApi
  39. case class TypedSystem[T](outer: T, staticSystem: BaseTypedSystemDsl.StaticSystem) extends WithStaticSystem with Product with Serializable

    Permalink

    Definition Classes
    BaseTypedSystemDsl
  40. trait TypedSystemConstructor[T] extends (T) ⇒ StaticSystem

    Permalink

    Another way for system's construction is to define inputs and outputs in a separate class/trait and then enumerate them in system builder: sb.inputs(in1, in2, in3) and sb.outputs(out1, out2)

    Another way for system's construction is to define inputs and outputs in a separate class/trait and then enumerate them in system builder: sb.inputs(in1, in2, in3) and sb.outputs(out1, out2)

    class MySystemsInterface { val in1 = new Contact[String]("in1") val in2 = new Contact[String]("in2") val out1 = new Contact[String]("out1") }

    implicit object MySystemImplementation extends TypedSystemConstructor[T] { def apply(outer:T):StaticSystem = {

    } }

    Definition Classes
    BaseTypedSystemDsl
  41. type UnhandledProcessingExceptionHandler = (Throwable, String, Signal[_], Context) ⇒ Context

    Permalink

    The type of a handler that will handle exceptions during signal processing.

    The type of a handler that will handle exceptions during signal processing. If the exception is recoverable, then the handler should provide a new Context for further processing. If not recoverable - throw some exception (or rethrow the original one).

    Definition Classes
    ExceptionHandlingExt
  42. type WithStaticSystem = components.WithStaticSystem

    Permalink
    Definition Classes
    ComponentsApi

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. val Contact: components.Contact.type

    Permalink
    Definition Classes
    ComponentsApi
  5. val FlatMapLink: components.FlatMapLink.type

    Permalink
    Definition Classes
    ComponentsApi
  6. val Link: components.Link.type

    Permalink
    Definition Classes
    ComponentsApi
  7. val NopLink: components.NopLink.type

    Permalink
    Definition Classes
    ComponentsApi
  8. val RedMapLink: components.RedMapLink.type

    Permalink
    Definition Classes
    ComponentsApi
  9. val Signal: components.Signal.type

    Permalink
    Definition Classes
    ComponentsApi
  10. val SignalCollection: Iterable.type

    Permalink
    Definition Classes
    ComponentsApi
  11. val SignalDist: components.SignalDist.type

    Permalink
    Definition Classes
    ComponentsApi
  12. val StateHandle: components.StateHandle.type

    Permalink
    Definition Classes
    ComponentsApi
  13. val StateZipLink: components.StateZipLink.type

    Permalink
    Definition Classes
    ComponentsApi
  14. val StatefulFlatMapLink: components.StatefulFlatMapLink.type

    Permalink
    Definition Classes
    ComponentsApi
  15. val StaticSystem: components.StaticSystem.type

    Permalink
    Definition Classes
    ComponentsApi
  16. object SubsystemDirectSignal0

    Permalink
    Definition Classes
    SignalsApi
  17. object SubsystemSpecialAnswerContact extends Contact[SubsystemDirectSignal0]

    Permalink

    This contact is used to process answers of internal system.

    This contact is used to process answers of internal system.

    Definition Classes
    SignalsApi
  18. object SubsystemSpecialContact extends Contact[SubsystemDirectSignal0]

    Permalink

    This contact is used to process signals of internal system.

    This contact is used to process signals of internal system.

    In asynchronous execution the resulting signal should come at the same level of "call stack". However as far as we usually get the signal asynchronously it is processed at top level. So in order to run it in inside the subsystem, we package asynchronous result into Signal(SubsystemSpecialContact, SubsystemDirectSignal( name, actual resulting signal))

    Definition Classes
    SignalsApi
  19. implicit object UnhandledExceptionHandlerExtensionId extends StaticSystemExtensionId[UnhandledProcessingExceptionHandler]

    Permalink
    Definition Classes
    ExceptionHandlingExt
  20. val WithStaticSystem: components.WithStaticSystem.type

    Permalink
    Definition Classes
    ComponentsApi
  21. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  22. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. def contact[T](name: String): components.Contact[T]

    Permalink

    Create a contact with the given name.

    Create a contact with the given name.

    Definition Classes
    ContactsDsl
  24. def createTypedSystem[T](name: String)(implicit outerBuilder: (OuterInterfaceBuilder) ⇒ T, systemImplementation: SystemImplementation[T]): TypedSystem[T]

    Permalink
    Definition Classes
    BaseTypedSystemDsl
  25. val defaultUnhandledExceptionHandler: UnhandledProcessingExceptionHandler

    Permalink
    Definition Classes
    ExceptionHandlingExt
  26. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  28. def extension[T <: SystemBuilderExtension](implicit sb: SystemBuilder, extensionInstance: SystemBuilderExtensionId[T]): T

    Permalink

    Usage: extension[LabellingExt].methodInExtension

    Usage: extension[LabellingExt].methodInExtension

    Definition Classes
    SystemBuilderApi
  29. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  32. implicit def implicitExtendBasicSystemBuilder[T <: SystemBuilderExtension](sb: SystemBuilder)(implicit extensionInstanceId: SystemBuilderExtensionId[T]): T

    Permalink

    Automatic usage of extensions when an implicit extension id is present in the scope.

    Automatic usage of extensions when an implicit extension id is present in the scope.

    Definition Classes
    SystemBuilderApi
  33. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  34. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  37. implicit def pairToSignal[T](p: (Contact[T], T)): Signal[T]

    Permalink

    One may use notation (contact -> data) to represent a signal

    One may use notation (contact -> data) to represent a signal

    Definition Classes
    SignalsApi
  38. val rethrowUnhandledExceptionHandler: UnhandledProcessingExceptionHandler

    Permalink
    Definition Classes
    ExceptionHandlingExt
  39. def setSystemName(name: String)(implicit sb: SystemBuilder): Unit

    Permalink
    Definition Classes
    SystemBuilderApi
  40. def state[T](name: String, s0: T)(implicit sb: SystemBuilder): StateHandle[T]

    Permalink
    Definition Classes
    SystemBuilderApi
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  42. def systemBuilderTyped(name: String)(_inputs: Contact[_]*)(_outputs: Contact[_]*): SystemBuilder

    Permalink

    A system builder with inputs and outputs given in advance.

    A system builder with inputs and outputs given in advance.

    Definition Classes
    BaseTypedSystemDsl
  43. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  44. final def wait(): Unit

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

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

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

Inherited from BaseTypedSystemDsl

Inherited from SystemBuilderApi

Inherited from ExceptionHandlingExt

Inherited from TrellisApi

Inherited from SignalsApi

Inherited from ContactsDsl

Inherited from ComponentsApi

Inherited from AnyRef

Inherited from Any

Ungrouped