Class/Object

remotely

Environment

Related Docs: object Environment | package remotely

Permalink

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)

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    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

    Permalink
  7. val codecs: Codecs

    Permalink
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. def populate(f: (Values) ⇒ Values): Environment

    Permalink

    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]]

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  18. def values(v: Values): Environment

    Permalink

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

  19. val values: Values

    Permalink
  20. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped