Module brave.rpc
Package brave.rpc

Class RpcRequest

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.String method()
      The unqualified, case-sensitive method name.
      abstract java.lang.String service()
      The fully-qualified, case-sensitive service path.
      java.lang.String toString()  
      abstract java.lang.Object unwrap()
      Returns the underlying rpc request object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • unwrap

        public abstract java.lang.Object unwrap()
        Returns the underlying rpc request object. Ex. org.apache.rpc.RpcRequest

        Note: Some implementations are composed of multiple types, such as a request and a socket address of the client. Moreover, an implementation may change the type returned due to refactoring. Unless you control the implementation, cast carefully (ex using instance of) instead of presuming a specific type will always be returned.

        Since:
        5.8
      • method

        @Nullable
        public abstract java.lang.String method()
        The unqualified, case-sensitive method name. Prefer the name defined in IDL to any mapped Java method name.

        Examples

        • gRPC - full method "grpc.health.v1.Health/Check" returns "Check"
        • Apache Dubbo - "demo.service.DemoService#sayHello()" command returns "sayHello"
        • Apache Thrift - full method "scribe.Log" returns "Log"

        Note: For IDL based services, such as Protocol Buffers, this may be different than the Java method name, or in a different case format.

        Returns:
        the RPC method name or null if unreadable.
      • service

        @Nullable
        public abstract java.lang.String service()
        The fully-qualified, case-sensitive service path. Prefer the name defined in IDL to any mapped Java package name.

        Examples

        • gRPC - full method "grpc.health.v1.Health/Check" returns "grpc.health.v1.Health"
        • Apache Dubbo - "demo.service.DemoService#sayHello()" command returns "demo.service.DemoService"
        • Apache Thrift - full method "scribe.Log" returns "scribe"

        Note: For IDL based services, such as Protocol Buffers, this may be different than the Java package name, or in a different case format. Also, this is the definition of the service, not its deployment service name.

        Returns:
        the RPC namespace or null if unreadable.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object