java.lang.Object
io.helidon.grpc.server.ServiceDescriptor
Encapsulates all metadata necessary to create and deploy a gRPC service.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Allows users to specify that they would like to have access to aServiceDescriptor
within theirServerInterceptor
implementation.static final class
AServiceDescriptor
builder.static interface
An interface implemented by classs that can configure aServiceDescriptor.Rules
.static interface
Fluent configuration interface for theServiceDescriptor
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final io.grpc.Context.Key<ServiceDescriptor>
TheContext.Key
to use to obtain theServiceDescriptor
. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceDescriptor.Builder
builder
(io.grpc.BindableService service) Create aServiceDescriptor.Builder
.static ServiceDescriptor.Builder
builder
(GrpcService service) Create aServiceDescriptor.Builder
.static ServiceDescriptor.Builder
Create aServiceDescriptor.Builder
.context()
Return context map.boolean
fullName()
Returns the service name prefixed with package directive if one exists.int
hashCode()
Return aHealthCheck
for this service.PriorityBag<io.grpc.ServerInterceptor>
Return service interceptors.ReturnMethodDescriptor
for a specified method name.methods()
Return service methods.name()
Return service name.Returns package name from proto file.com.google.protobuf.Descriptors.FileDescriptor
proto()
Return a proto file descriptor.toString()
-
Field Details
-
SERVICE_DESCRIPTOR_KEY
TheContext.Key
to use to obtain theServiceDescriptor
.
-
-
Method Details
-
name
Return service name.- Returns:
- service name
-
fullName
Returns the service name prefixed with package directive if one exists.- Returns:
- service name prefixed with package directive if one exists.
-
packageName
Returns package name from proto file.- Returns:
- package name from proto file
-
method
ReturnMethodDescriptor
for a specified method name.- Parameters:
name
- method name- Returns:
- method descriptor for the specified name
-
methods
Return service methods.- Returns:
- service methods
-
interceptors
Return service interceptors.- Returns:
- service interceptors
-
context
Return context map.- Returns:
- context map
-
healthCheck
Return aHealthCheck
for this service.- Returns:
- a health check
-
proto
public com.google.protobuf.Descriptors.FileDescriptor proto()Return a proto file descriptor.- Returns:
- a proto file descriptor
-
toString
-
equals
-
hashCode
public int hashCode() -
builder
Create aServiceDescriptor.Builder
.- Parameters:
serviceClass
- theClass
representing the servicename
- the name of the service- Returns:
- a
ServiceDescriptor.Builder
-
builder
Create aServiceDescriptor.Builder
.- Parameters:
service
- theGrpcService
to use to initialise the builder- Returns:
- a
ServiceDescriptor.Builder
-
builder
Create aServiceDescriptor.Builder
.- Parameters:
service
- theBindableService
to use to initialise the builder- Returns:
- a
ServiceDescriptor.Builder
-