diff options
Diffstat (limited to 'Dozentenmodul/src/thrift/SessionData.java')
| -rw-r--r-- | Dozentenmodul/src/thrift/SessionData.java | 108 |
1 files changed, 104 insertions, 4 deletions
diff --git a/Dozentenmodul/src/thrift/SessionData.java b/Dozentenmodul/src/thrift/SessionData.java index 98ef43b4..51f0f80b 100644 --- a/Dozentenmodul/src/thrift/SessionData.java +++ b/Dozentenmodul/src/thrift/SessionData.java @@ -37,6 +37,7 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1); private static final org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authToken", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField SERVER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("serverAddress", org.apache.thrift.protocol.TType.STRING, (short)3); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -46,11 +47,13 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session public String sessionId; // required public String authToken; // required + public String serverAddress; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SESSION_ID((short)1, "sessionId"), - AUTH_TOKEN((short)2, "authToken"); + AUTH_TOKEN((short)2, "authToken"), + SERVER_ADDRESS((short)3, "serverAddress"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -69,6 +72,8 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session return SESSION_ID; case 2: // AUTH_TOKEN return AUTH_TOKEN; + case 3: // SERVER_ADDRESS + return SERVER_ADDRESS; default: return null; } @@ -116,6 +121,8 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "ID"))); tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token"))); + tmpMap.put(_Fields.SERVER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("serverAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SessionData.class, metaDataMap); } @@ -125,11 +132,13 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session public SessionData( String sessionId, - String authToken) + String authToken, + String serverAddress) { this(); this.sessionId = sessionId; this.authToken = authToken; + this.serverAddress = serverAddress; } /** @@ -142,6 +151,9 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session if (other.isSetAuthToken()) { this.authToken = other.authToken; } + if (other.isSetServerAddress()) { + this.serverAddress = other.serverAddress; + } } public SessionData deepCopy() { @@ -152,6 +164,7 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session public void clear() { this.sessionId = null; this.authToken = null; + this.serverAddress = null; } public String getSessionId() { @@ -202,6 +215,30 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session } } + public String getServerAddress() { + return this.serverAddress; + } + + public SessionData setServerAddress(String serverAddress) { + this.serverAddress = serverAddress; + return this; + } + + public void unsetServerAddress() { + this.serverAddress = null; + } + + /** Returns true if field serverAddress is set (has been assigned a value) and false otherwise */ + public boolean isSetServerAddress() { + return this.serverAddress != null; + } + + public void setServerAddressIsSet(boolean value) { + if (!value) { + this.serverAddress = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case SESSION_ID: @@ -220,6 +257,14 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session } break; + case SERVER_ADDRESS: + if (value == null) { + unsetServerAddress(); + } else { + setServerAddress((String)value); + } + break; + } } @@ -231,6 +276,9 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session case AUTH_TOKEN: return getAuthToken(); + case SERVER_ADDRESS: + return getServerAddress(); + } throw new IllegalStateException(); } @@ -246,6 +294,8 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session return isSetSessionId(); case AUTH_TOKEN: return isSetAuthToken(); + case SERVER_ADDRESS: + return isSetServerAddress(); } throw new IllegalStateException(); } @@ -281,6 +331,15 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session return false; } + boolean this_present_serverAddress = true && this.isSetServerAddress(); + boolean that_present_serverAddress = true && that.isSetServerAddress(); + if (this_present_serverAddress || that_present_serverAddress) { + if (!(this_present_serverAddress && that_present_serverAddress)) + return false; + if (!this.serverAddress.equals(that.serverAddress)) + return false; + } + return true; } @@ -317,6 +376,16 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session return lastComparison; } } + lastComparison = Boolean.valueOf(isSetServerAddress()).compareTo(other.isSetServerAddress()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerAddress()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverAddress, other.serverAddress); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -352,6 +421,14 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session sb.append(this.authToken); } first = false; + if (!first) sb.append(", "); + sb.append("serverAddress:"); + if (this.serverAddress == null) { + sb.append("null"); + } else { + sb.append(this.serverAddress); + } + first = false; sb.append(")"); return sb.toString(); } @@ -411,6 +488,14 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 3: // SERVER_ADDRESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.serverAddress = iprot.readString(); + struct.setServerAddressIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -436,6 +521,11 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session oprot.writeString(struct.authToken); oprot.writeFieldEnd(); } + if (struct.serverAddress != null) { + oprot.writeFieldBegin(SERVER_ADDRESS_FIELD_DESC); + oprot.writeString(struct.serverAddress); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -460,19 +550,25 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session if (struct.isSetAuthToken()) { optionals.set(1); } - oprot.writeBitSet(optionals, 2); + if (struct.isSetServerAddress()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); if (struct.isSetSessionId()) { oprot.writeString(struct.sessionId); } if (struct.isSetAuthToken()) { oprot.writeString(struct.authToken); } + if (struct.isSetServerAddress()) { + oprot.writeString(struct.serverAddress); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(2); + BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.sessionId = iprot.readString(); struct.setSessionIdIsSet(true); @@ -481,6 +577,10 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session struct.authToken = iprot.readString(); struct.setAuthTokenIsSet(true); } + if (incoming.get(2)) { + struct.serverAddress = iprot.readString(); + struct.setServerAddressIsSet(true); + } } } |
