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 Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ApplicationBuilder.type
Application Builder Context.
Application Builder Context.
Attributes
- Supertypes
-
class Objecttrait Matchableclass 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 Objecttrait Matchableclass Any
- Known subtypes
-
class ConnectionBuilderImpl
Internal API. Implementation of the ConnectionBuilder.
Internal API. Implementation of the ConnectionBuilder.
Attributes
- Supertypes
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 Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FlowBuilder.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
FlowBuilderContext.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 Objecttrait Matchableclass Any
- Known subtypes
-
class GeneratorBuilderImpl
Internal API. The generator builder.
Internal API. The generator builder.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
GeneratorBuilder.type
Internal API. Implementation of the generator.
Internal API. Implementation of the generator.
Attributes
- Supertypes
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 Objecttrait Matchableclass Any
- Known subtypes
-
class PortalBuilderImpl
Internal API. The portal builder.
Internal API. The portal builder.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
PortalBuilder.type
Internal API. Implementation of the PortalBuilder.
Internal API. Implementation of the PortalBuilder.
Attributes
- Supertypes
Portal registry, fetch references of portals from the registry.
Portal registry, fetch references of portals from the registry.
Attributes
- Supertypes
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 Objecttrait Matchableclass Any
- Known subtypes
Internal API. A registry which has two generic type parameters.
Internal API. A registry which has two generic type parameters.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class PortalsRegistryImpl
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 Objecttrait Matchableclass Any
- Known subtypes
-
class RegistryBuilderImpl
Internal API. The registry builder.
Internal API. The registry builder.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RegistryBuilder.type
Internal API. Implementation of the RegistryBuilder.
Internal API. Implementation of the RegistryBuilder.
Attributes
- Supertypes
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 Objecttrait Matchableclass Any
- Known subtypes
-
class SequencerBuilderImpl
Internal API. The sequencer builder.
Internal API. The sequencer builder.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SequencerBuilder.type
Internal API. Implementation of the SequencerBuilder.
Internal API. Implementation of the SequencerBuilder.
Attributes
- Supertypes
Sequencer registry, fetch references of sequencers from the registry.
Sequencer registry, fetch references of sequencers from the registry.
Attributes
- Supertypes
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 Objecttrait Matchableclass Any
- Known subtypes
-
class SplitBuilderImpl
Internal API. The split builder.
Internal API. The split builder.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SplitBuilder.type
Internal API. Implementation of the split builder.
Internal API. Implementation of the split builder.
Attributes
- Supertypes
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 Objecttrait Matchableclass Any
- Known subtypes
-
class SplitterBuilderImpl
Internal API. The splitter builder.
Internal API. The splitter builder.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SplitterBuilder.type
Internal API. Implementation of the splitter builder.
Internal API. Implementation of the splitter builder.
Attributes
- Supertypes
Splitter registry, fetch references of splitters from the registry.
Splitter registry, fetch references of splitters from the registry.
Attributes
- Supertypes
Stream registry, fetch references of streams from the registry.
Stream registry, fetch references of streams from the registry.
Attributes
- Supertypes
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 Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
TaskBuilder.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 Objecttrait Matchableclass Any
- Self type
-
TaskExtensions.type
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 Objecttrait Matchableclass Any
Internal API. The workflow builder.
Internal API. The workflow builder.
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
WorkflowBuilder.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-