@ThreadSafe public final class ChannelImpl extends Channel
Constructor and Description |
---|
ChannelImpl(ClientTransportFactory transportFactory,
ExecutorService executor) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTerminated(long timeout,
TimeUnit unit)
Waits for the channel to become terminated, giving up if the timeout is reached.
|
boolean |
isShutdown()
Returns whether the channel is shutdown.
|
boolean |
isTerminated()
Returns whether the channel is terminated.
|
<ReqT,RespT> |
newCall(MethodDescriptor<ReqT,RespT> method)
Creates a new outgoing call on the channel.
|
ChannelImpl |
shutdown()
Initiates an orderly shutdown in which preexisting calls continue but new calls are immediately
cancelled.
|
ChannelImpl |
shutdownNow()
Initiates a forceful shutdown in which preexisting and new calls are cancelled.
|
public ChannelImpl(ClientTransportFactory transportFactory, ExecutorService executor)
public ChannelImpl shutdown()
public ChannelImpl shutdownNow()
isTerminated()
will likely
return false
immediately after this method returns.
NOT YET IMPLEMENTED. This method currently behaves identically to shutdown().
public boolean isShutdown()
shutdown()
,
isTerminated()
public boolean awaitTerminated(long timeout, TimeUnit unit) throws InterruptedException
isTerminated()
.InterruptedException
public boolean isTerminated()
isShutdown()
public <ReqT,RespT> Call<ReqT,RespT> newCall(MethodDescriptor<ReqT,RespT> method)