@Override
 public void closed(final Status status) {
   timeout.cancel(true);
   if (status.isOk()) {
     listener.onComplete();
   } else {
     serverCallState.cancel();
     listener.onCancel();
   }
 }
  @Override
  public void onReady() {
    if (serverCallState.isCancelled()) {
      return;
    }

    listener.onReady();
  }
  @Override
  public void halfClosed() {
    if (serverCallState.isCancelled()) {
      return;
    }

    listener.onHalfClose();
  }
  @Override
  public void messageRead(final InputStream inputStream) {
    if (serverCallState.isCancelled()) {
      return;
    }

    try {
      ServerTransportManager.set(serverTransport);

      final RequestT request = methodDescriptor.parseRequest(inputStream);
      listener.onMessage(request);
    } finally {
      try {
        inputStream.close();
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
    }
  }