. */ sealed trait RouteResult extends javadsl.server.RouteResult object RouteResult { final case...class Complete(response: HttpResponse) extends javadsl.server.Complete with RouteResult { override...getResponse = response } final case class Rejected(rejections: immutable.Seq[Rejection]) extends javadsl.server.Rejected...with RouteResult { override def getRejections = rejections.map(r ⇒ r: javadsl.server.Rejection).
ExecutionContextExecutor): Future[Done] = gateway.shutdown() private[http] def toJava = new akka.http.javadsl.HostConnectionPool...sys.terminate()} 下面是本次Akka-http-client-side-connection讨论的示范源代码: import akka.actor._ import akka.http.javadsl
cache, alwaysCache 我们先看看如何直接使用cache操作,先看看Cache的构建: abstract class Cache[K, V] extends akka.http.caching.javadsl.Cache
Configurable { String NAME_KEY = "name"; String VALUE_KEY = "value"; // useful for javadsl
Unmarshalling对一个A类实例到B类实例的转换是通过Unmarshaller[A,B]来实现的: trait Unmarshaller[-A, B] extends akka.http.javadsl.unmarshalling.Unmarshaller
测试类使用的是akka.test.javadsl.TestKit,它是用于 Actor 和 Actor 系统集成测试的模块。这个类只使用了TestKit提供的一部分功能。...com.lightbend.akka.sample.Printer.Greeting; import akka.actor.ActorRef; import akka.actor.ActorSystem; import akka.testkit.javadsl.TestKit
Graph[SourceShape[T], M]): Source[T, M] = g match { case s: Source[T, M] ⇒ s case s: javadsl.Source
领取专属 10元无门槛券
手把手带您无忧上云