java.lang.Object
io.helidon.grpc.server.ServiceDescriptor
Encapsulates all metadata necessary to create and deploy a gRPC service.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAllows users to specify that they would like to have access to aServiceDescriptorwithin theirServerInterceptorimplementation.static final classAServiceDescriptorbuilder.static interfaceAn interface implemented by classs that can configure aServiceDescriptor.Rules.static interfaceFluent configuration interface for theServiceDescriptor. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.grpc.Context.Key<ServiceDescriptor>TheContext.Keyto use to obtain theServiceDescriptor. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceDescriptor.Builderbuilder(io.grpc.BindableService service) Create aServiceDescriptor.Builder.static ServiceDescriptor.Builderbuilder(GrpcService service) Create aServiceDescriptor.Builder.static ServiceDescriptor.BuilderCreate aServiceDescriptor.Builder.context()Return context map.booleanfullName()Returns the service name prefixed with package directive if one exists.inthashCode()Return aHealthCheckfor this service.PriorityBag<io.grpc.ServerInterceptor>Return service interceptors.ReturnMethodDescriptorfor a specified method name.methods()Return service methods.name()Return service name.Returns package name from proto file.com.google.protobuf.Descriptors.FileDescriptorproto()Return a proto file descriptor.toString()
-
Field Details
-
SERVICE_DESCRIPTOR_KEY
TheContext.Keyto 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
ReturnMethodDescriptorfor 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 aHealthCheckfor 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- theClassrepresenting the servicename- the name of the service- Returns:
- a
ServiceDescriptor.Builder
-
builder
Create aServiceDescriptor.Builder.- Parameters:
service- theGrpcServiceto use to initialise the builder- Returns:
- a
ServiceDescriptor.Builder
-
builder
Create aServiceDescriptor.Builder.- Parameters:
service- theBindableServiceto use to initialise the builder- Returns:
- a
ServiceDescriptor.Builder
-