All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clickzetta.platform.client.ResponseProxyStreamObserver Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
package com.clickzetta.platform.client;

import io.grpc.stub.StreamObserver;

public class ResponseProxyStreamObserver extends AbstractStreamObserver {

  private final StreamObserver realStreamObserver;

  public ResponseProxyStreamObserver(StreamObserver realStreamObserver) {
    this.realStreamObserver = realStreamObserver;
  }

  @Override
  public void onNext(Resp response) {
    realStreamObserver.onNext(response);
  }

  @Override
  public void onError(Throwable throwable) {
    realStreamObserver.onError(throwable);
  }

  @Override
  public void onCompleted() {
    realStreamObserver.onCompleted();
  }

  @Override
  public void handleOnNext(Resp response) {
    throw new UnsupportedOperationException("not support in WrapResponseStreamObserver.");
  }

  @Override
  public void handleOnError(ErrorStatus errorStatus, Throwable throwable) {
    throw new UnsupportedOperationException("not support in WrapResponseStreamObserver.");
  }

  @Override
  public void handleOnCompleted() {
    throw new UnsupportedOperationException("not support in WrapResponseStreamObserver.");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy