Package io.grpc.protobuf.services
Class HealthCheckingLoadBalancerFactory.SubchannelImpl
- java.lang.Object
-
- io.grpc.LoadBalancer.Subchannel
-
- io.grpc.util.ForwardingSubchannel
-
- io.grpc.protobuf.services.HealthCheckingLoadBalancerFactory.SubchannelImpl
-
- Enclosing class:
- HealthCheckingLoadBalancerFactory
static final class HealthCheckingLoadBalancerFactory.SubchannelImpl extends ForwardingSubchannel
-
-
Field Summary
Fields Modifier and Type Field Description (package private) LoadBalancer.Subchannel
delegate
(package private) HealthCheckingLoadBalancerFactory.HealthCheckState
hcState
-
Constructor Summary
Constructors Constructor Description SubchannelImpl(LoadBalancer.Subchannel delegate, HealthCheckingLoadBalancerFactory.HealthCheckState hcState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LoadBalancer.Subchannel
delegate()
Returns the underlying Subchannel.void
start(LoadBalancer.SubchannelStateListener listener)
Starts the Subchannel.-
Methods inherited from class io.grpc.util.ForwardingSubchannel
asChannel, getAllAddresses, getAttributes, getChannelLogger, getConnectedAddressAttributes, getInternalSubchannel, requestConnection, shutdown, toString, updateAddresses
-
Methods inherited from class io.grpc.LoadBalancer.Subchannel
getAddresses
-
-
-
-
Field Detail
-
delegate
final LoadBalancer.Subchannel delegate
-
hcState
final HealthCheckingLoadBalancerFactory.HealthCheckState hcState
-
-
Constructor Detail
-
SubchannelImpl
SubchannelImpl(LoadBalancer.Subchannel delegate, HealthCheckingLoadBalancerFactory.HealthCheckState hcState)
-
-
Method Detail
-
delegate
protected LoadBalancer.Subchannel delegate()
Description copied from class:ForwardingSubchannel
Returns the underlying Subchannel.- Specified by:
delegate
in classForwardingSubchannel
-
start
public void start(LoadBalancer.SubchannelStateListener listener)
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.
-
-