play.api.mvc

SimpleResult

case class SimpleResult [A] (header: ResponseHeader, body: Enumerator[A], writeable: Writeable[A]) extends PlainResult with Product with Serializable

A simple result, which defines the response header and a body ready to send to the client.

A

the response body content type

header

the response header, which contains status code and HTTP headers

body

the response body

Linear Supertypes
Serializable, Serializable, Product, Equals, PlainResult, Result, NotNull, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. SimpleResult
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. PlainResult
  7. Result
  8. NotNull
  9. AnyRef
  10. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SimpleResult (header: ResponseHeader, body: Enumerator[A])(implicit writeable: Writeable[A])

    header

    the response header, which contains status code and HTTP headers

    body

    the response body

Type Members

  1. type BODY_CONTENT = A

    The body content type.

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def as (contentType: String): PlainResult

    Changes the result content type.

    Changes the result content type.

    For example:

    Ok("<text>Hello world</text>").as("text/xml")
    
    contentType

    the new content type.

    returns

    the new result

    Definition Classes
    PlainResult
  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. val body : Enumerator[A]

    the response body

  9. def canEqual (arg0: Any): Boolean

    Definition Classes
    SimpleResult → Equals
  10. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def discardingCookies (names: String*): PlainResult

    Discards cookies along this result.

    Discards cookies along this result.

    For example:

    Ok("Hello world").discardingCookies("theme")
    
    returns

    the new result

    Definition Classes
    PlainResult
  12. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  13. def equals (arg0: Any): Boolean

    Definition Classes
    SimpleResult → Equals → AnyRef → Any
  14. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. def flashing (values: (String, String)*): PlainResult

    Adds values to the flash scope for this result.

    Adds values to the flash scope for this result.

    For example:

    Ok("Hello world").flashing("success" -> "Done!")
    
    returns

    the new result

    Definition Classes
    PlainResult
  16. def flashing (flash: Flash): PlainResult

    Adds values to the flash scope for this result.

    Adds values to the flash scope for this result.

    For example:

    Ok("Hello world").flashing(flash + ("success" -> "Done!"))
    
    flash

    the flash scope to set with this result

    returns

    the new result

    Definition Classes
    PlainResult
  17. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  18. def hashCode (): Int

    Definition Classes
    SimpleResult → AnyRef → Any
  19. val header : ResponseHeader

    the response header, which contains status code and HTTP headers

    the response header, which contains status code and HTTP headers

    Definition Classes
    SimpleResultPlainResult
  20. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  21. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  22. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  23. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  24. def productArity : Int

    Definition Classes
    SimpleResult → Product
  25. def productElement (arg0: Int): Any

    Definition Classes
    SimpleResult → Product
  26. def productIterator : Iterator[Any]

    Definition Classes
    Product
  27. def productPrefix : String

    Definition Classes
    SimpleResult → Product
  28. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  29. def toString (): String

    Definition Classes
    SimpleResult → AnyRef → Any
  30. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  32. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  33. def withCookies (cookies: Cookie*): PlainResult

    Adds cookies to this result.

    Adds cookies to this result.

    For example:

    Ok("Hello world").withCookies(Cookie("theme", "blue"))
    
    cookies

    the cookies to add to this result

    returns

    the new result

    Definition Classes
    PlainResult
  34. def withHeaders (headers: (String, String)*): SimpleResult[A]

    Adds headers to this result.

    Adds headers to this result.

    For example:

    Ok("Hello world").withHeaders(ETAG -> "0")
    
    headers

    the headers to add to this result.

    returns

    the new result

    Definition Classes
    SimpleResultPlainResult
  35. def withNewSession : PlainResult

    Discards the existing session for this result.

    Discards the existing session for this result.

    For example:

    Ok("Hello world").withNewSession
    
    returns

    the new result

    Definition Classes
    PlainResult
  36. def withSession (session: (String, String)*): PlainResult

    Sets a new session for this result, discarding the existing session.

    Sets a new session for this result, discarding the existing session.

    For example:

    Ok("Hello world").withSession("saidHello" -> "yes")
    
    session

    the session to set with this result

    returns

    the new result

    Definition Classes
    PlainResult
  37. def withSession (session: Session): PlainResult

    Sets a new session for this result.

    Sets a new session for this result.

    For example:

    Ok("Hello world").withSession(session + ("saidHello" -> "true"))
    
    session

    the session to set with this result

    returns

    the new result

    Definition Classes
    PlainResult
  38. implicit val writeable : Writeable[A]

    Attributes
    implicit

Deprecated Value Members

  1. def productElements : Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from PlainResult

Inherited from Result

Inherited from NotNull

Inherited from AnyRef

Inherited from Any