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 java.lang.Object implements ManagedClientTransport.Listener
Called from syncContext.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateDelayedTransportListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributesfilterTransport(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.voidtransportReady()The transport is ready to accept traffic, because the connection is established.voidtransportShutdown(Status s)The transport is shutting down.voidtransportTerminated()The transport completed shutting down.
-
-
-
Method Detail
-
transportShutdown
public void transportShutdown(Status s)
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(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:
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
public Attributes filterTransport(Attributes attributes)
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(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:
transportTerminatedin interfaceManagedClientTransport.Listener
-
-