Liking cljdoc? Tell your friends :D

finagle-clojure.builder.server

Functions for creating and altering com.twitter.finagle.Server objects independent of any particular codec. Generally speaking codec-specific server functions should be preferred, but these are included for comptability with older systems configured at the server level.

Functions for creating and altering `com.twitter.finagle.Server` objects independent
of any particular codec. Generally speaking codec-specific server functions
should be preferred, but these are included for comptability with older systems
configured at the server level.
raw docstring

bind-toclj

(bind-to b p)

Configures the given ServerBuilder with a port.

Arguments:

  • b: a ServerBuilder
  • p: the port number to bind this server to

Returns:

a bound ServerBuilder

Configures the given ServerBuilder with a port.

*Arguments*:

  * `b`: a ServerBuilder
  * `p`: the port number to bind this server to

*Returns*:

  a bound ServerBuilder
sourceraw docstring

buildclj

(build b svc)

Given a completed ServerBuilder and a Service, constructs an Server which is capable of responding to requests.

Arguments:

  • b: a ServerBuilder
  • svc: the Service this server will use to respond to requests

Returns:

a running instance of [[com.twitter.finagle.builder.Server]]

Given a completed `ServerBuilder` and a `Service`, constructs an `Server` which is capable of
responding to requests.

*Arguments*:

  * `b`: a ServerBuilder
  * `svc`: the Service this server will use to respond to requests

*Returns*:

  a running instance of [[com.twitter.finagle.builder.Server]]
sourceraw docstring

builderclj

(builder)

A handy Builder for constructing Servers (i.e., binding Services to a port). The ServerBuilder requires the definition of codec, bind-to and named.

The main class to use is [[com.twitter.finagle.builder.ServerBuilder]], as so:

  (-> (builder)
      (named "servicename")
      (bind-to 3000)
      (build some-service))

Arguments:

  • None.

Returns:

a new instance of [[com.twitter.finagle.builder.ServerBuilder]].

A handy Builder for constructing Servers (i.e., binding Services to a port).
The `ServerBuilder` requires the definition of `codec`, `bind-to` and `named`.

The main class to use is [[com.twitter.finagle.builder.ServerBuilder]], as so:

```
  (-> (builder)
      (named "servicename")
      (bind-to 3000)
      (build some-service))
```

*Arguments*:

  * None.

*Returns*:

  a new instance of [[com.twitter.finagle.builder.ServerBuilder]].
sourceraw docstring

close!clj

(close! server)

Stops the given Server.

Arguments:

  • server: an instance of [[com.twitter.finagle.builder.Server]]

Returns:

a Future that closes when the server stops

Stops the given Server.

*Arguments*:

  * `server`: an instance of [[com.twitter.finagle.builder.Server]]

*Returns*:

  a Future that closes when the server stops
sourceraw docstring

codecclj

(codec b cdc)

Configures the given ServerBuilder with a codec.

Arguments:

  • b: a ServerBuilder
  • cdc: a Codec, CodecFactory, or Function1 that defines the server codec

Returns:

a ServerBuilder configured with the given codec

Configures the given ServerBuilder with a codec.

*Arguments*:

  * `b`: a ServerBuilder
  * `cdc`: a Codec, CodecFactory, or Function1 that defines the server codec

*Returns*:

  a ServerBuilder configured with the given codec
sourceraw docstring

max-concurrent-requestsclj

(max-concurrent-requests b mcr)

Configures the given ServerBuilder to accept a maximum number of concurrent requests.

Arguments:

  • b: a ServerBuilder
  • mcr: the maximum number of concurrent requests

Returns:

a ServerBuilder configured with a maximum number of concurrent requests

Configures the given ServerBuilder to accept a maximum number of concurrent requests.

*Arguments*:

  * `b`: a ServerBuilder
  * `mcr`: the maximum number of concurrent requests

*Returns*:

  a ServerBuilder configured with a maximum number of concurrent requests
sourceraw docstring

namedclj

(named b name)

Configures the given ServerBuilder with a name.

Arguments:

  • b: a ServerBuilder
  • name: the name of this server

Returns:

a named ServerBuilder

Configures the given ServerBuilder with a name.

*Arguments*:

  * `b`: a ServerBuilder
  * `name`: the name of this server

*Returns*:

  a named ServerBuilder
sourceraw docstring

report-toclj

(report-to b rcvr)

Configures the given ServerBuilder to report to a stats receiver.

Arguments:

  • b: a ServerBuilder
  • rcvr: a StatsReceiver

Returns:

a ServerBuilder configured with the given stats receiver

Configures the given ServerBuilder to report to a stats receiver.

*Arguments*:

  * `b`: a ServerBuilder
  * `rcvr`: a StatsReceiver

*Returns*:

  a ServerBuilder configured with the given stats receiver
sourceraw docstring

request-timeoutclj

(request-timeout b d)

Configures the given ServerBuilder with a request timeout.

Arguments:

  • b: a ServerBuilder
  • d: the duration of the request timeout for this server

Returns:

a ServerBuilder configured with the given timeout

Configures the given ServerBuilder with a request timeout.

*Arguments*:

  * `b`: a ServerBuilder
  * `d`: the duration of the request timeout for this server

*Returns*:

  a ServerBuilder configured with the given timeout
sourceraw docstring

tracerclj

(tracer b tracer)

Configures the given ServerBuilder to use a Tracer.

Arguments:

  • b: a ServerBuilder
  • tracer: a Tracer

Returns:

a ServerBuilder configured with the given tracer

Configures the given ServerBuilder to use a Tracer.

*Arguments*:

  * `b`: a ServerBuilder
  * `tracer`: a Tracer

*Returns*:

  a ServerBuilder configured with the given tracer
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close