HttpExt
Code IndexAdd Codota to your IDE (free)

Best code snippets using akka.http.scaladsl.HttpExt(Showing top 10 results out of 315)

origin: com.typesafe.akka/akka-http-core_2.11

private object PoolInterfaceActor {
 final case class PoolRequest(request: HttpRequest, responsePromise: Promise[HttpResponse]) extends NoSerializationVerificationNeeded

 case object Shutdown extends DeadLetterSuppression

 val name = SeqActorName("PoolInterfaceActor")

 def props(gateway: PoolGateway)(implicit fm: Materializer) = Props(new PoolInterfaceActor(gateway)).withDeploy(Deploy.local)

 /**
  * LogSource for PoolGateway instances
  *
  * Using this LogSource allows us to set the log class to `PoolInterfaceActor` and the log source string
  * to a descriptive name that describes a particular pool instance.
  */
 private val GatewayLogSource: LogSource[PoolGateway] =
  new LogSource[PoolGateway] {
   def genString(gateway: PoolGateway): String = {
    val scheme = if (gateway.hcps.setup.connectionContext.isSecure) "https" else "http"
    s"Pool(${gateway.gatewayId.name}->$scheme://${gateway.hcps.host}:${gateway.hcps.port})"
   }
   override def genString(gateway: PoolGateway, system: ActorSystem): String = s"${system.name}/${genString(gateway)}"

   override def getClazz(t: PoolGateway): Class[_] = classOf[PoolGateway]
  }
}
origin: io.findify/s3mock_2.11

object S3Mock {
 def apply(port: Int): S3Mock = new S3Mock(port, new InMemoryProvider)
 def apply(port:Int, dir:String) = new S3Mock(port, new FileProvider(dir))

 /**
  * Create an in-memory s3mock instance
  * @param port a port to bind to.
  * @return s3mock instance
  */
 def create(port:Int) = apply(port) // Java API
 /**
  * Create a file-based s3mock instance
  * @param port port to bind to
  * @param dir directory to mount as a collection of buckets. First-level directories will be treated as buckets, their contents - as keys.
  * @return
  */
 def create(port:Int, dir:String) = apply(port, dir) // Java API
 /**
  * Builder class for java api.
  */
 class Builder {
  private var defaultPort: Int = 8001
  private var defaultProvider: Provider = new InMemoryProvider()

  /**
   * Set port to bind to
   * @param port port number
   * @return
   */
  def withPort(port: Int): Builder = {
origin: io.findify/s3mock_2.12

bind = Await.result(http.bindAndHandle(route, "0.0.0.0", port), Duration.Inf)
logger.info(s"bound to 0.0.0.0:$port")
bind
val stopped = for {
 _ <- bind.unbind()
 _ <- Http().shutdownAllConnectionPools()
 _ <- system.terminate()
} yield {
origin: com.typesafe.akka/akka-http-core_2.11

new HttpExt(system.settings.config getConfig "akka.http")(system)
origin: com.typesafe.akka/akka-http_2.12

implicit val executionContext = theSystem.dispatcher
val bindingFuture = Http().bindAndHandle(
 handler = routes,
 interface = host,
origin: com.typesafe.akka/akka-http_2.11

implicit val executionContext = theSystem.dispatcher
val bindingFuture = Http().bindAndHandle(
 handler = routes,
 interface = host,
origin: org.elasticmq/elasticmq-rest-sqs_2.11

val appStartFuture = Http().bindAndHandle(routes, interface, port)
origin: com.typesafe.play/play-akka-http-server_2.11

.bindAndHandleAsync(
 handler = handleRequest(_, connectionContext.isSecure),
 interface = config.address, port = port,
origin: com.typesafe.akka/akka-http-core_2.11

@DoNotInherit
class HttpExt private[http] (private val config: Config)(implicit val system: ExtendedActorSystem) extends akka.actor.Extension
 with DefaultSSLContextCreation {
 validateAndWarnAboutLooseSettings()
  connectionContext: ConnectionContext,
  log:               LoggingAdapter): ServerLayerBidiFlow = {
  val httpLayer = serverLayerImpl(settings, None, log, connectionContext.isSecure)
  val tlsStage = sslTlsStage(connectionContext, Server)
      connectionContext: ConnectionContext = defaultServerHttpContext,
      settings:          ServerSettings    = ServerSettings(system),
      log:               LoggingAdapter    = system.log): Source[Http.IncomingConnection, Future[ServerBinding]] =
  bindImpl(interface, port, connectionContext, settings, log)
               connectionContext: ConnectionContext = defaultServerHttpContext,
               settings:          ServerSettings    = ServerSettings(system),
               log:               LoggingAdapter    = system.log): Source[Http.IncomingConnection, Future[ServerBinding]] = {
  val fullLayer = fuseServerBidiFlow(settings, connectionContext, log)
  tcpBind(interface, choosePort(port, connectionContext, settings), settings)
   .map(incoming ⇒ {
    val serverFlow = fullLayer.addAttributes(prepareAttributes(settings, incoming)) join incoming.flow
             settings:          ServerSettings,
             log:               LoggingAdapter)(implicit fm: Materializer): Source[Http.IncomingConnection, Future[ServerBinding]] =
  bindImpl(interface, port, connectionContext, settings, log)
  handler:   Flow[HttpRequest, HttpResponse, Any],
origin: com.typesafe.akka/akka-http-core_2.11

adaptServerLayer(delegate.serverLayerImpl())
adaptServerLayer(delegate.serverLayerImpl(settings.asScala))
settings:      ServerSettings,
remoteAddress: Optional[InetSocketAddress]): BidiFlow[HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, NotUsed] =
adaptServerLayer(delegate.serverLayerImpl(settings.asScala, remoteAddress.asScala))
remoteAddress: Optional[InetSocketAddress],
log:           LoggingAdapter): BidiFlow[HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, NotUsed] =
adaptServerLayer(delegate.serverLayerImpl(settings.asScala, remoteAddress.asScala, log))
adaptServerLayer(delegate.serverLayerImpl())
settings:     ServerSettings,
materializer: Materializer): BidiFlow[HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, NotUsed] =
adaptServerLayer(delegate.serverLayerImpl(settings.asScala))
remoteAddress: Optional[InetSocketAddress],
materializer:  Materializer): BidiFlow[HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, NotUsed] =
adaptServerLayer(delegate.serverLayerImpl(settings.asScala, remoteAddress.asScala))
log:           LoggingAdapter,
materializer:  Materializer): BidiFlow[HttpResponse, SslTlsOutbound, SslTlsInbound, HttpRequest, NotUsed] =
adaptServerLayer(delegate.serverLayerImpl(settings.asScala, remoteAddress.asScala, log))
new Source(delegate.bindImpl(connect.host, connect.port, connectionContext)
 .map(new IncomingConnection(_))
 .mapMaterializedValue(_.map(new ServerBinding(_))(ec).toJava))
akka.http.scaladslHttpExt

Most used methods

  • bindAndHandle
  • bindAndHandle$default$6
  • bindAndHandle$default$4
  • bindAndHandle$default$5
  • shutdownAllConnectionPools
  • bindAndHandleAsync
  • bindAndHandleAsync$default$6
  • bindAndHandleAsync$default$7
  • <init>
  • _outgoingConnection
  • _outgoingTlsConnectionLayer
  • akka$http$scaladsl$HttpExt$$materializeTcpBind
  • _outgoingTlsConnectionLayer,
  • akka$http$scaladsl$HttpExt$$materializeTcpBind,
  • akka$http$scaladsl$HttpExt$$sharedGateway,
  • bindAndHandleAsync$default$5,
  • bindAndHandleSync,
  • bindAndHandleSync$default$5,
  • bindAndHandleSync$default$6,
  • bindImpl,
  • bindImpl$default$4,
  • bindImpl$default$5

Popular classes and methods

  • startActivity (Activity)
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
    Sets the value of the specified request header field. The value will only be used by the current URL
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)