Packages

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
       }
     }
   }
 }
Source
HttpServerLogic.scala
Linear Supertypes
scaladsl.HttpServerLogic, ServerStreamletLogic, AkkaStreamletLogic, StreamletLogic[AkkaStreamletContext], Serializable, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HttpServerLogic
  2. HttpServerLogic
  3. ServerStreamletLogic
  4. AkkaStreamletLogic
  5. StreamletLogic
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new HttpServerLogic(server: Server, context: AkkaStreamletContext)

Abstract Value Members

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def clusterSharding(): ClusterSharding
    Definition Classes
    AkkaStreamletLogic
  7. def committableSink[T]: Sink[(T, Committable), NotUsed]
    Definition Classes
    AkkaStreamletLogic
  8. def committableSink[T](committerSettings: CommitterSettings): Sink[(T, Committable), NotUsed]
    Definition Classes
    AkkaStreamletLogic
  9. def committableSink[T](outlet: CodecOutlet[T], committerSettings: CommitterSettings): Sink[(T, Committable), NotUsed]
    Definition Classes
    AkkaStreamletLogic
  10. final def config: Config
    Definition Classes
    AkkaStreamletLogic
  11. final def containerPort: Int
    Definition Classes
    ServerStreamletLogic
  12. implicit val context: AkkaStreamletContext
    Definition Classes
    AkkaStreamletLogic → StreamletLogic
  13. val defaultCommitterSettings: CommitterSettings
    Definition Classes
    AkkaStreamletLogic
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. implicit final val executionContext: ExecutionContextExecutor
    Definition Classes
    AkkaStreamletLogic
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def getCommittableSink[T](): Sink[Pair[T, Committable], NotUsed]
    Definition Classes
    AkkaStreamletLogic
  19. def getCommittableSink[T](committerSettings: CommitterSettings): Sink[Pair[T, Committable], NotUsed]
    Definition Classes
    AkkaStreamletLogic
  20. def getCommittableSink[T](outlet: CodecOutlet[T]): Sink[Pair[T, Committable], NotUsed]
    Definition Classes
    AkkaStreamletLogic
  21. def getCommittableSink[T](outlet: CodecOutlet[T], committerSettings: CommitterSettings): Sink[Pair[T, Committable], NotUsed]
    Definition Classes
    AkkaStreamletLogic
  22. final def getConfig(): Config
    Definition Classes
    AkkaStreamletLogic
  23. final def getContainerPort(): Int
    Definition Classes
    ServerStreamletLogic
  24. def getContext(): AkkaStreamletContext
    Definition Classes
    AkkaStreamletLogic → StreamletLogic
  25. def getDefaultCommitterSettings(): CommitterSettings
    Definition Classes
    AkkaStreamletLogic
  26. def getExecutionContext(): ExecutionContextExecutor
    Definition Classes
    AkkaStreamletLogic
  27. final def getMountedPath(volumeMount: VolumeMount): Path
    Definition Classes
    AkkaStreamletLogic
  28. def getPlainSink[T](outlet: CodecOutlet[T]): Sink[T, NotUsed]
    Definition Classes
    AkkaStreamletLogic
  29. def getPlainSource[T](inlet: CodecInlet[T], resetPosition: ResetPosition): Source[T, NotUsed]
    Definition Classes
    AkkaStreamletLogic
  30. def getPlainSource[T](inlet: CodecInlet[T]): Source[T, NotUsed]
    Definition Classes
    AkkaStreamletLogic
  31. 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()
  32. def getShardedPlainSource[T, M, E](inlet: CodecInlet[T], shardEntity: Entity[M, E], kafkaTimeout: FiniteDuration): Source[T, Future[NotUsed]]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @ApiMayChange()
  33. def getShardedSourceWithCommittableContext[T, M, E](inlet: CodecInlet[T], shardEntity: Entity[M, E], kafkaTimeout: FiniteDuration): SourceWithContext[T, Committable, Future[NotUsed]]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @ApiMayChange()
  34. final def getSinkRef[T](outlet: CodecOutlet[T]): WritableSinkRef[T]
    Definition Classes
    AkkaStreamletLogic
  35. def getSourceWithCommittableContext[T](inlet: CodecInlet[T]): SourceWithContext[T, Committable, _]
    Definition Classes
    AkkaStreamletLogic
  36. final def getStreamletConfig(): Config
    Definition Classes
    AkkaStreamletLogic
  37. final def getStreamletRef(): String
    Definition Classes
    AkkaStreamletLogic
  38. def getSystem(): ActorSystem
    Definition Classes
    AkkaStreamletLogic
  39. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  40. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  43. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  44. def plainSink[T](outlet: CodecOutlet[T]): Sink[T, NotUsed]
    Definition Classes
    AkkaStreamletLogic
  45. def plainSource[T](inlet: CodecInlet[T], resetPosition: ResetPosition): Source[T, NotUsed]
    Definition Classes
    AkkaStreamletLogic
  46. 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
    HttpServerLogicHttpServerLogic
  47. def run(): Unit
    Definition Classes
    HttpServerLogic → AkkaStreamletLogic
  48. final def runGraph[T](graph: RunnableGraph[T]): T
    Definition Classes
    AkkaStreamletLogic
  49. final def runGraph[T](graph: RunnableGraph[T]): T
    Definition Classes
    AkkaStreamletLogic
  50. 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()
  51. def shardedSourceWithCommittableContext[T, M, E](inlet: CodecInlet[T], shardEntity: Entity[M, E], kafkaTimeout: FiniteDuration): SourceWithContext[T, CommittableOffset, Future[NotUsed]]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @ApiMayChange()
  52. final def signalReady(): Boolean
    Definition Classes
    AkkaStreamletLogic
  53. final def sinkRef[T](outlet: CodecOutlet[T]): WritableSinkRef[T]
    Definition Classes
    AkkaStreamletLogic
  54. def sourceWithCommittableContext[T](inlet: CodecInlet[T]): SourceWithCommittableContext[T]
    Definition Classes
    AkkaStreamletLogic
  55. def startServer(context: AkkaStreamletContext, route: Route, port: Int): Unit
    Attributes
    protected
    Definition Classes
    HttpServerLogic
  56. final def streamletConfig: Config
    Definition Classes
    AkkaStreamletLogic
  57. final def streamletRef: String
    Definition Classes
    AkkaStreamletLogic
  58. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  59. implicit final val system: ActorSystem
    Definition Classes
    AkkaStreamletLogic
  60. def toString(): String
    Definition Classes
    AnyRef → Any
  61. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  62. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  63. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def getSinkWithOffsetContext[T](): Sink[Pair[T, CommittableOffset], NotUsed]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.1) Use getCommittableSink instead.

  3. def getSinkWithOffsetContext[T](committerSettings: CommitterSettings): Sink[Pair[T, CommittableOffset], NotUsed]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.1) Use getCommittableSink instead.

  4. 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 getCommittableSink instead.

  5. def getSinkWithOffsetContext[T](outlet: CodecOutlet[T]): Sink[Pair[T, CommittableOffset], NotUsed]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.1) Use getCommittableSink instead.

  6. def getSourceWithOffsetContext[T](inlet: CodecInlet[T]): SourceWithContext[T, CommittableOffset, _]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.4) Use getSourceWithCommittableContext

  7. def sinkWithOffsetContext[T]: Sink[(T, CommittableOffset), NotUsed]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.1) Use committableSink instead.

  8. def sinkWithOffsetContext[T](committerSettings: CommitterSettings): Sink[(T, CommittableOffset), NotUsed]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.1) Use committableSink instead.

  9. def sinkWithOffsetContext[T](outlet: CodecOutlet[T], committerSettings: CommitterSettings): Sink[(T, CommittableOffset), NotUsed]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.1) Use committableSink instead.

  10. def sourceWithOffsetContext[T](inlet: CodecInlet[T]): SourceWithOffsetContext[T]
    Definition Classes
    AkkaStreamletLogic
    Annotations
    @deprecated
    Deprecated

    (Since version 1.3.4) Use sourceWithCommittableContext

Inherited from ServerStreamletLogic

Inherited from AkkaStreamletLogic

Inherited from StreamletLogic[AkkaStreamletContext]

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped