/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */

package test.fixtures.basicannotations;

import java.util.*;

public class MyServicePrioParentReactiveBlockingWrapper 
  implements MyServicePrioParent {
  private final MyServicePrioParent.Reactive _delegate;

  public MyServicePrioParentReactiveBlockingWrapper(MyServicePrioParent.Reactive _delegate) {
    
    this._delegate = _delegate;
  }

  public MyServicePrioParentReactiveBlockingWrapper(org.apache.thrift.ProtocolId _protocolId, reactor.core.publisher.Mono<? extends com.facebook.thrift.client.RpcClient> _rpcClient, Map<String, String> _headers, Map<String, String> _persistentHeaders) {
    this(new MyServicePrioParentReactiveClient(_protocolId, _rpcClient, _headers, _persistentHeaders));
  }

  @java.lang.Override
  public void close() {
    _delegate.dispose();
  }

  @java.lang.Override
  public void ping() throws org.apache.thrift.TException {
      pingWrapper(com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void ping(
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      pingWrapper(rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> pingWrapper(
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.pingWrapper(rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }
  @java.lang.Override
  public void pong() throws org.apache.thrift.TException {
      pongWrapper(com.facebook.thrift.client.RpcOptions.EMPTY);
  }

  @java.lang.Override
  public void pong(
        com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      pongWrapper(rpcOptions);
  }

  @java.lang.Override
  public com.facebook.thrift.client.ResponseWrapper<Void> pongWrapper(
    com.facebook.thrift.client.RpcOptions rpcOptions) throws org.apache.thrift.TException {
      try {
        return _delegate.pongWrapper(rpcOptions).block();
      } catch (Throwable t) {
        throw com.facebook.thrift.util.ExceptionUtil.wrap(t);
      }
  }

}
