Package io.grpc.netty
Class ClientTransportLifecycleManager
- java.lang.Object
-
- io.grpc.netty.ClientTransportLifecycleManager
-
final class ClientTransportLifecycleManager extends java.lang.ObjectMaintainer of transport lifecycle status.
-
-
Field Summary
Fields Modifier and Type Field Description private ManagedClientTransport.Listenerlistenerprivate StatusshutdownStatusnull iff !transportShutdown.private java.lang.ThrowableshutdownThrowablenull iff !transportShutdown.private booleantransportInUseprivate booleantransportReadyprivate booleantransportShutdownprivate booleantransportTerminated
-
Constructor Summary
Constructors Constructor Description ClientTransportLifecycleManager(ManagedClientTransport.Listener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributesfilterAttributes(Attributes attributes)StatusgetShutdownStatus()java.lang.ThrowablegetShutdownThrowable()voidnotifyGracefulShutdown(Status s)Marks transport as shutdown, but does not set the error status.voidnotifyInUse(boolean inUse)voidnotifyReady()booleannotifyShutdown(Status s)Returnstrueif was the first shutdown.voidnotifyTerminated(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)
Returnstrueif 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()
-
-