Class/Object

io.backchat.hookup.http

Message

Related Docs: object Message | package http

Permalink

abstract class Message extends HttpMessage

Rich HttpMessage

Base class for Request and Response. There are both input and output methods, though only one set of methods should be used.

Linear Supertypes
HttpMessage, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Message
  2. HttpMessage
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Message()

    Permalink

Abstract Value Members

  1. abstract def getContent(): ChannelBuffer

    Permalink
    Definition Classes
    HttpMessage
  2. abstract def getProtocolVersion(): HttpVersion

    Permalink
    Definition Classes
    HttpMessage
  3. abstract def headers(): HttpHeaders

    Permalink
    Definition Classes
    HttpMessage
  4. abstract def isChunked(): Boolean

    Permalink
    Definition Classes
    HttpMessage
  5. abstract def isRequest: Boolean

    Permalink
  6. abstract def setChunked(arg0: Boolean): Unit

    Permalink
    Definition Classes
    HttpMessage
  7. abstract def setContent(arg0: ChannelBuffer): Unit

    Permalink
    Definition Classes
    HttpMessage
  8. abstract def setProtocolVersion(arg0: HttpVersion): Unit

    Permalink
    Definition Classes
    HttpMessage

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def accept: Seq[String]

    Permalink

    Accept header

  5. def acceptMediaTypes: Seq[String]

    Permalink

    Accept header media types (normalized, no parameters)

  6. def accept_=(values: Iterable[String]): Unit

    Permalink

    Set Accept header with list of values

  7. def accept_=(value: String): Unit

    Permalink

    Set Accept header

  8. def addCookie(cookie: Cookie): Unit

    Permalink

    Add a cookie

  9. def allow: Option[String]

    Permalink

    Allow header

  10. def allow_=(values: Iterable[HttpMethod]): Unit

    Permalink

    Set Authorization header

  11. def allow_=(value: String): Unit

    Permalink

    Set Authorization header

  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def authorization: Option[String]

    Permalink

    Get Authorization header

  14. def authorization_=(value: String): Unit

    Permalink

    Set Authorization header

  15. def cacheControl: Option[String]

    Permalink

    Get Cache-Control header

  16. def cacheControl_=(maxAge: Duration): Unit

    Permalink

    Set Cache-Control header with a max-age (and must-revalidate).

  17. def cacheControl_=(value: String): Unit

    Permalink

    Set Cache-Control header

  18. def charset: Option[String]

    Permalink

    Get charset from Content-Type header

  19. def charset_=(value: String): Unit

    Permalink

    Set charset in Content-Type header.

    Set charset in Content-Type header. This does not change the content.

  20. def clearContent(): Unit

    Permalink

    Clear content (set to "").

  21. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def content: ChannelBuffer

    Permalink
  23. def contentLength: Option[Long]

    Permalink

    Get Content-Length header.

    Get Content-Length header. Use length to get the length of actual content.

  24. def contentLength_=(value: Long): Unit

    Permalink

    Set Content-Length header.

    Set Content-Length header. Normally, this is automatically set by the Codec, but this method allows you to override that.

  25. def contentString: String

    Permalink

    Get the content as a string.

  26. def contentString_=(value: String): Unit

    Permalink

    Set the content as a string.

  27. def contentType: Option[String]

    Permalink

    Get Content-Type header

  28. def contentType_=(value: String): Unit

    Permalink

    Set Content-Type header

  29. def content_=(content: ChannelBuffer): Unit

    Permalink
  30. lazy val cookies: CookieSet

    Permalink

    Cookies.

    Cookies. In a request, this uses the Cookie headers. In a response, it uses the Set-Cookie headers.

  31. def date: Option[String]

    Permalink

    Get Date header

  32. def date_=(value: Date): Unit

    Permalink

    Set Date header by Date

  33. def date_=(value: String): Unit

    Permalink

    Set Date header

  34. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  35. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  36. def expires: Option[String]

    Permalink

    Get Expires header

  37. def expires_=(value: Date): Unit

    Permalink

    Set Expires header by Date

  38. def expires_=(value: String): Unit

    Permalink

    Set Expires header

  39. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  40. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  41. def getContentString(): String

    Permalink
  42. def getCookies(): Iterator[Cookie]

    Permalink

    Get iterator over Cookies

  43. def getInputStream(): InputStream

    Permalink

    Get InputStream for content.

    Get InputStream for content. Caller must close. (Java interface. Scala users should use withInputStream.)

  44. def getLength(): Int

    Permalink
  45. def getReader(): Reader

    Permalink

    Get Reader for content.

    Get Reader for content. (Java interface. Scala users should use withReader.)

  46. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  47. def host: Option[String]

    Permalink

    Get Host header

  48. def host_=(value: String): Unit

    Permalink

    Set Host header

  49. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  50. def isResponse: Boolean

    Permalink
  51. def isXmlHttpRequest: Boolean

    Permalink

    Check if X-Requested-With contains XMLHttpRequest, usually signalling a request from a JavaScript AJAX libraries.

    Check if X-Requested-With contains XMLHttpRequest, usually signalling a request from a JavaScript AJAX libraries. Some servers treat these requests specially. For example, an endpoint might render JSON or XML instead HTML if it's an XmlHttpRequest. (Tip: don't do this - it's gross.)

  52. def lastModified: Option[String]

    Permalink

    Get Last-Modified header

  53. def lastModified_=(value: Date): Unit

    Permalink

    Set Last-Modified header by Date

  54. def lastModified_=(value: String): Unit

    Permalink

    Set Last-Modified header

  55. def length: Int

    Permalink

    Get length of content.

  56. def location: Option[String]

    Permalink

    Get Location header

  57. def location_=(value: String): Unit

    Permalink

    Set Location header

  58. def mediaType: Option[String]

    Permalink

    Get media-type from Content-Type header

  59. def mediaType_=(value: String): Unit

    Permalink

    Set media-type in Content-Type header.

    Set media-type in Content-Type header. Charset and parameter values are preserved, though may not be appropriate for the new media type.

  60. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  61. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  62. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  63. def referer: Option[String]

    Permalink

    Get Referer [sic] header

  64. def referer_=(value: String): Unit

    Permalink

    Set Referer [sic] header

  65. def removeCookie(cookie: Cookie): Unit

    Permalink

    Remove a cookie

  66. def retryAfter: Option[String]

    Permalink

    Get Retry-After header

  67. def retryAfter_=(value: Long): Unit

    Permalink

    Set Retry-After header by seconds

  68. def retryAfter_=(value: String): Unit

    Permalink

    Set Retry-After header

  69. def server: Option[String]

    Permalink

    Get Server header

  70. def server_=(value: String): Unit

    Permalink

    Set Server header

  71. def setContentString(value: String): Unit

    Permalink
  72. def setContentType(mediaType: String, charset: String = "utf-8"): Unit

    Permalink

    Set Content-Type header by media-type and charset

  73. def setContentTypeJson(): Unit

    Permalink

    Set Content-Type header to application/json;charset=utf-8

  74. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  75. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  76. def userAgent: Option[String]

    Permalink

    Get User-Agent header

  77. def userAgent_=(value: String): Unit

    Permalink

    Set User-Agent header

  78. def version: HttpVersion

    Permalink
  79. def version_=(version: HttpVersion): Unit

    Permalink
  80. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  83. def withInputStream[T](f: (InputStream) ⇒ T): T

    Permalink

    Use content as InputStream.

    Use content as InputStream. The underlying channel buffer's reader index is advanced. (Scala interface. Java users can use getInputStream().)

  84. def withOutputStream[T](f: (OutputStream) ⇒ T): T

    Permalink

    Use content as OutputStream.

    Use content as OutputStream. Content is replaced with stream contents. (Java users can use this with a Function, or use Netty's ChannelBufferOutputStream and then call setContent() with the underlying buffer.)

  85. def withReader[T](f: (Reader) ⇒ T): T

    Permalink

    Use content as Reader.

    Use content as Reader. (Scala interface. Java usrs can use getReader().)

  86. def withWriter[T](f: (Writer) ⇒ T): T

    Permalink

    Use as a Writer.

    Use as a Writer. Content is replaced with writer contents.

  87. def write(buffer: ChannelBuffer): Unit

    Permalink

    Append ChannelBuffer to content.

  88. def write(bytes: Array[Byte]): Unit

    Permalink

    Append bytes to content.

  89. def write(string: String): Unit

    Permalink

    Append string to content.

  90. def wwwAuthenticate: Option[String]

    Permalink

    Get WWW-Authenticate header

  91. def wwwAuthenticate_=(value: String): Unit

    Permalink

    Set WWW-Authenticate header

  92. def xForwardedFor: Option[String]

    Permalink

    Get X-Forwarded-For header

  93. def xForwardedFor_=(value: String): Unit

    Permalink

    Set X-Forwarded-For header

Inherited from HttpMessage

Inherited from AnyRef

Inherited from Any

Ungrouped