Package io.grpc.internal
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.void
transportInUse
(boolean inUse) Called whenever the transport's in-use state has changed.void
The transport is ready to accept traffic, because the connection is established.void
The transport is shutting down.void
The transport completed shutting down.
-
Constructor Details
-
DelayedTransportListener
private DelayedTransportListener()
-
-
Method Details
-
transportShutdown
Description copied from interface:ManagedClientTransport.Listener
The 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(io.grpc.MethodDescriptor<?, ?>, io.grpc.Metadata, io.grpc.CallOptions, io.grpc.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(io.grpc.Status)
being called.This is called exactly once, and must be called prior to
ManagedClientTransport.Listener.transportTerminated()
.- Specified by:
transportShutdown
in interfaceManagedClientTransport.Listener
- Parameters:
s
- the reason for the shutdown.
-
transportReady
public void transportReady()Description copied from interface:ManagedClientTransport.Listener
The 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:
transportReady
in interfaceManagedClientTransport.Listener
-
filterTransport
Description copied from interface:ManagedClientTransport.Listener
Called just beforeManagedClientTransport.Listener.transportReady()
to allow direct modification of transport Attributes.- Specified by:
filterTransport
in interfaceManagedClientTransport.Listener
-
transportInUse
public void transportInUse(boolean inUse) Description copied from interface:ManagedClientTransport.Listener
Called whenever the transport's in-use state has changed. A transport is in-use when it has at least one stream.- Specified by:
transportInUse
in interfaceManagedClientTransport.Listener
-
transportTerminated
public void transportTerminated()Description copied from interface:ManagedClientTransport.Listener
The 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(io.grpc.MethodDescriptor<?, ?>, io.grpc.Metadata, io.grpc.CallOptions, io.grpc.ClientStreamTracer[])
as long as it doesn't own the new streams.This is called exactly once, and must be called after
ManagedClientTransport.Listener.transportShutdown(io.grpc.Status)
has been called.- Specified by:
transportTerminated
in interfaceManagedClientTransport.Listener
-