Package

fm.http

server

Permalink

package server

Linear Supertypes
PackageImplicits, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. server
  2. PackageImplicits
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. final case class AsyncResponse(status: Status, headers: Headers, head: LinkedHttpContent) extends Response with AsyncMessage with Product with Serializable

    Permalink

    This represents a chunked HTTP Response with headers and the first chunk along with a pointer to the next chunk

  2. trait Auth extends RequestFilter

    Permalink
  3. final case class BasicAuth(realm: String, users: Map[String, String]) extends Auth with Logging with Product with Serializable

    Permalink

    Performs Basic Authentication using the given Map of Username -> Plaintext Password before calling the passed in handler

    Performs Basic Authentication using the given Map of Username -> Plaintext Password before calling the passed in handler

    Mostly used the Wikipedia page as references: http://en.wikipedia.org/wiki/Basic_access_authentication

  4. final case class ControlHandler(server: HttpServer, authKey: String) extends DefaultRequestRouter with Logging with Product with Serializable

    Permalink
  5. abstract class DefaultRequestRouter extends RequestRouterBase with RequestHandler

    Permalink
  6. final case class DigestAuth(realm: String, users: Map[String, String], noncePrefix: String, base64EncryptionKey: String, expirationSeconds: Int = 300) extends Auth with Logging with Product with Serializable

    Permalink

    Implements DIGEST HTTP Authentication

    Implements DIGEST HTTP Authentication

    Mostly used the Wikipedia pages as references: http://en.wikipedia.org/wiki/Digest_access_authentication

    NOTE: Use at your own risk. We make no claim that any of this Crypto code is correct.

  7. final case class DomainRedirectFilter(host: String) extends RequestFilter with Product with Serializable

    Permalink

    If the request host doesn't match the host param then redirect

  8. final case class ErrorHandlerRequestRouter(router: RequestRouter, errorHandler: RequestHandler)(implicit ec: ExecutionContext) extends RequestRouter with Logging with Product with Serializable

    Permalink
  9. final case class FileResponse(status: Status, headers: Headers, file: File) extends Response with FileMessage with Product with Serializable

    Permalink

    This represents a File that we want to send back to the user

  10. final case class FilteredRequestHandler(handler: RequestHandler, filter: RequestFilter) extends RequestHandler with Product with Serializable

    Permalink
  11. final case class FilteredRequestRouter(router: RequestRouter, filter: RequestFilter) extends RequestRouter with Product with Serializable

    Permalink
  12. final case class FullResponse(status: Status, headers: Headers = Headers.empty, buf: ByteBuf = Unpooled.EMPTY_BUFFER) extends Response with FullMessage with Product with Serializable

    Permalink

    This represents a full HTTP Response (both headers and complete body)

  13. final case class HttpContentChunkedInput(input: ChunkedInput[ByteBuf]) extends ChunkedInput[HttpContent] with Product with Serializable

    Permalink

    Takes a ChunkedInput[ByteBuf] and turns it into a ChunkedInput[HttpContent] so the NettyContentCompressor works

  14. final case class HttpServer(port: Int = 8080, router: RequestRouter, authKey: String) extends Logging with Product with Serializable

    Permalink
  15. abstract class HttpServerApp extends Logging

    Permalink
  16. final case class InputStreamResponse(status: Status, headers: Headers, input: InputStream, length: Option[Long]) extends Response with InputStreamMessage with Product with Serializable

    Permalink

    This represents an InputStream that we want to send back to the user

  17. final case class MultiRequestRouter(routers: Seq[RequestRouter]) extends RequestRouter with Product with Serializable

    Permalink
  18. final class NettyContentCompressor extends HttpContentCompressor

    Permalink

    A Mime-Type aware HttpContentCompressor that won't compress content that shouldn't be compressed

  19. final class NettyHttpServerPipelineHandler extends SimpleChannelInboundHandler[HttpObject] with Logging

    Permalink

    Each connection has once instance of this Handler created which means it can be used to track state if needed.

  20. final case class OrElseRequestRouter(a: RequestRouter, b: RequestRouter) extends RequestRouter with Product with Serializable

    Permalink
  21. final class ReloadingClassLoader extends ClassLoader

    Permalink

    WARNING: This CANNOT be a case class because we need the equals method to check for reference equality in case instances of this class are stored in HashMaps (e.g.

    WARNING: This CANNOT be a case class because we need the equals method to check for reference equality in case instances of this class are stored in HashMaps (e.g. in scala.reflect.runtime.JavaMirrors). Otherwise 2 ReloadingClassLoader with the same argument will look equal to each other even though they have loaded different versions of classes. This will cause stuff like:

    java.lang.ClassCastException: fm.catalog.website.CatalogSite cannot be cast to fm.catalog.website.CatalogSite

  22. final class ReloadingClassLoaderHolder extends ClassLoader with Logging

    Permalink

    Holds a reference to a ReloadingClassLoader

    Holds a reference to a ReloadingClassLoader

    I forget why this originally extended URLClassLoader. I think it might be because some code out there expects the ClassLoader to be a URLClassLoader.

    WARNING: See the warning in ReloadingClassLoader about why this is NOT a case class

  23. final case class ReloadingRequestRouter(className: String, reloadablePackages: Seq[String], parent: ClassLoader = ..., debug: Boolean = false) extends RequestRouter with Logging with Product with Serializable

    Permalink

    A RequestRouter that wraps another RequestRouter which will reload classes that change on the fly.

    A RequestRouter that wraps another RequestRouter which will reload classes that change on the fly.

    For best results limit the scope of the reloadablePackages.

  24. final class Request extends Logging with Closeable

    Permalink
  25. trait RequestFilter extends AnyRef

    Permalink
  26. type RequestHandler = (Request) ⇒ Future[Response]

    Permalink
  27. trait RequestLocal[T] extends AnyRef

    Permalink

    Like a ThreadLocal except for Requests

  28. trait RequestRouter extends AnyRef

    Permalink
  29. abstract class RequestRouterBase extends RequestRouter

    Permalink

    Adds wrappers around the lifecycle calls to ensure they only get called once

  30. trait RequestRouterProxy extends RequestRouter

    Permalink

    Proxies to another RequestRouter

  31. sealed trait Response extends Message

    Permalink
  32. implicit final class RichRequestHandler extends AnyVal

    Permalink
  33. final case class SingleHandlerRequestRouter(handler: RequestHandler) extends RequestRouter with Product with Serializable

    Permalink

    A RequestRouter that always returns the same handler which should be useful for 404 pages

  34. final case class StaticClasspathFileHandler(root: File, devMode: Boolean, classLoader: ClassLoader) extends StaticFileHandlerBase with Logging with Product with Serializable

    Permalink
  35. final case class StaticFileHandler(root: File, devMode: Boolean) extends StaticFileHandlerBase with Product with Serializable

    Permalink
  36. trait StaticFileHandlerBase extends RequestRouter

    Permalink
  37. final case class VirtualHostRequestRouter(map: Map[String, RequestRouter]) extends RequestRouter with Product with Serializable

    Permalink

    A RequestRouter that will dispatch to another RequestRouter based on the virtual host name.

    A RequestRouter that will dispatch to another RequestRouter based on the virtual host name.

    Note: The most specific match wins

    Map( "frugalmechanic.com" -> ??? // Matches just "frugalmechanic.com" "*.frugalmechanic.com" -> ??? // Matches any.level.of.sub.domain.frugalmechanic.com (unless there are other more explicit entries) "*" -> ??? // Default catch all )

Value Members

  1. object BasicAuth extends Serializable

    Permalink
  2. object ControlHandler extends Serializable

    Permalink
  3. object DigestAuth extends Serializable

    Permalink
  4. object EmptyRequestRouter extends RequestRouter with Product with Serializable

    Permalink
  5. object HttpServer extends Serializable

    Permalink
  6. object NettyContentCompressor

    Permalink
  7. object NettyHttpServerPipelineHandler

    Permalink
  8. object ReloadingClassLoaderHolder

    Permalink
  9. object Request

    Permalink
  10. object RequestFilter

    Permalink
  11. object RequestHandler

    Permalink
  12. object RequestRouter

    Permalink
  13. object Response

    Permalink
  14. object RouteMatchers

    Permalink
  15. object StaticClasspathFileHandler extends Serializable

    Permalink
  16. object StaticFileHandler extends Serializable

    Permalink
  17. implicit def toNettyFutureWrapper[T](f: Future[T]): NettyFutureWrapper[T]

    Permalink
    Definition Classes
    PackageImplicits
  18. implicit def toNettyPromiseWrapper[T](p: Promise[T]): NettyPromiseWrapper[T]

    Permalink
    Definition Classes
    PackageImplicits

Inherited from PackageImplicits

Inherited from AnyRef

Inherited from Any

Ungrouped