t

com.avsystem.commons.rpc

RPCFramework

trait RPCFramework extends AnyRef

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. type AsRawRPC[RealRPC] = AsRaw[RawRPC, RealRPC]
  2. type AsRawRealRPC[RealRPC] = AsRawReal[RawRPC, RealRPC]
  3. type AsRealRPC[RealRPC] = AsReal[RawRPC, RealRPC]
  4. trait BaseFullRPCInfo[RealRPC] extends AnyRef

    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.

  5. trait BaseRawRpcCompanion extends RawRpcCompanion[RawRPC]
  6. abstract type FullRPCInfo[RealRPC] <: BaseFullRPCInfo[RealRPC]

    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[RealRPC] extends BaseFullRPCInfo[RealRPC]
        ...
      }
  7. case class ParamMetadata[T](name: String, annotations: List[MetadataAnnotation], typeMetadata: ParamTypeMetadata[T]) extends TypedMetadata[T] with Product with Serializable
  8. abstract type ParamTypeMetadata[T]
  9. abstract class RPCCompanion[RealRPC] extends AnyRef

    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]
  10. abstract type RPCMetadata[RealRPC]
  11. case class RawInvocation(rpcName: String, args: List[RawValue]) extends Product with Serializable
  12. abstract type RawRPC
  13. abstract type RawValue
  14. abstract type Reader[T]
  15. abstract type ResultTypeMetadata[T]
  16. trait Signature extends AnyRef
  17. abstract type Writer[T]

Abstract Value Members

  1. abstract val RPCMetadata: RpcMetadataCompanion[RPCMetadata]
  2. abstract val RawRPC: BaseRawRpcCompanion
  3. abstract def read[T](raw: RawValue)(implicit arg0: Reader[T]): T
  4. abstract def write[T](value: T)(implicit arg0: Writer[T]): RawValue

Concrete 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
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. macro def materializeAsRaw[T]: AsRawRPC[T]

    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.

  13. macro def materializeAsRawReal[T]: AsRawRealRPC[T]
  14. macro def materializeAsReal[T]: AsRealRPC[T]

    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.

  15. implicit macro def materializeFullInfo[T]: FullRPCInfo[T]
  16. macro def materializeMetadata[RealRPC]: RPCMetadata[RealRPC]
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. implicit def readerBasedAsReal[T](implicit arg0: Reader[T]): AsReal[RawValue, T]
  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  26. implicit def writerBasedAsRaw[T](implicit arg0: Writer[T]): AsRaw[RawValue, T]
  27. object AsRawRPC
  28. object AsRawRealRPC
  29. object AsRealRPC
  30. object RawInvocation extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped