Packages

case class Environment(codecs: Codecs, values: Values) extends Product with Serializable

A collection of codecs and values, which can be populated and then served over RPC.

Example:

val env: Environment = Environment.empty
  .codec[Int]
  .codec[List[Int]]
  .populate { _
     .declareStrict[List[Int] => Int]("sum", _.sum)
     .declare("fac", (n: Int) => Task { (1 to n).product })
  }
val stopper = env.serve(new InetSocketAddress("localhost",8080))
///
stopper() // shutdown the server
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Environment
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Environment(codecs: Codecs, values: Values)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def codec[A](implicit T: scala.reflect.api.JavaUniverse.TypeTag[A], C: Codec[A]): Environment
  7. val codecs: Codecs
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  15. def populate(f: (Values) ⇒ Values): Environment

    Modify the values inside this Environment, using the given function f.

    Modify the values inside this Environment, using the given function f. Example: Environment.empty.populate { _.declare("x")(Task.now(42)) }.

  16. def serve(addr: InetSocketAddress, strategy: Strategy = Strategy.DefaultStrategy, numBossThreads: Option[Int] = None, numWorkerThreads: Option[Int] = None, monitoring: Monitoring = Monitoring.empty, capabilities: Capabilities = Capabilities.default, sslParams: Option[SslParameters] = None): Task[Task[Unit]]

    start a netty server listening to the given address

    start a netty server listening to the given address

    addr

    the address to bind to

    strategy

    the strategy used for processing incoming requests

    numBossThreads

    number of boss threads to create. These are threads which accept incoming connection requests and assign connections to a worker. If unspecified, the default of 2 will be used

    numWorkerThreads

    number of worker threads to create. If unspecified the default of 2 * number of cores will be used

  17. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  18. def values(v: Values): Environment

    Alias for this.populate(_ => v).

  19. val values: Values
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped