Package io.grpc.util
Class HealthProducerHelper.HealthProducerSubchannel
java.lang.Object
io.grpc.LoadBalancer.Subchannel
io.grpc.util.ForwardingSubchannel
io.grpc.util.HealthProducerHelper.HealthProducerSubchannel
- Enclosing class:
HealthProducerHelper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LoadBalancer.Subchannel
private final LoadBalancer.SubchannelStateListener
-
Constructor Summary
ConstructorsConstructorDescriptionHealthProducerSubchannel
(LoadBalancer.Subchannel delegate, LoadBalancer.SubchannelStateListener healthListener) -
Method Summary
Modifier and TypeMethodDescriptiondelegate()
Returns the underlying Subchannel.The same attributes passed toHelper.createSubchannel()
.void
start
(LoadBalancer.SubchannelStateListener listener) Starts the Subchannel.Methods inherited from class io.grpc.util.ForwardingSubchannel
asChannel, getAllAddresses, getChannelLogger, getConnectedAddressAttributes, getInternalSubchannel, requestConnection, shutdown, toString, updateAddresses
Methods inherited from class io.grpc.LoadBalancer.Subchannel
getAddresses
-
Field Details
-
delegate
-
healthListener
-
-
Constructor Details
-
HealthProducerSubchannel
HealthProducerSubchannel(LoadBalancer.Subchannel delegate, LoadBalancer.SubchannelStateListener healthListener)
-
-
Method Details
-
delegate
Description copied from class:ForwardingSubchannel
Returns the underlying Subchannel.- Specified by:
delegate
in classForwardingSubchannel
-
start
Description copied from class:LoadBalancer.Subchannel
Starts the Subchannel. Can only be called once.Must be called prior to any other method on this class, except for
LoadBalancer.Subchannel.shutdown()
which may be called at any time.Must be called from the
Synchronization Context
, otherwise it may throw. See #5015 for more discussions.- Overrides:
start
in classForwardingSubchannel
- Parameters:
listener
- receives state updates for this Subchannel.
-
getAttributes
Description copied from class:LoadBalancer.Subchannel
The same attributes passed toHelper.createSubchannel()
. LoadBalancer can use it to attach additional information here, e.g., the shard this Subchannel belongs to.- Overrides:
getAttributes
in classForwardingSubchannel
-