Trait

com.avsystem.commons.rpc

RPCFramework

Related Doc: package rpc

Permalink

trait RPCFramework extends AnyRef

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RPCFramework
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait AsRawRPC[T] extends AnyRef

    Permalink
  2. trait AsRealRPC[T] extends AnyRef

    Permalink
  3. trait BaseFullRPCInfo[T] extends AnyRef

    Permalink

    Base trait for traits or classes "implementing" FullRPCInfo in various RPC frameworks.

    Base trait for traits or classes "implementing" FullRPCInfo in various RPC frameworks. Having a separate subtrait/subclass for every framework is beneficial for ScalaJS DCE.

  4. abstract type FullRPCInfo[T] <: BaseFullRPCInfo[T]

    Permalink

    This type must be defined as trait or class by an RPCFramework in order to be able to use it's RPCCompanion.

    This type must be defined as trait or class by an RPCFramework in order to be able to use it's RPCCompanion. The fact that every RPCFramework may define its own trait or class for FullRPCInfo helps ScalaJS DCE distinguish between instances of AsRawRPC, AsRealRPC and RPCMetadata for different frameworks and to get rid of unused instances.

    Example:
    1. object SomeRPCFramework extends RPCFramework {
        abstract class FullRPCInfo[T] extends BaseFullRPCInfo[T]
        ...
      }
  5. case class ParamMetadata(name: String, annotations: List[MetadataAnnotation], typeMetadata: ParamTypeMetadata[_]) extends Product with Serializable

    Permalink
  6. abstract type ParamTypeMetadata[T]

    Permalink
  7. abstract class RPCCompanion[T] extends AnyRef

    Permalink

    Convenience abstract class for companion objects of RPC interfaces.

    Convenience abstract class for companion objects of RPC interfaces. Makes sure all three RPC type classes (AsRawRPC, AsRealRPC and RPCMetadata) are macro-materialized for that RPC interface and confines macro materialization to the same compilation unit where the RPC interface is defined. This is a good practice to avoid incremental compilation problems and duplication of macro-generated code in various callsites. In order to be able to use RPCCompanion, the RPC framework must define FullRPCInfo as a trait or class. Additionally, some special wizardry has been employed to make sure that when an RPC interface is a part of shared (cross-compiled) code of a ScalaJS application then ScalaJS optimizer can remove unused instances of macro generated typeclasses.

    Example:
    1. object SomeRPCFramework extends StandardRPCFramework { ... }
      @RPC trait SomeRPC {
        def doSomething(str: String): Unit
        def callSomething(int: Int): Future[String]
      }
      object SomeRPC extends SomeRPCFramework.RPCCompanion[SomeRPC]
  8. trait RPCMetadata[T] extends AnyRef

    Permalink
  9. trait RawInvocationHandler[Real] extends AnyRef

    Permalink
    Annotations
    @implicitNotFound( ... )
  10. abstract type RawRPC

    Permalink
  11. trait RawRPCUtils extends AnyRef

    Permalink
  12. abstract type RawValue

    Permalink
  13. abstract type Reader[T]

    Permalink
  14. trait RealInvocationHandler[Real, Raw] extends AnyRef

    Permalink
    Annotations
    @implicitNotFound( ... )
  15. abstract type ResultTypeMetadata[T]

    Permalink
  16. case class Signature(methodName: String, paramMetadata: List[List[ParamMetadata]], resultTypeMetadata: ResultTypeMetadata[_], annotations: List[MetadataAnnotation]) extends Product with Serializable

    Permalink
  17. abstract type Writer[T]

    Permalink

Abstract Value Members

  1. abstract def read[T](raw: RawValue)(implicit arg0: Reader[T]): T

    Permalink
  2. abstract def write[T](value: T)(implicit arg0: Writer[T]): RawValue

    Permalink

Concrete 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. object AsRawRPC

    Permalink
  5. object AsRealRPC

    Permalink
  6. object RPCMetadata

    Permalink
  7. object RawInvocationHandler

    Permalink
  8. object RealInvocationHandler

    Permalink
  9. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. implicit macro def implicitlyMaterializeAsRaw[T]: AsRawRPC[T]

    Permalink
  17. implicit macro def implicitlyMaterializeAsReal[T]: AsRealRPC[T]

    Permalink
  18. implicit macro def implicitlyMaterializeMetadata[T]: RPCMetadata[T]

    Permalink
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. macro def materializeAsRaw[T]: AsRawRPC[T]

    Permalink

    Materializes a factory of implementations of RawRPC which translate invocations of its raw methods to invocations of actual methods on rpcImpl.

    Materializes a factory of implementations of RawRPC which translate invocations of its raw methods to invocations of actual methods on rpcImpl. Method arguments and results are serialized and deserialized from/to RawValue using Reader and Writer typeclasses.

  21. macro def materializeAsReal[T]: AsRealRPC[T]

    Permalink

    Materializes a factory of implementations of T which are proxies that implement all abstract methods of T by forwarding them to rawRpc.

    Materializes a factory of implementations of T which are proxies that implement all abstract methods of T by forwarding them to rawRpc. Method arguments and results are serialized and deserialized from/to RawValue using Reader and Writer typeclasses.

  22. implicit macro def materializeFullInfo[T]: FullRPCInfo[T]

    Permalink
  23. macro def materializeMetadata[T]: RPCMetadata[T]

    Permalink
  24. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. macro def tryToRaw[Real, Raw](real: Real): Raw

    Permalink

    INTERNAL API

  30. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped