Package io.helidon.grpc.client
Class ClientServiceDescriptor
- java.lang.Object
-
- io.helidon.grpc.client.ClientServiceDescriptor
-
public class ClientServiceDescriptor extends Object
Encapsulates all details about a client side gRPC service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientServiceDescriptor.Builder
AClientServiceDescriptor
builder.static interface
ClientServiceDescriptor.Rules
Fluent configuration interface for theClientServiceDescriptor
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientServiceDescriptor.Builder
builder(io.grpc.BindableService service)
Create aClientServiceDescriptor.Builder
from aBindableService
.static ClientServiceDescriptor.Builder
builder(io.grpc.ServiceDescriptor service)
Create aClientServiceDescriptor.Builder
from aServiceDescriptor
.static ClientServiceDescriptor.Builder
builder(Class<?> serviceClass)
Create aClientServiceDescriptor.Builder
form a name and type.static ClientServiceDescriptor.Builder
builder(String serviceName, Class<?> serviceClass)
Create aClientServiceDescriptor.Builder
form a name and type.io.grpc.CallCredentials
callCredentials()
Return theCallCredentials
set on this service.static ClientServiceDescriptor
create(io.grpc.BindableService service)
Create aClientServiceDescriptor
from aBindableService
.static ClientServiceDescriptor
create(io.grpc.ServiceDescriptor descriptor)
Create aClientServiceDescriptor
from aServiceDescriptor
.PriorityBag<io.grpc.ClientInterceptor>
interceptors()
Return service interceptors.ClientMethodDescriptor
method(String name)
ReturnClientMethodDescriptor
for a specified method getName.Collection<ClientMethodDescriptor>
methods()
Return the collections of methods that make up this service.String
name()
Obtain the service name.String
toString()
-
-
-
Method Detail
-
create
public static ClientServiceDescriptor create(io.grpc.ServiceDescriptor descriptor)
Create aClientServiceDescriptor
from aServiceDescriptor
.- Parameters:
descriptor
- theServiceDescriptor
- Returns:
- a
ClientServiceDescriptor
-
create
public static ClientServiceDescriptor create(io.grpc.BindableService service)
Create aClientServiceDescriptor
from aBindableService
.- Parameters:
service
- the BindableService- Returns:
- a
ClientServiceDescriptor
-
builder
public static ClientServiceDescriptor.Builder builder(io.grpc.ServiceDescriptor service)
Create aClientServiceDescriptor.Builder
from aServiceDescriptor
.- Parameters:
service
- theServiceDescriptor
- Returns:
- a
ClientServiceDescriptor.Builder
-
builder
public static ClientServiceDescriptor.Builder builder(io.grpc.BindableService service)
Create aClientServiceDescriptor.Builder
from aBindableService
.- Parameters:
service
- theBindableService
- Returns:
- a
ClientServiceDescriptor.Builder
-
builder
public static ClientServiceDescriptor.Builder builder(Class<?> serviceClass)
Create aClientServiceDescriptor.Builder
form a name and type.The
class simple name
will be used for the service name.- Parameters:
serviceClass
- the service class- Returns:
- a
ClientServiceDescriptor.Builder
-
builder
public static ClientServiceDescriptor.Builder builder(String serviceName, Class<?> serviceClass)
Create aClientServiceDescriptor.Builder
form a name and type.- Parameters:
serviceName
- the getName of the service to use to initialise the builderserviceClass
- the service class- Returns:
- a
ClientServiceDescriptor.Builder
-
name
public String name()
Obtain the service name.- Returns:
- the service name
-
method
public ClientMethodDescriptor method(String name)
ReturnClientMethodDescriptor
for a specified method getName.- Parameters:
name
- method getName- Returns:
- method getDescriptor for the specified getName
-
methods
public Collection<ClientMethodDescriptor> methods()
Return the collections of methods that make up this service.- Returns:
- service methods
-
interceptors
public PriorityBag<io.grpc.ClientInterceptor> interceptors()
Return service interceptors.- Returns:
- service interceptors
-
callCredentials
public io.grpc.CallCredentials callCredentials()
Return theCallCredentials
set on this service.- Returns:
- the
CallCredentials
set on this service
-
-