S
- the concrete type of this stub.C
- the service descriptor typepublic abstract class AbstractStub<S extends AbstractStub<?,?>,C extends AbstractServiceDescriptor<C>> extends Object
This is the base class of the stub classes from the generated code. It allows for reconfiguration, e.g., attaching interceptors to the stub.
Modifier and Type | Class and Description |
---|---|
class |
AbstractStub.StubConfigBuilder
Utility class for (re) configuring the operations in a stub.
|
Modifier and Type | Field and Description |
---|---|
protected Channel |
channel |
protected C |
config |
Modifier | Constructor and Description |
---|---|
protected |
AbstractStub(Channel channel,
C config)
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
protected abstract S |
build(Channel channel,
C config)
Returns a new stub with the given channel for the provided method configurations.
|
AbstractStub.StubConfigBuilder |
configureNewStub()
Creates a builder for reconfiguring the stub.
|
Channel |
getChannel()
The underlying channel of the stub.
|
protected C |
getServiceDescriptor() |
protected final Channel channel
protected final C extends AbstractServiceDescriptor<C> config
protected C getServiceDescriptor()
public AbstractStub.StubConfigBuilder configureNewStub()
public Channel getChannel()