Package

com.markfeeney

circlet

Permalink

package circlet

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. circlet
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Cont = (Option[Response]) ⇒ Sent.type

    Permalink
  2. type Handler = (Request) ⇒ (Cont) ⇒ Sent.type

    Permalink
  3. sealed trait HttpMethod extends AnyRef

    Permalink
  4. case class JettyOptions(join: Boolean = true, host: Option[String] = None, httpPort: Int = 80, maxThreads: Int = 50, minThreads: Int = 8, daemonThreads: Boolean = false, configFn: (Server) ⇒ Unit = _ =>, maxIdleTime: Int = 200000, allowHttp: Boolean = true, allowSsl: Boolean = false, sslPort: Int = 443, sendDateHeader: Boolean = true, outputBufferSize: Int = 32768, requestHeaderSize: Int = 8192, responseHeaderSize: Int = 8192, sendServerVersion: Boolean = true, keyStore: Option[SslStoreConfig] = None, keyStorePassword: Option[String] = None, trustStore: Option[SslStoreConfig] = None, trustStorePassword: Option[String] = None, clientAuth: Option[ClientAuth] = None, excludeCiphers: Vector[String] = Vector.empty, excludeProtocols: Vector[String] = Vector.empty) extends Product with Serializable

    Permalink

    Options for configuring Jetty.

    Options for configuring Jetty.

    join

    If true, calls join() on Server instance (blocking till server shuts down)

    host

    The network interface connectors will bind to. If None or 0.0.0.0, binds to all interfaces.

    httpPort

    A ServerConnector will be created listening on this port.

    maxThreads

    Max threads in the threadpool used by connectors to run (eventually) the handler.

    minThreads

    Minimum threads to keep alive in the Jetty threadpool.

    daemonThreads

    If true, all threads in Jetty's threadpool will be daemon threads.

    configFn

    A function to mess around with the Server instance before start is called.

    maxIdleTime

    The max idle time for a connection (roughly Socket.setSoTimeout(int))

    allowHttp

    If true an HTTP connector is setup listening on port

    allowSsl

    If true an SSL connector is setup listing on sslPort

    sslPort

    The port to listen for SSL connections if enableSsl is true.

    sendDateHeader

    If true, include date in HTTP headers

    outputBufferSize

    The size of the buffer into which the response is aggregated before being sent to the client. Larger buffer is less likely to block content producer, but could increase from client's perspective.

    requestHeaderSize

    Max size of a request header. Larger sizes allow for more cookies or stuff encoded in a URL.

    responseHeaderSize

    Max size of a response header. Similar use cases as requestHeaderSize.

    sendServerVersion

    If true, send the Server header in responses.

    keyStore

    Specifies the keystore (private certs) to use for SSL connections

    keyStorePassword

    Password for keystore

    trustStore

    Specifies the keystore (public certs) to use for SSL connections

    trustStorePassword

    Password for trustStore

    clientAuth

    Policy for client SSL authentication (i.e. Need/Want).

    excludeCiphers

    Cipher suites to exclude when using SSL

    excludeProtocols

    Protocols to exclude when using SSL

  5. type Middleware = (Handler) ⇒ Handler

    Permalink
  6. case class Request(serverPort: Int, serverName: String, remoteAddr: String, uri: String, queryString: Option[String] = None, scheme: Scheme = Scheme.Http, requestMethod: HttpMethod = HttpMethod.Get, protocol: String = "HTTP/1.1", sslClientCert: Option[X509Certificate] = None, headers: Map[String, String] = Map.empty, body: Option[InputStream] = None, attrs: Map[String, AnyRef] = Map.empty) extends Product with Serializable

    Permalink

    Basic request.

    Basic request. Modeled after Request Map in https://github.com/ring-clojure/ring/blob/master/SPEC

    serverPort

    The port on which the request is being handled.

    serverName

    The resolved server name, or the server IP address.

    remoteAddr

    The IP address of the client or the last proxy that sent the request.

    uri

    The request URI, excluding the query string and the "?" separator. Must start with "/".

    queryString

    The query string, if present.

    scheme

    The transport protocol.

    requestMethod

    The transport protocol.

    protocol

    The protocol the request was made with, e.g. "HTTP/1.1"

    sslClientCert

    The SSL client certificate, if supplied.

    headers

    A map of lowercased header names to corresponding values.

    body

    The request body, if present.

    attrs

    Other info tacked on to the request.

  7. case class Response(status: Int = 200, headers: Map[String, Vector[String]] = Map.empty, body: Option[ResponseBody] = None, attrs: Map[String, AnyRef] = Map.empty) extends Product with Serializable

    Permalink

    Basic response.

    Basic response. Modeled after Response Map in https://github.com/ring-clojure/ring/blob/master/SPEC

    status

    The HTTP status code, must be greater than or equal to 100.

    headers

    A map of HTTP header names to header values. These values may be either Strings, in which case one name/value header will be sent in the HTTP response, or a seq of Strings, in which case a name/value header will be sent for each such String value.

    body

    A representation of the response body, if a response body is appropriate for the response's status code.

    attrs

    Extra key/value data attached the the response.

  8. sealed trait ResponseBody extends AnyRef

    Permalink
  9. sealed trait Scheme extends AnyRef

    Permalink

Value Members

  1. object Circlet

    Permalink
  2. object Cleanly

    Permalink

    Do a thing with guaranteed cleanup: http://stackoverflow.com/a/8865994/69689 aka Using aka ARM aka try-with-resource

  3. object HttpMethod

    Permalink
  4. object HttpParse

    Permalink

    Helper regexs for parsing HTTP.

    Helper regexs for parsing HTTP. see https://github.com/ring-clojure/ring/blob/01de0cf1bbab402905bc65789bebb9a7dc36d974/ring-core/src/ring/util/parsing.clj

  5. object JettyAdapter

    Permalink

    Functionality for running handlers on Jetty.

    Functionality for running handlers on Jetty. Largely a port of https://github.com/ring-clojure/ring/blob/4a3584570ad9e7b17f6b1c8a2a17934c1682f77d/ring-jetty-adapter/src/ring/adapter/jetty.clj

  6. object JettyOptions extends Serializable

    Permalink
  7. object Request extends Serializable

    Permalink
  8. object Response extends Serializable

    Permalink
  9. object ResponseBody

    Permalink
  10. object Scheme

    Permalink
  11. object Sent

    Permalink

    Signals a request is fully processed and response fully sent.

    Signals a request is fully processed and response fully sent. In a perfect world this would be returned only by server adapters when they're done sending the response. But it's useful any time you want to see the result of a handler executing (e.g. in tests).

  12. object Servlet

    Permalink

    Functionaliy for translating between Servlet world and Circlet world.

  13. object Util

    Permalink

    Grab-bag of functions used in multiple places.

  14. package middleware

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped