Packages

  • package root
    Definition Classes
    root
  • package play

    Play framework.

    Play framework.

    Play

    http://www.playframework.com

    Definition Classes
    root
  • package api

    Contains the public API for Scala developers.

    Contains the public API for Scala developers.

    Read configuration
    val poolSize = configuration.getInt("engine.pool.size")
    Use the logger
    Logger.info("Hello!")
    Define a Plugin
    class MyPlugin(app: Application) extends Plugin
    Create adhoc applications (for testing)
    val application = Application(new File("."), this.getClass.getClassloader, None, Play.Mode.DEV)
    Definition Classes
    play
  • package libs

    Contains various APIs that are useful while developing web applications.

    Contains various APIs that are useful while developing web applications.

    Definition Classes
    api
  • package concurrent
    Definition Classes
    libs
  • package crypto
    Definition Classes
    libs
  • package functional
    Definition Classes
    libs
  • package jcache
    Definition Classes
    libs
  • package json

    Json API For example:

    Json API For example:

    import play.api.libs.json._
    import play.api.libs.functional.syntax._
    
    case class User(id: Long, name: String, friends: Seq[User] = Seq.empty)
    object User {
    
      // In this format, an undefined friends property is mapped to an empty list
      implicit val format: Format[User] = (
        (__ \ "id").format[Long] and
        (__ \ "name").format[String] and
        (__ \ "friends").lazyFormatNullable(implicitly[Format[Seq[User]]])
          .inmap[Seq[User]](_ getOrElse Seq.empty, Some(_))
      )(User.apply, unlift(User.unapply))
    }
    
    //then in a controller:
    
    object MyController extends Controller {
       def displayUserAsJson(id: String) = Action {
          Ok(Json.toJson(User(id.toLong, "myName")))
       }
       def saveUser(jsonString: String)= Action {
         val user = Json.parse(jsonString).as[User]
         myDataStore.save(user)
         Ok
       }
    }
    Definition Classes
    libs
  • package logback
    Definition Classes
    libs
  • package openid
    Definition Classes
    libs
  • package streams
    Definition Classes
    libs
  • Accumulator
  • ActorFlow
  • AkkaStreams
  • GzipFlow
  • Probes
  • package typedmap
    Definition Classes
    libs
  • package ws

    Provides implicit type classes when you import the package.

    Provides implicit type classes when you import the package.

    Definition Classes
    libs
p

play.api.libs

streams

package streams

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Accumulator[-E, +A] extends AnyRef

    An accumulator of elements into a future of a result.

    An accumulator of elements into a future of a result.

    This is essentially a lightweight wrapper around a Sink that gets materialised to a Future, but provides convenient methods for working directly with that future as well as transforming the input.

Value Members

  1. object Accumulator
  2. object ActorFlow

    Provides a flow that is handled by an actor.

    Provides a flow that is handled by an actor.

    See https://github.com/akka/akka/issues/16985.

  3. object AkkaStreams

    Utilities for Akka Streams merging and bypassing of packets.

  4. object GzipFlow

    A simple Gzip Flow

    A simple Gzip Flow

    GZIPs each chunk separately.

  5. object Probes

    Probes, for debugging reactive streams.

Ungrouped