abstract class HttpServerLogic extends scaladsl.HttpServerLogic
cloudflow.akkastream.ServerStreamletLogic for accepting HTTP requests.
Requires a Server to be passed in when it is created.
cloudflow.akkastream.AkkaServerStreamlet extends cloudflow.akkastream.Server, which can be used for this purpose.
When you define the logic inside the streamlet, you can just pass in this:
HttpServerLogic also predefined logics (HttpServerLogic.createDefault and HttpServerLogic.createDefaultStreaming)
for accepting, transcoding, and writing to an outlet.
class TestHttpServer extends AkkaServerStreamlet { AvroOutlet<Data> outlet = AvroOutlet.<Data>create("out", d -> d.name(), Data.class); Unmarshaller<ByteString, Data> fbu = Jackson.byteStringUnmarshaller(Data.class); public StreamletShape shape() { return StreamletShape.createWithOutlets(outlet); } public HttpServerLogic createLogic() { return new HttpServerLogic(this, getStreamletContext()) { Route createRoute() { // define HTTP route here } } } }
- Alphabetic
- By Inheritance
- HttpServerLogic
- HttpServerLogic
- ServerStreamletLogic
- AkkaStreamletLogic
- StreamletLogic
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new HttpServerLogic(server: Server, context: AkkaStreamletContext)
Abstract Value Members
-
abstract
def
createRoute(): Route
Override this method to define the HTTP route that this HttpServerLogic will use.
Override this method to define the HTTP route that this HttpServerLogic will use.
- returns
the Route that will be used to handle HTTP requests.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
clusterSharding(): ClusterSharding
- Definition Classes
- AkkaStreamletLogic
-
def
committableSink[T]: Sink[(T, Committable), NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
committableSink[T](committerSettings: CommitterSettings): Sink[(T, Committable), NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
committableSink[T](outlet: CodecOutlet[T], committerSettings: CommitterSettings): Sink[(T, Committable), NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
final
def
config: Config
- Definition Classes
- AkkaStreamletLogic
-
final
def
containerPort: Int
- Definition Classes
- ServerStreamletLogic
-
implicit
val
context: AkkaStreamletContext
- Definition Classes
- AkkaStreamletLogic → StreamletLogic
-
val
defaultCommitterSettings: CommitterSettings
- Definition Classes
- AkkaStreamletLogic
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
implicit final
val
executionContext: ExecutionContextExecutor
- Definition Classes
- AkkaStreamletLogic
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getCommittableSink[T](): Sink[Pair[T, Committable], NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
getCommittableSink[T](committerSettings: CommitterSettings): Sink[Pair[T, Committable], NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
getCommittableSink[T](outlet: CodecOutlet[T]): Sink[Pair[T, Committable], NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
getCommittableSink[T](outlet: CodecOutlet[T], committerSettings: CommitterSettings): Sink[Pair[T, Committable], NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
final
def
getConfig(): Config
- Definition Classes
- AkkaStreamletLogic
-
final
def
getContainerPort(): Int
- Definition Classes
- ServerStreamletLogic
-
def
getContext(): AkkaStreamletContext
- Definition Classes
- AkkaStreamletLogic → StreamletLogic
-
def
getDefaultCommitterSettings(): CommitterSettings
- Definition Classes
- AkkaStreamletLogic
-
def
getExecutionContext(): ExecutionContextExecutor
- Definition Classes
- AkkaStreamletLogic
-
final
def
getMountedPath(volumeMount: VolumeMount): Path
- Definition Classes
- AkkaStreamletLogic
-
def
getPlainSink[T](outlet: CodecOutlet[T]): Sink[T, NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
getPlainSource[T](inlet: CodecInlet[T], resetPosition: ResetPosition): Source[T, NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
getPlainSource[T](inlet: CodecInlet[T]): Source[T, NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
getShardedPlainSource[T, M, E](inlet: CodecInlet[T], shardEntity: Entity[M, E], resetPosition: ResetPosition, kafkaTimeout: FiniteDuration): Source[T, Future[NotUsed]]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @ApiMayChange()
-
def
getShardedPlainSource[T, M, E](inlet: CodecInlet[T], shardEntity: Entity[M, E], kafkaTimeout: FiniteDuration): Source[T, Future[NotUsed]]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @ApiMayChange()
-
def
getShardedSourceWithCommittableContext[T, M, E](inlet: CodecInlet[T], shardEntity: Entity[M, E], kafkaTimeout: FiniteDuration): SourceWithContext[T, Committable, Future[NotUsed]]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @ApiMayChange()
-
final
def
getSinkRef[T](outlet: CodecOutlet[T]): WritableSinkRef[T]
- Definition Classes
- AkkaStreamletLogic
-
def
getSourceWithCommittableContext[T](inlet: CodecInlet[T]): SourceWithContext[T, Committable, _]
- Definition Classes
- AkkaStreamletLogic
-
final
def
getStreamletConfig(): Config
- Definition Classes
- AkkaStreamletLogic
-
final
def
getStreamletRef(): String
- Definition Classes
- AkkaStreamletLogic
-
def
getSystem(): ActorSystem
- Definition Classes
- AkkaStreamletLogic
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
plainSink[T](outlet: CodecOutlet[T]): Sink[T, NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
plainSource[T](inlet: CodecInlet[T], resetPosition: ResetPosition): Source[T, NotUsed]
- Definition Classes
- AkkaStreamletLogic
-
def
route(): Route
Override this method to define the HTTP route that this HttpServerLogic will use.
Override this method to define the HTTP route that this HttpServerLogic will use.
- returns
the Route that will be used to handle HTTP requests.
- Definition Classes
- HttpServerLogic → HttpServerLogic
-
def
run(): Unit
- Definition Classes
- HttpServerLogic → AkkaStreamletLogic
-
final
def
runGraph[T](graph: RunnableGraph[T]): T
- Definition Classes
- AkkaStreamletLogic
-
final
def
runGraph[T](graph: RunnableGraph[T]): T
- Definition Classes
- AkkaStreamletLogic
-
def
shardedPlainSource[T, M, E](inlet: CodecInlet[T], shardEntity: Entity[M, E], resetPosition: ResetPosition, kafkaTimeout: FiniteDuration): Source[T, Future[NotUsed]]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @ApiMayChange()
-
def
shardedSourceWithCommittableContext[T, M, E](inlet: CodecInlet[T], shardEntity: Entity[M, E], kafkaTimeout: FiniteDuration): SourceWithContext[T, CommittableOffset, Future[NotUsed]]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @ApiMayChange()
-
final
def
signalReady(): Boolean
- Definition Classes
- AkkaStreamletLogic
-
final
def
sinkRef[T](outlet: CodecOutlet[T]): WritableSinkRef[T]
- Definition Classes
- AkkaStreamletLogic
-
def
sourceWithCommittableContext[T](inlet: CodecInlet[T]): SourceWithCommittableContext[T]
- Definition Classes
- AkkaStreamletLogic
-
def
startServer(context: AkkaStreamletContext, route: Route, port: Int): Unit
- Attributes
- protected
- Definition Classes
- HttpServerLogic
-
final
def
streamletConfig: Config
- Definition Classes
- AkkaStreamletLogic
-
final
def
streamletRef: String
- Definition Classes
- AkkaStreamletLogic
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
implicit final
val
system: ActorSystem
- Definition Classes
- AkkaStreamletLogic
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
Deprecated Value Members
-
def
getSinkWithOffsetContext[T](): Sink[Pair[T, CommittableOffset], NotUsed]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.1) Use
getCommittableSinkinstead.
-
def
getSinkWithOffsetContext[T](committerSettings: CommitterSettings): Sink[Pair[T, CommittableOffset], NotUsed]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.1) Use
getCommittableSinkinstead.
-
def
getSinkWithOffsetContext[T](outlet: CodecOutlet[T], committerSettings: CommitterSettings): Sink[Pair[T, CommittableOffset], NotUsed]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.1) Use
getCommittableSinkinstead.
-
def
getSinkWithOffsetContext[T](outlet: CodecOutlet[T]): Sink[Pair[T, CommittableOffset], NotUsed]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.1) Use
getCommittableSinkinstead.
-
def
getSourceWithOffsetContext[T](inlet: CodecInlet[T]): SourceWithContext[T, CommittableOffset, _]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.4) Use getSourceWithCommittableContext
-
def
sinkWithOffsetContext[T]: Sink[(T, CommittableOffset), NotUsed]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.1) Use
committableSinkinstead.
-
def
sinkWithOffsetContext[T](committerSettings: CommitterSettings): Sink[(T, CommittableOffset), NotUsed]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.1) Use
committableSinkinstead.
-
def
sinkWithOffsetContext[T](outlet: CodecOutlet[T], committerSettings: CommitterSettings): Sink[(T, CommittableOffset), NotUsed]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.1) Use
committableSinkinstead.
-
def
sourceWithOffsetContext[T](inlet: CodecInlet[T]): SourceWithOffsetContext[T]
- Definition Classes
- AkkaStreamletLogic
- Annotations
- @deprecated
- Deprecated
(Since version 1.3.4) Use sourceWithCommittableContext