For example, you can receive bidirectional streaming incoming messages with the following code.
public class DataService extends DataServiceGrpc.DataServiceImplBase {
@Override
public StreamObserver<DataReq> send(StreamObserver<DataResp> responseObserver) {
return new StreamObserver<DataReq>() {
@Override
public void onNext(DataReq value) {
}
@Override
public void onError(Throwable t) {
}
@Override
public void onCompleted() {
}
};
}
}
And say I have some other classes like this to catch each in-coming gRPC messages.
If I want to capture and control all the in-coming messages before these classes receive them, what is the standard way to achieve the goal?