com.outr.net.http.netty

NettyRequestHandler

object NettyRequestHandler

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. NettyRequestHandler
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

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

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

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

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val cacheTimeInSeconds: Int

    The default cache time to use for streaming methods in RequestHandler.

    The default cache time to use for streaming methods in RequestHandler.

    Defaults to 120

  8. val chunkSize: Int

    The default chunk size to use for streaming methods in RequestHandler.

    The default chunk size to use for streaming methods in RequestHandler.

    Defaults to 8192

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def createDateFormatter: SimpleDateFormat

  11. def createResponse(version: HttpVersion = HttpVersion.HTTP_1_1, status: HttpResponseStatus = HttpResponseStatus.OK, contentLength: Long = 1, contentType: String = null, cacheTimeInSeconds: Int = cacheTimeInSeconds, lastModified: Long = 1, sendExpiration: Boolean = true): DefaultHttpResponse

    Creates an HttpResponse given the parameters supplied.

    Creates an HttpResponse given the parameters supplied.

    version

    the HttpVersion, defaults to HTTP_1_1

    status

    the HttpResponseStatus, defaults to OK

    contentLength

    the content-length, defaults to -1 (not sent)

    contentType

    the content-type, defaults to null (not sent)

    cacheTimeInSeconds

    the time to cache the response in seconds

    lastModified

    the last modified timestamp, defaults to -1 (not sent)

    sendExpiration

    true if expiration data should be sent, defaults to true

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

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

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

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

    Definition Classes
    AnyRef → Any
  16. def getContentType(filename: String, contentType: String = null): String

    Attempts to use mimeTypes to determine the content-type if the supplied content-type is null.

    Attempts to use mimeTypes to determine the content-type if the supplied content-type is null.

    filename

    the filename to use for content-type derivation

    contentType

    the content-type to use if not null

    returns

    derived content-type

  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. val mimeTypes: MimetypesFileTypeMap

    The default mimeTypes to use for streaming methods in RequestHandler.

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

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def sendCached(lastModified: Long, context: ChannelHandlerContext, request: HttpRequest): Boolean

    Reads from the request the last modified date in the headers and determines if the version the client has the same modification stamp as the server.

    Reads from the request the last modified date in the headers and determines if the version the client has the same modification stamp as the server.

    Note that this will send a response back and close the connection if the client has the cached version.

    lastModified

    the last modified stamp in milliseconds to compare with

    context

    the context to use

    request

    the inbound request

    returns

    true if the client has the correct version

  24. def sendResponse(context: ChannelHandlerContext): ChannelFuture

    Sends a standard OK response and closes the connection.

  25. def streamFile(file: File, context: ChannelHandlerContext, request: HttpRequest, contentType: String = null, cacheTimeInSeconds: Int = cacheTimeInSeconds, chunkSize: Int = chunkSize, enableCaching: Boolean = true): Any

    Streams a File back to the client and closes the connection when finished.

    Streams a File back to the client and closes the connection when finished.

    file

    the File to stream

    context

    the context to use

    request

    the inbound request

    contentType

    the content-type to send. If this is null the content-type will be derived from the URL

    cacheTimeInSeconds

    the amount of time in seconds to cache this response

    chunkSize

    the chunk size to use when streaming the content back

    enableCaching

    determines whether this content is cachable

  26. def streamInput(input: InputStream, context: ChannelHandlerContext, request: HttpRequest, contentType: String, contentLength: Long = 1, lastModified: Long = 1, cacheTimeInSeconds: Int = cacheTimeInSeconds, chunkSize: Int = chunkSize, enableCaching: Boolean = true): Any

    Streams an InputStream back to the client and closes the connection when finished.

    Streams an InputStream back to the client and closes the connection when finished.

    input

    the InputStream to stream

    context

    the context to use

    request

    the inbound request

    contentType

    the content-type to send

    contentLength

    the content-length to send

    lastModified

    the last modified time in milliseconds

    cacheTimeInSeconds

    the amount of time in seconds to cache this response

    chunkSize

    the chunk size to use when streaming the content back

    enableCaching

    determines whether this content is cachable

  27. def streamURL(url: java.net.URL, context: ChannelHandlerContext, request: HttpRequest, contentType: String = null, cacheTimeInSeconds: Int = cacheTimeInSeconds, chunkSize: Int = chunkSize, enableCaching: Boolean = true): Any

    Streams a URL back to the client and closes the connection when finished.

    Streams a URL back to the client and closes the connection when finished.

    url

    the URL to stream

    context

    the context to use

    request

    the inbound request

    contentType

    the content-type to send. If this is null the content-type will be derived from the URL

    cacheTimeInSeconds

    the amount of time in seconds to cache this response

    chunkSize

    the chunk size to use when streaming the content back

    enableCaching

    determines whether this content is cachable

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

    Definition Classes
    AnyRef
  29. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def writeFile(channel: Channel, file: RandomAccessFile, chunkSize: Int = chunkSize, closeOnFinish: Boolean = true): ChannelFuture

    Writes the RandomAccessFile out.

    Writes the RandomAccessFile out. This handles explicitly streaming data back to the channel. The streamFile method should be used to send a response instead of this method.

  34. def writeInput(channel: Channel, input: InputStream, chunkSize: Int = chunkSize, closeOnFinish: Boolean = true): ChannelFuture

    Writes the InputStream out.

    Writes the InputStream out. This handles explicitly streaming data back to the channel. The streamInput method should be used to send a response instead of this method.

Inherited from AnyRef

Inherited from Any

Ungrouped