Package io.grpc.netty
Class ClientTransportLifecycleManager
- java.lang.Object
-
- io.grpc.netty.ClientTransportLifecycleManager
-
final class ClientTransportLifecycleManager extends java.lang.Object
Maintainer of transport lifecycle status.
-
-
Field Summary
Fields Modifier and Type Field Description private ManagedClientTransport.Listener
listener
private Status
shutdownStatus
null iff !transportShutdown.private java.lang.Throwable
shutdownThrowable
null iff !transportShutdown.private boolean
transportInUse
private boolean
transportReady
private boolean
transportShutdown
private boolean
transportTerminated
-
Constructor Summary
Constructors Constructor Description ClientTransportLifecycleManager(ManagedClientTransport.Listener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attributes
filterAttributes(Attributes attributes)
Status
getShutdownStatus()
java.lang.Throwable
getShutdownThrowable()
void
notifyGracefulShutdown(Status s)
Marks transport as shutdown, but does not set the error status.void
notifyInUse(boolean inUse)
void
notifyReady()
boolean
notifyShutdown(Status s)
Returnstrue
if was the first shutdown.void
notifyTerminated(Status s)
-
-
-
Field Detail
-
listener
private final ManagedClientTransport.Listener listener
-
transportReady
private boolean transportReady
-
transportShutdown
private boolean transportShutdown
-
transportInUse
private boolean transportInUse
-
shutdownStatus
private Status shutdownStatus
null iff !transportShutdown.
-
shutdownThrowable
private java.lang.Throwable shutdownThrowable
null iff !transportShutdown.
-
transportTerminated
private boolean transportTerminated
-
-
Constructor Detail
-
ClientTransportLifecycleManager
public ClientTransportLifecycleManager(ManagedClientTransport.Listener listener)
-
-
Method Detail
-
filterAttributes
public Attributes filterAttributes(Attributes attributes)
-
notifyReady
public void notifyReady()
-
notifyGracefulShutdown
public void notifyGracefulShutdown(Status s)
Marks transport as shutdown, but does not set the error status. This must eventually be followed by a call to notifyShutdown.
-
notifyShutdown
@CanIgnoreReturnValue public boolean notifyShutdown(Status s)
Returnstrue
if was the first shutdown.
-
notifyInUse
public void notifyInUse(boolean inUse)
-
notifyTerminated
public void notifyTerminated(Status s)
-
getShutdownStatus
public Status getShutdownStatus()
-
getShutdownThrowable
public java.lang.Throwable getShutdownThrowable()
-
-