public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; execute_result result = new execute_result(); if (e instanceof DRPCExecutionException) { result.e = (DRPCExecutionException) e; result.set_e_isSet(true); msg = result; } else if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(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 Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return get_success(); case E: return get_e(); } throw new IllegalStateException(); }
public int compareTo(execute_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; execute_result typedOther = (execute_result)other; lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_e()).compareTo(typedOther.is_set_e()); if (lastComparison != 0) { return lastComparison; } if (is_set_e()) { lastComparison = org.apache.thrift7.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } } return 0; }
lastComparison = Boolean.valueOf(is_set_success()).compareTo(other.is_set_success()); if (lastComparison != 0) { return lastComparison; if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { lastComparison = Boolean.valueOf(is_set_e()).compareTo(other.is_set_e()); if (lastComparison != 0) { return lastComparison; if (is_set_e()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { lastComparison = Boolean.valueOf(is_set_aze()).compareTo(other.is_set_aze()); if (lastComparison != 0) { return lastComparison; if (is_set_aze()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aze, other.aze); if (lastComparison != 0) {
public void onError(Exception e) { byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; org.apache.thrift.TBase msg; execute_result result = new execute_result(); if (e instanceof DRPCExecutionException) { result.e = (DRPCExecutionException) e; result.set_e_isSet(true); msg = result; } else if (e instanceof AuthorizationException) { result.aze = (AuthorizationException) e; result.set_aze_isSet(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 int compareTo(execute_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; execute_result typedOther = (execute_result)other; lastComparison = Boolean.valueOf(is_set_success()).compareTo(typedOther.is_set_success()); if (lastComparison != 0) { return lastComparison; } if (is_set_success()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(is_set_e()).compareTo(typedOther.is_set_e()); if (lastComparison != 0) { return lastComparison; } if (is_set_e()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.e, typedOther.e); if (lastComparison != 0) { return lastComparison; } } return 0; }
public boolean equals(execute_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.is_set_e(); boolean that_present_e = true && that.is_set_e(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } boolean this_present_aze = true && this.is_set_aze(); boolean that_present_aze = true && that.is_set_aze(); if (this_present_aze || that_present_aze) { if (!(this_present_aze && that_present_aze)) return false; if (!this.aze.equals(that.aze)) return false; } return true; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((String)value); } break; case E: if (value == null) { unset_e(); } else { set_e((DRPCExecutionException)value); } break; case AZE: if (value == null) { unset_aze(); } else { set_aze((AuthorizationException)value); } break; } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, execute_result struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.is_set_success()) { optionals.set(0); } if (struct.is_set_e()) { optionals.set(1); } if (struct.is_set_aze()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.is_set_success()) { oprot.writeString(struct.success); } if (struct.is_set_e()) { struct.e.write(oprot); } if (struct.is_set_aze()) { struct.aze.write(oprot); } }
public boolean equals(execute_result that) { if (that == null) return false; boolean this_present_success = true && this.is_set_success(); boolean that_present_success = true && that.is_set_success(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.is_set_e(); boolean that_present_e = true && that.is_set_e(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (is_set_success()); list.add(present_success); if (present_success) list.add(success); boolean present_e = true && (is_set_e()); list.add(present_e); if (present_e) list.add(e); boolean present_aze = true && (is_set_aze()); list.add(present_aze); if (present_aze) list.add(aze); return list.hashCode(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unset_success(); } else { set_success((String)value); } break; case E: if (value == null) { unset_e(); } else { set_e((DRPCExecutionException)value); } break; } }
public String recv_execute() throws DRPCExecutionException, AuthorizationException, org.apache.thrift.TException { execute_result result = new execute_result(); receiveBase(result, "execute"); if (result.is_set_success()) { return result.success; } if (result.e != null) { throw result.e; } if (result.aze != null) { throw result.aze; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "execute failed: unknown result"); }
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { oprot.writeStructBegin(STRUCT_DESC); if (this.is_set_success()) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); oprot.writeString(this.success); oprot.writeFieldEnd(); } else if (this.is_set_e()) { oprot.writeFieldBegin(E_FIELD_DESC); this.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public execute_result deepCopy() { return new execute_result(this); }
/** 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 SUCCESS: return is_set_success(); case E: return is_set_e(); case AZE: return is_set_aze(); } throw new IllegalStateException(); }
public execute_result deepCopy() { return new execute_result(this); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_success = true && (is_set_success()); builder.append(present_success); if (present_success) builder.append(success); boolean present_e = true && (is_set_e()); builder.append(present_e); if (present_e) builder.append(e); return builder.toHashCode(); }
/** * Performs a deep copy on <i>other</i>. */ public execute_result(execute_result other) { if (other.is_set_success()) { this.success = other.success; } if (other.is_set_e()) { this.e = new DRPCExecutionException(other.e); } if (other.is_set_aze()) { this.aze = new AuthorizationException(other.aze); } }
public void onComplete(String o) { execute_result result = new execute_result(); result.success = o; 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) {