Class ManagedChannelImpl.DelayedTransportListener
java.lang.Object
io.grpc.internal.ManagedChannelImpl.DelayedTransportListener
- All Implemented Interfaces:
ManagedClientTransport.Listener
- Enclosing class:
ManagedChannelImpl
private final class ManagedChannelImpl.DelayedTransportListener
extends Object
implements ManagedClientTransport.Listener
Called from syncContext.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterTransport(Attributes attributes) Called just beforeManagedClientTransport.Listener.transportReady()to allow direct modification of transport Attributes.voidtransportInUse(boolean inUse) Called whenever the transport's in-use state has changed.voidThe transport is ready to accept traffic, because the connection is established.voidThe transport is shutting down.voidThe transport completed shutting down.
-
Constructor Details
-
DelayedTransportListener
private DelayedTransportListener()
-
-
Method Details
-
transportShutdown
Description copied from interface:ManagedClientTransport.ListenerThe transport is shutting down. This transport will stop owning new streams, but existing streams may continue, and the transport may still be able to processClientTransport.newStream(MethodDescriptor, Metadata, CallOptions, ClientStreamTracer[])as long as it doesn't own the new streams. Shutdown could have been caused by an error or normal operation. It is possible that this method is called withoutManagedClientTransport.shutdown(Status)being called.This is called exactly once, and must be called prior to
ManagedClientTransport.Listener.transportTerminated().- Specified by:
transportShutdownin interfaceManagedClientTransport.Listener- Parameters:
s- the reason for the shutdown.
-
transportReady
public void transportReady()Description copied from interface:ManagedClientTransport.ListenerThe transport is ready to accept traffic, because the connection is established. This is called at most once.Streams created before this milestone are not guaranteed to function.
- Specified by:
transportReadyin interfaceManagedClientTransport.Listener
-
filterTransport
Description copied from interface:ManagedClientTransport.ListenerCalled just beforeManagedClientTransport.Listener.transportReady()to allow direct modification of transport Attributes.- Specified by:
filterTransportin interfaceManagedClientTransport.Listener
-
transportInUse
public void transportInUse(boolean inUse) Description copied from interface:ManagedClientTransport.ListenerCalled whenever the transport's in-use state has changed. A transport is in-use when it has at least one stream.- Specified by:
transportInUsein interfaceManagedClientTransport.Listener
-
transportTerminated
public void transportTerminated()Description copied from interface:ManagedClientTransport.ListenerThe transport completed shutting down. All resources have been released. All streams have either been closed or transferred off this transport. This transport may still be able to processClientTransport.newStream(MethodDescriptor, Metadata, CallOptions, ClientStreamTracer[])as long as it doesn't own the new streams.This is called exactly once, and must be called after
ManagedClientTransport.Listener.transportShutdown(Status)has been called.- Specified by:
transportTerminatedin interfaceManagedClientTransport.Listener
-