public interface ClientTransport
Stream instances for communication with the server.| Modifier and Type | Interface and Description |
|---|---|
static interface |
ClientTransport.Listener
Receives notifications for the transport life-cycle events.
|
| Modifier and Type | Method and Description |
|---|---|
ClientStream |
newStream(MethodDescriptor<?,?> method,
Metadata.Headers headers,
ClientStreamListener listener)
Creates a new stream for sending messages to the remote end-point.
|
void |
shutdown()
Initiates an orderly shutdown of the transport.
|
void |
start(ClientTransport.Listener listener)
Starts transport.
|
ClientStream newStream(MethodDescriptor<?,?> method, Metadata.Headers headers, ClientStreamListener listener)
This method returns immediately and does not wait for any validation of the request. If
creation fails for any reason, ClientStreamListener.closed(io.grpc.Status, io.grpc.Metadata.Trailers) will be called to provide
the error information. Any sent messages for this stream will be buffered until creation has
completed (either successfully or unsuccessfully).
method - the descriptor of the remote method to be called for this stream.headers - to send at the beginning of the calllistener - the listener for the newly created stream.IllegalStateException - if the service is already stopped.void start(ClientTransport.Listener listener)
listener until after start()
returns.listener - non-null listener of transport eventsvoid shutdown()
ClientTransport.Listener.transportShutdown() callback called).