portals.api.builder

Members list

Type members

Classlikes

Builder for Portals applications.

Builder for Portals applications.

The preferred way of building Portals applications is via the portals.api.dsl.DSL.PortalsApp, and the various methods of the portals.api.dsl.DSL.

Attributes

See also
Example
val builder = ApplicationBuilder("my-app")
Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class ApplicationBuilderContext(_path: String)

Application Builder Context.

Application Builder Context.

Attributes

Supertypes
class Object
trait Matchable
class Any

Builder for Connections.

Builder for Connections.

Connect a stream to a sequencer using the ConnectionBuilder. This is done by calling the connect method.

Attributes

Example
builder.connections.connect(stream, sequencer)
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ConnectionBuilderImpl(name: String)(using bctx: ApplicationBuilderContext) extends ConnectionBuilder

Internal API. Implementation of the ConnectionBuilder.

Internal API. Implementation of the ConnectionBuilder.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait FlowBuilder[T, U, CT, CU]

Flow Builder

Flow Builder

Type parameters

CT

the current input type of the latest task

CU

the current output type of the latest task

T

the input type of the flow

U

the output type of the flow

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object FlowBuilder

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Builder for Generators.

Builder for Generators.

Create a generator using the GeneratorBuilder. This is done by calling one of the methods of the GeneratorBuilder, e.g. fromIterator. Calling one of the methods will automatically add the generator to the application context that is being built. The methods return a reference to the generator, this reference can be used by other parts of the application, for example accessing the output stream of the generator.

The generators either create a single atom of events, or they may create multiple atoms of events. The generators that create only a single atom are the fromIterator and fromList generators. The fromIteratorOfIterators on the other hand creates a new atom per inner iterator that is returned by the outer iterator.

Attributes

Example
val builder = ApplicationBuilder("MyApp")
val generator = builder.generators.fromIterator[Int](Iterator(1, 2, 3))
val stream = generator.stream
val worfklow = builder.workflows[Int, Int].source(stream).map(_ + 1).logger().sink().freeze()
Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Internal API. The generator builder.

Internal API. The generator builder.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class GeneratorBuilderImpl(name: String)(using bctx: ApplicationBuilderContext) extends GeneratorBuilder

Internal API. Implementation of the generator.

Internal API. Implementation of the generator.

Attributes

Supertypes
class Object
trait Matchable
class Any

Builder for portals.

Builder for portals.

The PortalBuilder is used to build portals. A workflow can connect to a portal via either an asker task or a replier task.

Accessed from the application builder via builder.portals.

Attributes

Example
builder.portals.portal[String, Int]("portalName")
builder.portals.portal[String, Int]("portalName", keyFrom)
Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object PortalBuilder

Internal API. The portal builder.

Internal API. The portal builder.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class PortalBuilderImpl(name: String)(using bctx: ApplicationBuilderContext) extends PortalBuilder

Internal API. Implementation of the PortalBuilder.

Internal API. Implementation of the PortalBuilder.

Attributes

Supertypes
class Object
trait Matchable
class Any

Portal registry, fetch references of portals from the registry.

Portal registry, fetch references of portals from the registry.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Registry[A[_]]

Internal API. A registry which has a single generic type parameter.

Internal API. A registry which has a single generic type parameter.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Registry2[A[_, _]]

Internal API. A registry which has two generic type parameters.

Internal API. A registry which has two generic type parameters.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Build the registry to fetch references from the registry.

Build the registry to fetch references from the registry.

Accessed from the application builder via builder.registry.

Attributes

Example
builder.registry.streams.get[String]("path/to/stream")
Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Internal API. The registry builder.

Internal API. The registry builder.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Internal API. Implementation of the RegistryBuilder.

Internal API. Implementation of the RegistryBuilder.

Attributes

Supertypes
class Object
trait Matchable
class Any

Build sequencers.

Build sequencers.

Sequencers are used to sequence multiple atomic streams into a single atomic stream. Atomic streams are connected to a sequencer via using the ConnectionBuilder builder.connections.connect.

Accessed from the application builder via builder.sequencers.

Attributes

Example
builder.sequencers.random[String]()
Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Internal API. The sequencer builder.

Internal API. The sequencer builder.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class SequencerBuilderImpl(name: String)(using bctx: ApplicationBuilderContext) extends SequencerBuilder

Internal API. Implementation of the SequencerBuilder.

Internal API. Implementation of the SequencerBuilder.

Attributes

Supertypes
class Object
trait Matchable
class Any

Sequencer registry, fetch references of sequencers from the registry.

Sequencer registry, fetch references of sequencers from the registry.

Attributes

Supertypes
class Object
trait Matchable
class Any
trait SplitBuilder

Builder for splitting an atomic stream into multiple atomic streams.

Builder for splitting an atomic stream into multiple atomic streams.

Splits can be added to a splitter via the builder.splits.split method. Accessed from the application builder via builder.splits.

Attributes

Example
builder.splits.split[String](splitter, filter)
Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object SplitBuilder

Internal API. The split builder.

Internal API. The split builder.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class SplitBuilderImpl(name: String)(using bctx: ApplicationBuilderContext) extends SplitBuilder

Internal API. Implementation of the split builder.

Internal API. Implementation of the split builder.

Attributes

Supertypes
trait SplitBuilder
class Object
trait Matchable
class Any

Build splitters to split an atomic stream into multiple atomic streams.

Build splitters to split an atomic stream into multiple atomic streams.

Accessed from the application builder via builder.splitters.

Attributes

Example
builder.splitters.empty[String](stream)
Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Internal API. The splitter builder.

Internal API. The splitter builder.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class SplitterBuilderImpl(name: String)(using bctx: ApplicationBuilderContext) extends SplitterBuilder

Internal API. Implementation of the splitter builder.

Internal API. Implementation of the splitter builder.

Attributes

Supertypes
class Object
trait Matchable
class Any

Splitter registry, fetch references of splitters from the registry.

Splitter registry, fetch references of splitters from the registry.

Attributes

Supertypes
class Object
trait Matchable
class Any

Stream registry, fetch references of streams from the registry.

Stream registry, fetch references of streams from the registry.

Attributes

Supertypes
class Object
trait Matchable
class Any
object TaskBuilder

Core Task Factories.

Core Task Factories.

Create tasks using these factories. A task is a behavior that is executed on one a task of the workflow. It transforms an input T to an output U. In doing so, the task can emit events, and perform other actions as described in its task context.

Attributes

See also

portals.api.builder.TaskExtensions for more extensions.

Example
TaskBuilder.processor[String, Int](event => emit(event.length())
TaskBuilder.map[String, Int](x => x.length())

The created tasks can be used directly for the workflow like the following example.

val taskBehavior = TaskBuilder.processor[String, Int](event => emit(event.length()))
builder.workflows[String, Int]("workflowName")
.source(stream)
.task(taskBehavior)
.sink()
.freeze()
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Task Extensions. Import extensions for more flexibility in building tasks.

Task Extensions. Import extensions for more flexibility in building tasks.

Attributes

Example
import portals.api.builder.TaskExtensions.*
// imported filter TaskExtension
TaskBuilder.filter[Int]( event => event > 0 )
Supertypes
class Object
trait Matchable
class Any
Self type
trait WorkflowBuilder[T, U]

Builder for workflows.

Builder for workflows.

Accessed from the application builder via builder.workflows.

Attributes

Example
builder.workflows[String, Int]("workflowName").source().map(x => x.length()).sink().freeze()
Companion
object
Supertypes
class Object
trait Matchable
class Any

Internal API. The workflow builder.

Internal API. The workflow builder.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
class WorkflowBuilderContext[T, U](_path: String)(using val bctx: ApplicationBuilderContext)

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type