public Object getFieldValue(_Fields field) { switch (field) { case CLI_EXCEPTION: return getCliException(); } throw new IllegalStateException(); }
@Override public int compareTo(shutdown_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetCliException()).compareTo(other.isSetCliException()); if (lastComparison != 0) { return lastComparison; } if (isSetCliException()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cliException, other.cliException); if (lastComparison != 0) { return lastComparison; } } return 0; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public void read(org.apache.thrift.protocol.TProtocol iprot, shutdown_result struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // CLI_EXCEPTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.cliException = new CliThriftException(); struct.cliException.read(iprot); struct.setCliExceptionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }
public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; shutdown_result result = new shutdown_result(); if (e instanceof CliThriftException) { result.cliException = (CliThriftException) e; result.setCliExceptionIsSet(true); msg = result; } else { msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); } try { fcall.sendResponse(fb,msg,msgType,seqid); return; } catch (Exception ex) { LOGGER.error("Exception writing to internal frame buffer", ex); } fb.close(); } };
public shutdown_result deepCopy() { return new shutdown_result(this); }
/** * Performs a deep copy on <i>other</i>. */ public shutdown_result(shutdown_result other) { if (other.isSetCliException()) { this.cliException = new CliThriftException(other.cliException); } }
public shutdown_result getResult(I iface, shutdown_args args) throws org.apache.thrift.TException { shutdown_result result = new shutdown_result(); try { iface.shutdown(); } catch (CliThriftException cliException) { result.cliException = cliException; } return result; } }
public void recv_shutdown() throws CliThriftException, org.apache.thrift.TException { shutdown_result result = new shutdown_result(); receiveBase(result, "shutdown"); if (result.cliException != null) { throw result.cliException; } return; }
public boolean equals(shutdown_result that) { if (that == null) return false; boolean this_present_cliException = true && this.isSetCliException(); boolean that_present_cliException = true && that.isSetCliException(); if (this_present_cliException || that_present_cliException) { if (!(this_present_cliException && that_present_cliException)) return false; if (!this.cliException.equals(that.cliException)) return false; } return true; }
public void onComplete(Void o) { shutdown_result result = new shutdown_result(); try { fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); return; } catch (Exception e) { LOGGER.error("Exception writing to internal frame buffer", e); } fb.close(); } public void onError(Exception e) {
public void write(org.apache.thrift.protocol.TProtocol oprot, shutdown_result struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.cliException != null) { oprot.writeFieldBegin(CLI_EXCEPTION_FIELD_DESC); struct.cliException.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof shutdown_result) return this.equals((shutdown_result)that); return false; }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case CLI_EXCEPTION: return isSetCliException(); } throw new IllegalStateException(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, shutdown_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetCliException()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetCliException()) { struct.cliException.write(oprot); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, shutdown_result struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.cliException = new CliThriftException(); struct.cliException.read(iprot); struct.setCliExceptionIsSet(true); } } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case CLI_EXCEPTION: if (value == null) { unsetCliException(); } else { setCliException((CliThriftException)value); } break; } }
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_cliException = true && (isSetCliException()); list.add(present_cliException); if (present_cliException) list.add(cliException); return list.hashCode(); }