public interface GrpcServiceName
Represents a gRPC service name.
A gRPC service is uniquely identified by its fully qualified name composed of a package and a service name: <package>.<service_name>
.
- Since:
- 1.9
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionReturns the fully qualified name of the service.Returns the package of the service.Returns the name of the service.methodPath
(String method) Returns the path to the specified service method.static GrpcServiceName
Creates a gRPC service name from the specified fully qualified name.static GrpcServiceName
Creates a gRPC service name from the specified package and service names.
-
Method Details
-
of
Creates a gRPC service name from the specified fully qualified name.
- Parameters:
fullyQualifiedName
- a fully qualified name- Returns:
- a gRPC service name
- Throws:
IllegalArgumentException
- if the specified name is not valid gRPC full identifier
-
of
Creates a gRPC service name from the specified package and service names.
- Parameters:
packageName
- the package nameserviceName
- the service name- Returns:
- a gRPC service name
- Throws:
IllegalArgumentException
- if the specified names are not valid gRPC identifier
-
getServiceName
String getServiceName()Returns the name of the service.
- Returns:
- the service name
-
getPackageName
String getPackageName()Returns the package of the service.
- Returns:
- the package name
-
getFullyQualifiedName
String getFullyQualifiedName()Returns the fully qualified name of the service.
- Returns:
- the service fully qualified name
-
methodPath
Returns the path to the specified service method.
The path to a service method is always absolute and obtained from the service fully qualified name and the method name:
/<package>.<service_name>/<method_name>
.- Parameters:
method
- a service method- Returns:
- a path to a service method
-