public class GrpcServerRequest<Req,Resp> extends GrpcReadStream<Req>
Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<GrpcServerRequest> |
__TYPE_ARG |
io.vertx.lang.rx.TypeArg<Req> |
__typeArg_0 |
io.vertx.lang.rx.TypeArg<Resp> |
__typeArg_1 |
Constructor and Description |
---|
GrpcServerRequest(GrpcServerRequest delegate) |
GrpcServerRequest(Object delegate,
io.vertx.lang.rx.TypeArg<Req> typeArg_0,
io.vertx.lang.rx.TypeArg<Resp> typeArg_1) |
Modifier and Type | Method and Description |
---|---|
<R,A> Single<R> |
collecting(java.util.stream.Collector<Req,A,R> collector)
Deprecated.
|
HttpConnection |
connection() |
GrpcServerRequest<Req,Resp> |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
boolean |
equals(Object o) |
GrpcServerRequest<Req,Resp> |
errorHandler(Handler<GrpcError> handler)
Set a handler to be notified with gRPC errors.
|
GrpcServerRequest<Req,Resp> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
GrpcServerRequest<Req,Resp> |
fetch(long amount)
Fetch the specified
amount of elements. |
String |
fullMethodName() |
GrpcServerRequest |
getDelegate() |
GrpcServerRequest<Req,Resp> |
handler(Handler<Req> handler)
Set a data handler.
|
int |
hashCode() |
GrpcReadStream<Req> |
invalidMessageHandler(Handler<InvalidMessageException> handler)
Set a message handler that is reported with invalid message errors.
|
Single<Req> |
last() |
GrpcServerRequest<Req,Resp> |
messageHandler(Handler<GrpcMessage> handler)
Set a handler to be notified with incoming encoded messages.
|
String |
methodName() |
static <Req,Resp> GrpcServerRequest<Req,Resp> |
newInstance(GrpcServerRequest arg) |
static <Req,Resp> GrpcServerRequest<Req,Resp> |
newInstance(GrpcServerRequest arg,
io.vertx.lang.rx.TypeArg<Req> __typeArg_Req,
io.vertx.lang.rx.TypeArg<Resp> __typeArg_Resp) |
GrpcServerRequest<Req,Resp> |
pause()
Pause the
ReadStream , it sets the buffer in fetch mode and clears the actual demand. |
Pipe<Req> |
pipe()
Pause this stream and return a to transfer the elements of this stream to a destination .
|
Completable |
pipeTo(WriteStream<Req> dst)
Pipe this
ReadStream to the WriteStream . |
GrpcServerResponse<Req,Resp> |
response() |
GrpcServerRequest<Req,Resp> |
resume()
Resume reading, and sets the buffer in
flowing mode. |
<R,A> Single<R> |
rxCollecting(java.util.stream.Collector<Req,A,R> collector)
Deprecated.
|
Single<Req> |
rxLast() |
Completable |
rxPipeTo(WriteStream<Req> dst)
Pipe this
ReadStream to the WriteStream . |
ServiceName |
serviceName() |
Flowable<Req> |
toFlowable() |
Observable<Req> |
toObservable() |
String |
toString() |
encoding, end, headers, newInstance, newInstance, rxEnd
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
newInstance, newInstance
newInstance
public static final io.vertx.lang.rx.TypeArg<GrpcServerRequest> __TYPE_ARG
public final io.vertx.lang.rx.TypeArg<Req> __typeArg_0
public final io.vertx.lang.rx.TypeArg<Resp> __typeArg_1
public GrpcServerRequest(GrpcServerRequest delegate)
public String toString()
toString
in class GrpcReadStream<Req>
public boolean equals(Object o)
equals
in class GrpcReadStream<Req>
public int hashCode()
hashCode
in class GrpcReadStream<Req>
public GrpcServerRequest getDelegate()
getDelegate
in interface ReadStream<Req>
getDelegate
in interface StreamBase
getDelegate
in class GrpcReadStream<Req>
public Observable<Req> toObservable()
toObservable
in interface ReadStream<Req>
toObservable
in class GrpcReadStream<Req>
public Flowable<Req> toFlowable()
toFlowable
in interface ReadStream<Req>
toFlowable
in class GrpcReadStream<Req>
public Pipe<Req> pipe()
WriteStream
.pipe
in interface ReadStream<Req>
pipe
in class GrpcReadStream<Req>
public Completable pipeTo(WriteStream<Req> dst)
ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
pipeTo
in interface ReadStream<Req>
pipeTo
in class GrpcReadStream<Req>
dst
- the destination write streampublic Completable rxPipeTo(WriteStream<Req> dst)
ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
rxPipeTo
in interface ReadStream<Req>
rxPipeTo
in class GrpcReadStream<Req>
dst
- the destination write streampublic Single<Req> last()
last
in class GrpcReadStream<Req>
public Single<Req> rxLast()
rxLast
in class GrpcReadStream<Req>
public ServiceName serviceName()
public String methodName()
public String fullMethodName()
public GrpcServerResponse<Req,Resp> response()
public GrpcServerRequest<Req,Resp> messageHandler(Handler<GrpcMessage> handler)
GrpcReadStream
handler
is
responsible for fully decoding incoming messages, including compression.messageHandler
in class GrpcReadStream<Req>
handler
- the message handlerpublic GrpcServerRequest<Req,Resp> errorHandler(Handler<GrpcError> handler)
GrpcReadStream
errorHandler
in class GrpcReadStream<Req>
handler
- the error handlerpublic GrpcServerRequest<Req,Resp> exceptionHandler(Handler<Throwable> handler)
ReadStream
exceptionHandler
in interface ReadStream<Req>
exceptionHandler
in interface StreamBase
exceptionHandler
in class GrpcReadStream<Req>
handler
- the exception handlerpublic GrpcServerRequest<Req,Resp> handler(Handler<Req> handler)
ReadStream
handler
in interface ReadStream<Req>
handler
in class GrpcReadStream<Req>
public GrpcServerRequest<Req,Resp> pause()
ReadStream
ReadStream
, it sets the buffer in fetch
mode and clears the actual demand.
While it's paused, no data will be sent to the data handler
.
pause
in interface ReadStream<Req>
pause
in class GrpcReadStream<Req>
public GrpcServerRequest<Req,Resp> resume()
ReadStream
flowing
mode.
If the ReadStream
has been paused, reading will recommence on it.resume
in interface ReadStream<Req>
resume
in class GrpcReadStream<Req>
public GrpcServerRequest<Req,Resp> fetch(long amount)
ReadStream
amount
of elements. If the ReadStream
has been paused, reading will
recommence with the specified amount
of items, otherwise the specified amount
will
be added to the current stream demand.fetch
in interface ReadStream<Req>
fetch
in class GrpcReadStream<Req>
public GrpcServerRequest<Req,Resp> endHandler(Handler<Void> endHandler)
ReadStream
endHandler
in interface ReadStream<Req>
endHandler
in class GrpcReadStream<Req>
public HttpConnection connection()
public GrpcReadStream<Req> invalidMessageHandler(Handler<InvalidMessageException> handler)
Warning: setting this handler overwrite the default handler which takes appropriate measure when an invalid message is encountered such as cancelling the stream. This handler should be set when control over invalid messages is required.
invalidMessageHandler
in class GrpcReadStream<Req>
handler
- the invalid message handler@Deprecated public <R,A> Single<R> collecting(java.util.stream.Collector<Req,A,R> collector)
collecting
in class GrpcReadStream<Req>
collector
- @Deprecated public <R,A> Single<R> rxCollecting(java.util.stream.Collector<Req,A,R> collector)
rxCollecting
in class GrpcReadStream<Req>
collector
- public static <Req,Resp> GrpcServerRequest<Req,Resp> newInstance(GrpcServerRequest arg)
public static <Req,Resp> GrpcServerRequest<Req,Resp> newInstance(GrpcServerRequest arg, io.vertx.lang.rx.TypeArg<Req> __typeArg_Req, io.vertx.lang.rx.TypeArg<Resp> __typeArg_Resp)
Copyright © 2024 Eclipse. All rights reserved.