diff options
author | Björn Hagemeister | 2014-11-12 15:01:39 +0100 |
---|---|---|
committer | Björn Hagemeister | 2014-11-12 15:01:39 +0100 |
commit | bcc7a3761ce5801d747653f6f97b094c9ccdbb45 (patch) | |
tree | 384c9331c2f0c99ce76608ab628ab02fa8772e7d /src | |
parent | Parametrized Enumerator. (diff) | |
download | master-sync-shared-bcc7a3761ce5801d747653f6f97b094c9ccdbb45.tar.gz master-sync-shared-bcc7a3761ce5801d747653f6f97b094c9ccdbb45.tar.xz master-sync-shared-bcc7a3761ce5801d747653f6f97b094c9ccdbb45.zip |
Added class for reading proxy setting from proxy configuration file.
Added class utils for some necessary tools, used in ProxyConfiguration.
Diffstat (limited to 'src')
20 files changed, 496 insertions, 1186 deletions
diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java index 965ddd2..0c2835d 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationError.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java index 5efc66c..bd4bb0b 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthenticationException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class AuthenticationException extends TException implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthenticationException> { +public class AuthenticationException extends TException implements org.apache.thrift.TBase<AuthenticationException, AuthenticationException._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthenticationException"); private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1); @@ -305,30 +303,30 @@ public class AuthenticationException extends TException implements org.apache.th return 0; } - @Override public int compareTo(AuthenticationException other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + AuthenticationException typedOther = (AuthenticationException)other; - lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber()); + lastComparison = Boolean.valueOf(isSetNumber()).compareTo(typedOther.isSetNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetNumber()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, typedOther.number); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java index a49ad92..61c5960 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationError.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java index 5f798ac..fec2e3e 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/AuthorizationException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<AuthorizationException> { +public class AuthorizationException extends TException implements org.apache.thrift.TBase<AuthorizationException, AuthorizationException._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AuthorizationException"); private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1); @@ -305,30 +303,30 @@ public class AuthorizationException extends TException implements org.apache.thr return 0; } - @Override public int compareTo(AuthorizationException other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + AuthorizationException typedOther = (AuthorizationException)other; - lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber()); + lastComparison = Boolean.valueOf(isSetNumber()).compareTo(typedOther.isSetNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetNumber()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, typedOther.number); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadData.java index 2dda1f7..8c038cf 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadData.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class DownloadData implements org.apache.thrift.TBase<DownloadData, DownloadData._Fields>, java.io.Serializable, Cloneable, Comparable<DownloadData> { +public class DownloadData implements org.apache.thrift.TBase<DownloadData, DownloadData._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DownloadData"); private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -155,7 +153,10 @@ public class DownloadData implements org.apache.thrift.TBase<DownloadData, Downl } this.port = other.port; if (other.isSetCrcSums()) { - List<Integer> __this__crcSums = new ArrayList<Integer>(other.crcSums); + List<Integer> __this__crcSums = new ArrayList<Integer>(); + for (Integer other_element : other.crcSums) { + __this__crcSums.add(other_element); + } this.crcSums = __this__crcSums; } } @@ -367,40 +368,40 @@ public class DownloadData implements org.apache.thrift.TBase<DownloadData, Downl return 0; } - @Override public int compareTo(DownloadData other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + DownloadData typedOther = (DownloadData)other; - lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken()); + lastComparison = Boolean.valueOf(isSetToken()).compareTo(typedOther.isSetToken()); if (lastComparison != 0) { return lastComparison; } if (isSetToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, typedOther.token); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort()); + lastComparison = Boolean.valueOf(isSetPort()).compareTo(typedOther.isSetPort()); if (lastComparison != 0) { return lastComparison; } if (isSetPort()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, typedOther.port); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCrcSums()).compareTo(other.isSetCrcSums()); + lastComparison = Boolean.valueOf(isSetCrcSums()).compareTo(typedOther.isSetCrcSums()); if (lastComparison != 0) { return lastComparison; } if (isSetCrcSums()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.crcSums, other.crcSums); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.crcSums, typedOther.crcSums); if (lastComparison != 0) { return lastComparison; } @@ -512,7 +513,7 @@ public class DownloadData implements org.apache.thrift.TBase<DownloadData, Downl struct.crcSums = new ArrayList<Integer>(_list8.size); for (int _i9 = 0; _i9 < _list8.size; ++_i9) { - int _elem10; + int _elem10; // required _elem10 = iprot.readI32(); struct.crcSums.add(_elem10); } @@ -621,7 +622,7 @@ public class DownloadData implements org.apache.thrift.TBase<DownloadData, Downl struct.crcSums = new ArrayList<Integer>(_list13.size); for (int _i14 = 0; _i14 < _list13.size; ++_i14) { - int _elem15; + int _elem15; // required _elem15 = iprot.readI32(); struct.crcSums.add(_elem15); } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadException.java index 46404b9..efc2448 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/DownloadException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class DownloadException extends TException implements org.apache.thrift.TBase<DownloadException, DownloadException._Fields>, java.io.Serializable, Cloneable, Comparable<DownloadException> { +public class DownloadException extends TException implements org.apache.thrift.TBase<DownloadException, DownloadException._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DownloadException"); private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1); @@ -305,30 +303,30 @@ public class DownloadException extends TException implements org.apache.thrift.T return 0; } - @Override public int compareTo(DownloadException other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + DownloadException typedOther = (DownloadException)other; - lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber()); + lastComparison = Boolean.valueOf(isSetNumber()).compareTo(typedOther.isSetNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetNumber()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, typedOther.number); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java index aeeb15b..b1c91fa 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ImageData implements org.apache.thrift.TBase<ImageData, ImageData._Fields>, java.io.Serializable, Cloneable, Comparable<ImageData> { +public class ImageData implements org.apache.thrift.TBase<ImageData, ImageData._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageData"); private static final org.apache.thrift.protocol.TField UUID_FIELD_DESC = new org.apache.thrift.protocol.TField("uuid", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -822,120 +820,120 @@ public class ImageData implements org.apache.thrift.TBase<ImageData, ImageData._ return 0; } - @Override public int compareTo(ImageData other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + ImageData typedOther = (ImageData)other; - lastComparison = Boolean.valueOf(isSetUuid()).compareTo(other.isSetUuid()); + lastComparison = Boolean.valueOf(isSetUuid()).compareTo(typedOther.isSetUuid()); if (lastComparison != 0) { return lastComparison; } if (isSetUuid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuid, other.uuid); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuid, typedOther.uuid); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRevision()).compareTo(other.isSetRevision()); + lastComparison = Boolean.valueOf(isSetRevision()).compareTo(typedOther.isSetRevision()); if (lastComparison != 0) { return lastComparison; } if (isSetRevision()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revision, other.revision); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revision, typedOther.revision); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTitle()).compareTo(other.isSetTitle()); + lastComparison = Boolean.valueOf(isSetTitle()).compareTo(typedOther.isSetTitle()); if (lastComparison != 0) { return lastComparison; } if (isSetTitle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, other.title); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.title, typedOther.title); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime()); + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); if (lastComparison != 0) { return lastComparison; } if (isSetCreateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, other.createTime); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createTime, typedOther.createTime); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime()); + lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(typedOther.isSetUpdateTime()); if (lastComparison != 0) { return lastComparison; } if (isSetUpdateTime()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, other.updateTime); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateTime, typedOther.updateTime); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOwnerLogin()).compareTo(other.isSetOwnerLogin()); + lastComparison = Boolean.valueOf(isSetOwnerLogin()).compareTo(typedOther.isSetOwnerLogin()); if (lastComparison != 0) { return lastComparison; } if (isSetOwnerLogin()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerLogin, other.ownerLogin); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ownerLogin, typedOther.ownerLogin); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperatingSystem()).compareTo(other.isSetOperatingSystem()); + lastComparison = Boolean.valueOf(isSetOperatingSystem()).compareTo(typedOther.isSetOperatingSystem()); if (lastComparison != 0) { return lastComparison; } if (isSetOperatingSystem()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatingSystem, other.operatingSystem); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operatingSystem, typedOther.operatingSystem); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(other.isSetIsValid()); + lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(typedOther.isSetIsValid()); if (lastComparison != 0) { return lastComparison; } if (isSetIsValid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isValid, other.isValid); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isValid, typedOther.isValid); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetIsDeleted()).compareTo(other.isSetIsDeleted()); + lastComparison = Boolean.valueOf(isSetIsDeleted()).compareTo(typedOther.isSetIsDeleted()); if (lastComparison != 0) { return lastComparison; } if (isSetIsDeleted()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDeleted, other.isDeleted); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDeleted, typedOther.isDeleted); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription()); + lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription()); if (lastComparison != 0) { return lastComparison; } if (isSetDescription()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, other.description); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize()); + lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(typedOther.isSetFileSize()); if (lastComparison != 0) { return lastComparison; } if (isSetFileSize()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, other.fileSize); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fileSize, typedOther.fileSize); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java index fdd7b81..c9e52ae 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataError.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java index a5ac923..dbf28cd 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageDataException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ImageDataException extends TException implements org.apache.thrift.TBase<ImageDataException, ImageDataException._Fields>, java.io.Serializable, Cloneable, Comparable<ImageDataException> { +public class ImageDataException extends TException implements org.apache.thrift.TBase<ImageDataException, ImageDataException._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageDataException"); private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1); @@ -305,30 +303,30 @@ public class ImageDataException extends TException implements org.apache.thrift. return 0; } - @Override public int compareTo(ImageDataException other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + ImageDataException typedOther = (ImageDataException)other; - lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber()); + lastComparison = Boolean.valueOf(isSetNumber()).compareTo(typedOther.isSetNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetNumber()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, typedOther.number); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java index 9f73168..434cdcd 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ImageServer.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -68,33 +66,33 @@ public class ImageServer { public interface AsyncIface { - public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void ping(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.ping_call> resultHandler) throws org.apache.thrift.TException; - public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.authenticate_call> resultHandler) throws org.apache.thrift.TException; - public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOrganizations_call> resultHandler) throws org.apache.thrift.TException; - public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.findUser_call> resultHandler) throws org.apache.thrift.TException; - public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPublicImages_call> resultHandler) throws org.apache.thrift.TException; - public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUserFromToken_call> resultHandler) throws org.apache.thrift.TException; - public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isServerAuthenticated_call> resultHandler) throws org.apache.thrift.TException; - public void startServerAuthentication(String organization, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void startServerAuthentication(String organization, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.startServerAuthentication_call> resultHandler) throws org.apache.thrift.TException; - public void serverAuthenticate(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void serverAuthenticate(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.serverAuthenticate_call> resultHandler) throws org.apache.thrift.TException; - public void submitImage(String serverSessionId, ImageData imageDescription, List<Integer> crcSums, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void submitImage(String serverSessionId, ImageData imageDescription, List<Integer> crcSums, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.submitImage_call> resultHandler) throws org.apache.thrift.TException; - public void getImage(String serverSessionId, String uuid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getImage(String serverSessionId, String uuid, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getImage_call> resultHandler) throws org.apache.thrift.TException; - public void publishUser(String serverSessionId, UserInfo user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void publishUser(String serverSessionId, UserInfo user, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.publishUser_call> resultHandler) throws org.apache.thrift.TException; - public void registerSatellite(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void registerSatellite(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.registerSatellite_call> resultHandler) throws org.apache.thrift.TException; - public void updateSatelliteAddress(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void updateSatelliteAddress(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSatelliteAddress_call> resultHandler) throws org.apache.thrift.TException; } @@ -505,7 +503,7 @@ public class ImageServer { super(protocolFactory, clientManager, transport); } - public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void ping(org.apache.thrift.async.AsyncMethodCallback<ping_call> resultHandler) throws org.apache.thrift.TException { checkReady(); ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -513,7 +511,7 @@ public class ImageServer { } public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall { - public ping_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public ping_call(org.apache.thrift.async.AsyncMethodCallback<ping_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } @@ -534,7 +532,7 @@ public class ImageServer { } } - public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback<authenticate_call> resultHandler) throws org.apache.thrift.TException { checkReady(); authenticate_call method_call = new authenticate_call(login, password, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -544,7 +542,7 @@ public class ImageServer { public static class authenticate_call extends org.apache.thrift.async.TAsyncMethodCall { private String login; private String password; - public authenticate_call(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public authenticate_call(String login, String password, org.apache.thrift.async.AsyncMethodCallback<authenticate_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.login = login; this.password = password; @@ -569,7 +567,7 @@ public class ImageServer { } } - public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback<getOrganizations_call> resultHandler) throws org.apache.thrift.TException { checkReady(); getOrganizations_call method_call = new getOrganizations_call(resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -577,7 +575,7 @@ public class ImageServer { } public static class getOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall { - public getOrganizations_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public getOrganizations_call(org.apache.thrift.async.AsyncMethodCallback<getOrganizations_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); } @@ -598,7 +596,7 @@ public class ImageServer { } } - public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback<findUser_call> resultHandler) throws org.apache.thrift.TException { checkReady(); findUser_call method_call = new findUser_call(sessionId, organizationId, searchTerm, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -609,7 +607,7 @@ public class ImageServer { private String sessionId; private String organizationId; private String searchTerm; - public findUser_call(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public findUser_call(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback<findUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.sessionId = sessionId; this.organizationId = organizationId; @@ -636,7 +634,7 @@ public class ImageServer { } } - public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback<getPublicImages_call> resultHandler) throws org.apache.thrift.TException { checkReady(); getPublicImages_call method_call = new getPublicImages_call(sessionId, page, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -646,7 +644,7 @@ public class ImageServer { public static class getPublicImages_call extends org.apache.thrift.async.TAsyncMethodCall { private String sessionId; private int page; - public getPublicImages_call(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public getPublicImages_call(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback<getPublicImages_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.sessionId = sessionId; this.page = page; @@ -671,7 +669,7 @@ public class ImageServer { } } - public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback<getUserFromToken_call> resultHandler) throws org.apache.thrift.TException { checkReady(); getUserFromToken_call method_call = new getUserFromToken_call(token, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -680,7 +678,7 @@ public class ImageServer { public static class getUserFromToken_call extends org.apache.thrift.async.TAsyncMethodCall { private String token; - public getUserFromToken_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public getUserFromToken_call(String token, org.apache.thrift.async.AsyncMethodCallback<getUserFromToken_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.token = token; } @@ -703,7 +701,7 @@ public class ImageServer { } } - public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback<isServerAuthenticated_call> resultHandler) throws org.apache.thrift.TException { checkReady(); isServerAuthenticated_call method_call = new isServerAuthenticated_call(serverSessionId, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -712,7 +710,7 @@ public class ImageServer { public static class isServerAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall { private String serverSessionId; - public isServerAuthenticated_call(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public isServerAuthenticated_call(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback<isServerAuthenticated_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.serverSessionId = serverSessionId; } @@ -735,7 +733,7 @@ public class ImageServer { } } - public void startServerAuthentication(String organization, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void startServerAuthentication(String organization, org.apache.thrift.async.AsyncMethodCallback<startServerAuthentication_call> resultHandler) throws org.apache.thrift.TException { checkReady(); startServerAuthentication_call method_call = new startServerAuthentication_call(organization, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -744,7 +742,7 @@ public class ImageServer { public static class startServerAuthentication_call extends org.apache.thrift.async.TAsyncMethodCall { private String organization; - public startServerAuthentication_call(String organization, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public startServerAuthentication_call(String organization, org.apache.thrift.async.AsyncMethodCallback<startServerAuthentication_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.organization = organization; } @@ -767,7 +765,7 @@ public class ImageServer { } } - public void serverAuthenticate(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void serverAuthenticate(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback<serverAuthenticate_call> resultHandler) throws org.apache.thrift.TException { checkReady(); serverAuthenticate_call method_call = new serverAuthenticate_call(organizationId, challengeResponse, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -777,7 +775,7 @@ public class ImageServer { public static class serverAuthenticate_call extends org.apache.thrift.async.TAsyncMethodCall { private String organizationId; private ByteBuffer challengeResponse; - public serverAuthenticate_call(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public serverAuthenticate_call(String organizationId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback<serverAuthenticate_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.organizationId = organizationId; this.challengeResponse = challengeResponse; @@ -802,7 +800,7 @@ public class ImageServer { } } - public void submitImage(String serverSessionId, ImageData imageDescription, List<Integer> crcSums, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void submitImage(String serverSessionId, ImageData imageDescription, List<Integer> crcSums, org.apache.thrift.async.AsyncMethodCallback<submitImage_call> resultHandler) throws org.apache.thrift.TException { checkReady(); submitImage_call method_call = new submitImage_call(serverSessionId, imageDescription, crcSums, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -813,7 +811,7 @@ public class ImageServer { private String serverSessionId; private ImageData imageDescription; private List<Integer> crcSums; - public submitImage_call(String serverSessionId, ImageData imageDescription, List<Integer> crcSums, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public submitImage_call(String serverSessionId, ImageData imageDescription, List<Integer> crcSums, org.apache.thrift.async.AsyncMethodCallback<submitImage_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.serverSessionId = serverSessionId; this.imageDescription = imageDescription; @@ -840,7 +838,7 @@ public class ImageServer { } } - public void getImage(String serverSessionId, String uuid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void getImage(String serverSessionId, String uuid, org.apache.thrift.async.AsyncMethodCallback<getImage_call> resultHandler) throws org.apache.thrift.TException { checkReady(); getImage_call method_call = new getImage_call(serverSessionId, uuid, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -850,7 +848,7 @@ public class ImageServer { public static class getImage_call extends org.apache.thrift.async.TAsyncMethodCall { private String serverSessionId; private String uuid; - public getImage_call(String serverSessionId, String uuid, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public getImage_call(String serverSessionId, String uuid, org.apache.thrift.async.AsyncMethodCallback<getImage_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.serverSessionId = serverSessionId; this.uuid = uuid; @@ -875,7 +873,7 @@ public class ImageServer { } } - public void publishUser(String serverSessionId, UserInfo user, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void publishUser(String serverSessionId, UserInfo user, org.apache.thrift.async.AsyncMethodCallback<publishUser_call> resultHandler) throws org.apache.thrift.TException { checkReady(); publishUser_call method_call = new publishUser_call(serverSessionId, user, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -885,7 +883,7 @@ public class ImageServer { public static class publishUser_call extends org.apache.thrift.async.TAsyncMethodCall { private String serverSessionId; private UserInfo user; - public publishUser_call(String serverSessionId, UserInfo user, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public publishUser_call(String serverSessionId, UserInfo user, org.apache.thrift.async.AsyncMethodCallback<publishUser_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.serverSessionId = serverSessionId; this.user = user; @@ -910,7 +908,7 @@ public class ImageServer { } } - public void registerSatellite(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void registerSatellite(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback<registerSatellite_call> resultHandler) throws org.apache.thrift.TException { checkReady(); registerSatellite_call method_call = new registerSatellite_call(organizationId, address, modulus, exponent, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -922,7 +920,7 @@ public class ImageServer { private String address; private String modulus; private String exponent; - public registerSatellite_call(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public registerSatellite_call(String organizationId, String address, String modulus, String exponent, org.apache.thrift.async.AsyncMethodCallback<registerSatellite_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.organizationId = organizationId; this.address = address; @@ -951,7 +949,7 @@ public class ImageServer { } } - public void updateSatelliteAddress(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void updateSatelliteAddress(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback<updateSatelliteAddress_call> resultHandler) throws org.apache.thrift.TException { checkReady(); updateSatelliteAddress_call method_call = new updateSatelliteAddress_call(serverSessionId, address, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -961,7 +959,7 @@ public class ImageServer { public static class updateSatelliteAddress_call extends org.apache.thrift.async.TAsyncMethodCall { private String serverSessionId; private String address; - public updateSatelliteAddress_call(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public updateSatelliteAddress_call(String serverSessionId, String address, org.apache.thrift.async.AsyncMethodCallback<updateSatelliteAddress_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.serverSessionId = serverSessionId; this.address = address; @@ -1345,825 +1343,7 @@ public class ImageServer { } - public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>())); - } - - protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) { - processMap.put("ping", new ping()); - processMap.put("authenticate", new authenticate()); - processMap.put("getOrganizations", new getOrganizations()); - processMap.put("findUser", new findUser()); - processMap.put("getPublicImages", new getPublicImages()); - processMap.put("getUserFromToken", new getUserFromToken()); - processMap.put("isServerAuthenticated", new isServerAuthenticated()); - processMap.put("startServerAuthentication", new startServerAuthentication()); - processMap.put("serverAuthenticate", new serverAuthenticate()); - processMap.put("submitImage", new submitImage()); - processMap.put("getImage", new getImage()); - processMap.put("publishUser", new publishUser()); - processMap.put("registerSatellite", new registerSatellite()); - processMap.put("updateSatelliteAddress", new updateSatelliteAddress()); - return processMap; - } - - public static class ping<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, ping_args, Boolean> { - public ping() { - super("ping"); - } - - public ping_args getEmptyArgsInstance() { - return new ping_args(); - } - - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - ping_result result = new ping_result(); - result.success = o; - result.setSuccessIsSet(true); - 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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - ping_result result = new ping_result(); - { - 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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, ping_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.ping(resultHandler); - } - } - - public static class authenticate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, authenticate_args, SessionData> { - public authenticate() { - super("authenticate"); - } - - public authenticate_args getEmptyArgsInstance() { - return new authenticate_args(); - } - - public AsyncMethodCallback<SessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<SessionData>() { - public void onComplete(SessionData o) { - authenticate_result result = new authenticate_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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - authenticate_result result = new authenticate_result(); - if (e instanceof AuthenticationException) { - result.failure = (AuthenticationException) e; - result.setFailureIsSet(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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, authenticate_args args, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler) throws TException { - iface.authenticate(args.login, args.password,resultHandler); - } - } - - public static class getOrganizations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOrganizations_args, List<OrganizationData>> { - public getOrganizations() { - super("getOrganizations"); - } - - public getOrganizations_args getEmptyArgsInstance() { - return new getOrganizations_args(); - } - - public AsyncMethodCallback<List<OrganizationData>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<List<OrganizationData>>() { - public void onComplete(List<OrganizationData> o) { - getOrganizations_result result = new getOrganizations_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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getOrganizations_result result = new getOrganizations_result(); - { - 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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<List<OrganizationData>> resultHandler) throws TException { - iface.getOrganizations(resultHandler); - } - } - - public static class findUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, findUser_args, List<UserInfo>> { - public findUser() { - super("findUser"); - } - - public findUser_args getEmptyArgsInstance() { - return new findUser_args(); - } - - public AsyncMethodCallback<List<UserInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<List<UserInfo>>() { - public void onComplete(List<UserInfo> o) { - findUser_result result = new findUser_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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - findUser_result result = new findUser_result(); - if (e instanceof AuthorizationException) { - result.failure = (AuthorizationException) e; - result.setFailureIsSet(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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, findUser_args args, org.apache.thrift.async.AsyncMethodCallback<List<UserInfo>> resultHandler) throws TException { - iface.findUser(args.sessionId, args.organizationId, args.searchTerm,resultHandler); - } - } - - public static class getPublicImages<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPublicImages_args, List<ImageData>> { - public getPublicImages() { - super("getPublicImages"); - } - - public getPublicImages_args getEmptyArgsInstance() { - return new getPublicImages_args(); - } - - public AsyncMethodCallback<List<ImageData>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<List<ImageData>>() { - public void onComplete(List<ImageData> o) { - getPublicImages_result result = new getPublicImages_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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getPublicImages_result result = new getPublicImages_result(); - if (e instanceof AuthorizationException) { - result.failure = (AuthorizationException) e; - result.setFailureIsSet(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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getPublicImages_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImageData>> resultHandler) throws TException { - iface.getPublicImages(args.sessionId, args.page,resultHandler); - } - } - - public static class getUserFromToken<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserFromToken_args, UserInfo> { - public getUserFromToken() { - super("getUserFromToken"); - } - - public getUserFromToken_args getEmptyArgsInstance() { - return new getUserFromToken_args(); - } - - public AsyncMethodCallback<UserInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<UserInfo>() { - public void onComplete(UserInfo o) { - getUserFromToken_result result = new getUserFromToken_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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getUserFromToken_result result = new getUserFromToken_result(); - if (e instanceof InvalidTokenException) { - result.failure = (InvalidTokenException) e; - result.setFailureIsSet(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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getUserFromToken_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws TException { - iface.getUserFromToken(args.token,resultHandler); - } - } - - public static class isServerAuthenticated<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isServerAuthenticated_args, Boolean> { - public isServerAuthenticated() { - super("isServerAuthenticated"); - } - - public isServerAuthenticated_args getEmptyArgsInstance() { - return new isServerAuthenticated_args(); - } - - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - isServerAuthenticated_result result = new isServerAuthenticated_result(); - result.success = o; - result.setSuccessIsSet(true); - 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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - isServerAuthenticated_result result = new isServerAuthenticated_result(); - { - 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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, isServerAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.isServerAuthenticated(args.serverSessionId,resultHandler); - } - } - - public static class startServerAuthentication<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startServerAuthentication_args, ByteBuffer> { - public startServerAuthentication() { - super("startServerAuthentication"); - } - - public startServerAuthentication_args getEmptyArgsInstance() { - return new startServerAuthentication_args(); - } - - public AsyncMethodCallback<ByteBuffer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<ByteBuffer>() { - public void onComplete(ByteBuffer o) { - startServerAuthentication_result result = new startServerAuthentication_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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - startServerAuthentication_result result = new startServerAuthentication_result(); - if (e instanceof AuthenticationException) { - result.failure = (AuthenticationException) e; - result.setFailureIsSet(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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, startServerAuthentication_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException { - iface.startServerAuthentication(args.organization,resultHandler); - } - } - - public static class serverAuthenticate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, serverAuthenticate_args, ServerSessionData> { - public serverAuthenticate() { - super("serverAuthenticate"); - } - - public serverAuthenticate_args getEmptyArgsInstance() { - return new serverAuthenticate_args(); - } - - public AsyncMethodCallback<ServerSessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<ServerSessionData>() { - public void onComplete(ServerSessionData o) { - serverAuthenticate_result result = new serverAuthenticate_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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - serverAuthenticate_result result = new serverAuthenticate_result(); - if (e instanceof AuthenticationException) { - result.failure = (AuthenticationException) e; - result.setFailureIsSet(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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, serverAuthenticate_args args, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler) throws TException { - iface.serverAuthenticate(args.organizationId, args.challengeResponse,resultHandler); - } - } - - public static class submitImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, submitImage_args, UploadData> { - public submitImage() { - super("submitImage"); - } - - public submitImage_args getEmptyArgsInstance() { - return new submitImage_args(); - } - - public AsyncMethodCallback<UploadData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<UploadData>() { - public void onComplete(UploadData o) { - submitImage_result result = new submitImage_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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - submitImage_result result = new submitImage_result(); - if (e instanceof AuthorizationException) { - result.failure = (AuthorizationException) e; - result.setFailureIsSet(true); - msg = result; - } - else if (e instanceof ImageDataException) { - result.failure2 = (ImageDataException) e; - result.setFailure2IsSet(true); - msg = result; - } - else if (e instanceof UploadException) { - result.failure3 = (UploadException) e; - result.setFailure3IsSet(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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, submitImage_args args, org.apache.thrift.async.AsyncMethodCallback<UploadData> resultHandler) throws TException { - iface.submitImage(args.serverSessionId, args.imageDescription, args.crcSums,resultHandler); - } - } - - public static class getImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImage_args, DownloadData> { - public getImage() { - super("getImage"); - } - - public getImage_args getEmptyArgsInstance() { - return new getImage_args(); - } - - public AsyncMethodCallback<DownloadData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<DownloadData>() { - public void onComplete(DownloadData o) { - getImage_result result = new getImage_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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - getImage_result result = new getImage_result(); - if (e instanceof AuthorizationException) { - result.failure = (AuthorizationException) e; - result.setFailureIsSet(true); - msg = result; - } - else if (e instanceof ImageDataException) { - result.failure2 = (ImageDataException) e; - result.setFailure2IsSet(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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, getImage_args args, org.apache.thrift.async.AsyncMethodCallback<DownloadData> resultHandler) throws TException { - iface.getImage(args.serverSessionId, args.uuid,resultHandler); - } - } - - public static class publishUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, publishUser_args, Boolean> { - public publishUser() { - super("publishUser"); - } - - public publishUser_args getEmptyArgsInstance() { - return new publishUser_args(); - } - - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - publishUser_result result = new publishUser_result(); - result.success = o; - result.setSuccessIsSet(true); - 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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - publishUser_result result = new publishUser_result(); - if (e instanceof AuthorizationException) { - result.failure = (AuthorizationException) e; - result.setFailureIsSet(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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, publishUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.publishUser(args.serverSessionId, args.user,resultHandler); - } - } - - public static class registerSatellite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerSatellite_args, Boolean> { - public registerSatellite() { - super("registerSatellite"); - } - - public registerSatellite_args getEmptyArgsInstance() { - return new registerSatellite_args(); - } - - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - registerSatellite_result result = new registerSatellite_result(); - result.success = o; - result.setSuccessIsSet(true); - 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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - registerSatellite_result result = new registerSatellite_result(); - { - 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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, registerSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.registerSatellite(args.organizationId, args.address, args.modulus, args.exponent,resultHandler); - } - } - - public static class updateSatelliteAddress<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateSatelliteAddress_args, Boolean> { - public updateSatelliteAddress() { - super("updateSatelliteAddress"); - } - - public updateSatelliteAddress_args getEmptyArgsInstance() { - return new updateSatelliteAddress_args(); - } - - public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback<Boolean>() { - public void onComplete(Boolean o) { - updateSatelliteAddress_result result = new updateSatelliteAddress_result(); - result.success = o; - result.setSuccessIsSet(true); - 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) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - updateSatelliteAddress_result result = new updateSatelliteAddress_result(); - { - 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(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, updateSatelliteAddress_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException { - iface.updateSatelliteAddress(args.serverSessionId, args.address,resultHandler); - } - } - - } - - public static class ping_args implements org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable, Comparable<ping_args> { + public static class ping_args implements org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args"); @@ -2296,13 +1476,13 @@ public class ImageServer { return 0; } - @Override public int compareTo(ping_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + ping_args typedOther = (ping_args)other; return 0; } @@ -2409,7 +1589,7 @@ public class ImageServer { } - public static class ping_result implements org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable, Comparable<ping_result> { + public static class ping_result implements org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); @@ -2609,20 +1789,20 @@ public class ImageServer { return 0; } - @Override public int compareTo(ping_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + ping_result typedOther = (ping_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -2763,7 +1943,7 @@ public class ImageServer { } - public static class authenticate_args implements org.apache.thrift.TBase<authenticate_args, authenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_args> { + public static class authenticate_args implements org.apache.thrift.TBase<authenticate_args, authenticate_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_args"); private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -3020,30 +2200,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(authenticate_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + authenticate_args typedOther = (authenticate_args)other; - lastComparison = Boolean.valueOf(isSetLogin()).compareTo(other.isSetLogin()); + lastComparison = Boolean.valueOf(isSetLogin()).compareTo(typedOther.isSetLogin()); if (lastComparison != 0) { return lastComparison; } if (isSetLogin()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.login, other.login); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.login, typedOther.login); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); + lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword()); if (lastComparison != 0) { return lastComparison; } if (isSetPassword()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password); if (lastComparison != 0) { return lastComparison; } @@ -3217,7 +2397,7 @@ public class ImageServer { } - public static class authenticate_result implements org.apache.thrift.TBase<authenticate_result, authenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_result> { + public static class authenticate_result implements org.apache.thrift.TBase<authenticate_result, authenticate_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -3474,30 +2654,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(authenticate_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + authenticate_result typedOther = (authenticate_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(typedOther.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, typedOther.failure); if (lastComparison != 0) { return lastComparison; } @@ -3678,7 +2858,7 @@ public class ImageServer { } - public static class getOrganizations_args implements org.apache.thrift.TBase<getOrganizations_args, getOrganizations_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrganizations_args> { + public static class getOrganizations_args implements org.apache.thrift.TBase<getOrganizations_args, getOrganizations_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_args"); @@ -3811,13 +2991,13 @@ public class ImageServer { return 0; } - @Override public int compareTo(getOrganizations_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + getOrganizations_args typedOther = (getOrganizations_args)other; return 0; } @@ -3924,7 +3104,7 @@ public class ImageServer { } - public static class getOrganizations_result implements org.apache.thrift.TBase<getOrganizations_result, getOrganizations_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrganizations_result> { + public static class getOrganizations_result implements org.apache.thrift.TBase<getOrganizations_result, getOrganizations_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); @@ -4021,7 +3201,7 @@ public class ImageServer { */ public getOrganizations_result(getOrganizations_result other) { if (other.isSetSuccess()) { - List<OrganizationData> __this__success = new ArrayList<OrganizationData>(other.success.size()); + List<OrganizationData> __this__success = new ArrayList<OrganizationData>(); for (OrganizationData other_element : other.success) { __this__success.add(new OrganizationData(other_element)); } @@ -4142,20 +3322,20 @@ public class ImageServer { return 0; } - @Override public int compareTo(getOrganizations_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + getOrganizations_result typedOther = (getOrganizations_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -4237,7 +3417,7 @@ public class ImageServer { struct.success = new ArrayList<OrganizationData>(_list16.size); for (int _i17 = 0; _i17 < _list16.size; ++_i17) { - OrganizationData _elem18; + OrganizationData _elem18; // required _elem18 = new OrganizationData(); _elem18.read(iprot); struct.success.add(_elem18); @@ -4319,7 +3499,7 @@ public class ImageServer { struct.success = new ArrayList<OrganizationData>(_list21.size); for (int _i22 = 0; _i22 < _list21.size; ++_i22) { - OrganizationData _elem23; + OrganizationData _elem23; // required _elem23 = new OrganizationData(); _elem23.read(iprot); struct.success.add(_elem23); @@ -4332,7 +3512,7 @@ public class ImageServer { } - public static class findUser_args implements org.apache.thrift.TBase<findUser_args, findUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<findUser_args> { + public static class findUser_args implements org.apache.thrift.TBase<findUser_args, findUser_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUser_args"); 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); @@ -4648,40 +3828,40 @@ public class ImageServer { return 0; } - @Override public int compareTo(findUser_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + findUser_args typedOther = (findUser_args)other; - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId()); + lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(typedOther.isSetOrganizationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOrganizationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, typedOther.organizationId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSearchTerm()).compareTo(other.isSetSearchTerm()); + lastComparison = Boolean.valueOf(isSetSearchTerm()).compareTo(typedOther.isSetSearchTerm()); if (lastComparison != 0) { return lastComparison; } if (isSetSearchTerm()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchTerm, other.searchTerm); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchTerm, typedOther.searchTerm); if (lastComparison != 0) { return lastComparison; } @@ -4886,7 +4066,7 @@ public class ImageServer { } - public static class findUser_result implements org.apache.thrift.TBase<findUser_result, findUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<findUser_result> { + public static class findUser_result implements org.apache.thrift.TBase<findUser_result, findUser_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUser_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); @@ -4992,7 +4172,7 @@ public class ImageServer { */ public findUser_result(findUser_result other) { if (other.isSetSuccess()) { - List<UserInfo> __this__success = new ArrayList<UserInfo>(other.success.size()); + List<UserInfo> __this__success = new ArrayList<UserInfo>(); for (UserInfo other_element : other.success) { __this__success.add(new UserInfo(other_element)); } @@ -5163,30 +4343,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(findUser_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + findUser_result typedOther = (findUser_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(typedOther.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, typedOther.failure); if (lastComparison != 0) { return lastComparison; } @@ -5276,7 +4456,7 @@ public class ImageServer { struct.success = new ArrayList<UserInfo>(_list24.size); for (int _i25 = 0; _i25 < _list24.size; ++_i25) { - UserInfo _elem26; + UserInfo _elem26; // required _elem26 = new UserInfo(); _elem26.read(iprot); struct.success.add(_elem26); @@ -5378,7 +4558,7 @@ public class ImageServer { struct.success = new ArrayList<UserInfo>(_list29.size); for (int _i30 = 0; _i30 < _list29.size; ++_i30) { - UserInfo _elem31; + UserInfo _elem31; // required _elem31 = new UserInfo(); _elem31.read(iprot); struct.success.add(_elem31); @@ -5396,7 +4576,7 @@ public class ImageServer { } - public static class getPublicImages_args implements org.apache.thrift.TBase<getPublicImages_args, getPublicImages_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPublicImages_args> { + public static class getPublicImages_args implements org.apache.thrift.TBase<getPublicImages_args, getPublicImages_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPublicImages_args"); 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); @@ -5655,30 +4835,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(getPublicImages_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + getPublicImages_args typedOther = (getPublicImages_args)other; - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage()); + lastComparison = Boolean.valueOf(isSetPage()).compareTo(typedOther.isSetPage()); if (lastComparison != 0) { return lastComparison; } if (isSetPage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, other.page); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.page, typedOther.page); if (lastComparison != 0) { return lastComparison; } @@ -5848,7 +5028,7 @@ public class ImageServer { } - public static class getPublicImages_result implements org.apache.thrift.TBase<getPublicImages_result, getPublicImages_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPublicImages_result> { + public static class getPublicImages_result implements org.apache.thrift.TBase<getPublicImages_result, getPublicImages_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPublicImages_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); @@ -5954,7 +5134,7 @@ public class ImageServer { */ public getPublicImages_result(getPublicImages_result other) { if (other.isSetSuccess()) { - List<ImageData> __this__success = new ArrayList<ImageData>(other.success.size()); + List<ImageData> __this__success = new ArrayList<ImageData>(); for (ImageData other_element : other.success) { __this__success.add(new ImageData(other_element)); } @@ -6125,30 +5305,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(getPublicImages_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + getPublicImages_result typedOther = (getPublicImages_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(typedOther.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, typedOther.failure); if (lastComparison != 0) { return lastComparison; } @@ -6238,7 +5418,7 @@ public class ImageServer { struct.success = new ArrayList<ImageData>(_list32.size); for (int _i33 = 0; _i33 < _list32.size; ++_i33) { - ImageData _elem34; + ImageData _elem34; // required _elem34 = new ImageData(); _elem34.read(iprot); struct.success.add(_elem34); @@ -6340,7 +5520,7 @@ public class ImageServer { struct.success = new ArrayList<ImageData>(_list37.size); for (int _i38 = 0; _i38 < _list37.size; ++_i38) { - ImageData _elem39; + ImageData _elem39; // required _elem39 = new ImageData(); _elem39.read(iprot); struct.success.add(_elem39); @@ -6358,7 +5538,7 @@ public class ImageServer { } - public static class getUserFromToken_args implements org.apache.thrift.TBase<getUserFromToken_args, getUserFromToken_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_args> { + public static class getUserFromToken_args implements org.apache.thrift.TBase<getUserFromToken_args, getUserFromToken_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_args"); private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -6556,20 +5736,20 @@ public class ImageServer { return 0; } - @Override public int compareTo(getUserFromToken_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + getUserFromToken_args typedOther = (getUserFromToken_args)other; - lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken()); + lastComparison = Boolean.valueOf(isSetToken()).compareTo(typedOther.isSetToken()); if (lastComparison != 0) { return lastComparison; } if (isSetToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, typedOther.token); if (lastComparison != 0) { return lastComparison; } @@ -6712,7 +5892,7 @@ public class ImageServer { } - public static class getUserFromToken_result implements org.apache.thrift.TBase<getUserFromToken_result, getUserFromToken_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_result> { + public static class getUserFromToken_result implements org.apache.thrift.TBase<getUserFromToken_result, getUserFromToken_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -6969,30 +6149,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(getUserFromToken_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + getUserFromToken_result typedOther = (getUserFromToken_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(typedOther.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, typedOther.failure); if (lastComparison != 0) { return lastComparison; } @@ -7173,7 +6353,7 @@ public class ImageServer { } - public static class isServerAuthenticated_args implements org.apache.thrift.TBase<isServerAuthenticated_args, isServerAuthenticated_args._Fields>, java.io.Serializable, Cloneable, Comparable<isServerAuthenticated_args> { + public static class isServerAuthenticated_args implements org.apache.thrift.TBase<isServerAuthenticated_args, isServerAuthenticated_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isServerAuthenticated_args"); private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -7371,20 +6551,20 @@ public class ImageServer { return 0; } - @Override public int compareTo(isServerAuthenticated_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + isServerAuthenticated_args typedOther = (isServerAuthenticated_args)other; - lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId()); + lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(typedOther.isSetServerSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetServerSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, typedOther.serverSessionId); if (lastComparison != 0) { return lastComparison; } @@ -7527,7 +6707,7 @@ public class ImageServer { } - public static class isServerAuthenticated_result implements org.apache.thrift.TBase<isServerAuthenticated_result, isServerAuthenticated_result._Fields>, java.io.Serializable, Cloneable, Comparable<isServerAuthenticated_result> { + public static class isServerAuthenticated_result implements org.apache.thrift.TBase<isServerAuthenticated_result, isServerAuthenticated_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isServerAuthenticated_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); @@ -7727,20 +6907,20 @@ public class ImageServer { return 0; } - @Override public int compareTo(isServerAuthenticated_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + isServerAuthenticated_result typedOther = (isServerAuthenticated_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -7881,7 +7061,7 @@ public class ImageServer { } - public static class startServerAuthentication_args implements org.apache.thrift.TBase<startServerAuthentication_args, startServerAuthentication_args._Fields>, java.io.Serializable, Cloneable, Comparable<startServerAuthentication_args> { + public static class startServerAuthentication_args implements org.apache.thrift.TBase<startServerAuthentication_args, startServerAuthentication_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startServerAuthentication_args"); private static final org.apache.thrift.protocol.TField ORGANIZATION_FIELD_DESC = new org.apache.thrift.protocol.TField("organization", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -8079,20 +7259,20 @@ public class ImageServer { return 0; } - @Override public int compareTo(startServerAuthentication_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + startServerAuthentication_args typedOther = (startServerAuthentication_args)other; - lastComparison = Boolean.valueOf(isSetOrganization()).compareTo(other.isSetOrganization()); + lastComparison = Boolean.valueOf(isSetOrganization()).compareTo(typedOther.isSetOrganization()); if (lastComparison != 0) { return lastComparison; } if (isSetOrganization()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organization, other.organization); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organization, typedOther.organization); if (lastComparison != 0) { return lastComparison; } @@ -8235,7 +7415,7 @@ public class ImageServer { } - public static class startServerAuthentication_result implements org.apache.thrift.TBase<startServerAuthentication_result, startServerAuthentication_result._Fields>, java.io.Serializable, Cloneable, Comparable<startServerAuthentication_result> { + public static class startServerAuthentication_result implements org.apache.thrift.TBase<startServerAuthentication_result, startServerAuthentication_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startServerAuthentication_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); @@ -8503,30 +7683,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(startServerAuthentication_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + startServerAuthentication_result typedOther = (startServerAuthentication_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(typedOther.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, typedOther.failure); if (lastComparison != 0) { return lastComparison; } @@ -8702,7 +7882,7 @@ public class ImageServer { } - public static class serverAuthenticate_args implements org.apache.thrift.TBase<serverAuthenticate_args, serverAuthenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<serverAuthenticate_args> { + public static class serverAuthenticate_args implements org.apache.thrift.TBase<serverAuthenticate_args, serverAuthenticate_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("serverAuthenticate_args"); private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -8970,30 +8150,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(serverAuthenticate_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + serverAuthenticate_args typedOther = (serverAuthenticate_args)other; - lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId()); + lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(typedOther.isSetOrganizationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOrganizationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, typedOther.organizationId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetChallengeResponse()).compareTo(other.isSetChallengeResponse()); + lastComparison = Boolean.valueOf(isSetChallengeResponse()).compareTo(typedOther.isSetChallengeResponse()); if (lastComparison != 0) { return lastComparison; } if (isSetChallengeResponse()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.challengeResponse, other.challengeResponse); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.challengeResponse, typedOther.challengeResponse); if (lastComparison != 0) { return lastComparison; } @@ -9167,7 +8347,7 @@ public class ImageServer { } - public static class serverAuthenticate_result implements org.apache.thrift.TBase<serverAuthenticate_result, serverAuthenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<serverAuthenticate_result> { + public static class serverAuthenticate_result implements org.apache.thrift.TBase<serverAuthenticate_result, serverAuthenticate_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("serverAuthenticate_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -9424,30 +8604,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(serverAuthenticate_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + serverAuthenticate_result typedOther = (serverAuthenticate_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(typedOther.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, typedOther.failure); if (lastComparison != 0) { return lastComparison; } @@ -9628,7 +8808,7 @@ public class ImageServer { } - public static class submitImage_args implements org.apache.thrift.TBase<submitImage_args, submitImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_args> { + public static class submitImage_args implements org.apache.thrift.TBase<submitImage_args, submitImage_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_args"); private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -9749,7 +8929,10 @@ public class ImageServer { this.imageDescription = new ImageData(other.imageDescription); } if (other.isSetCrcSums()) { - List<Integer> __this__crcSums = new ArrayList<Integer>(other.crcSums); + List<Integer> __this__crcSums = new ArrayList<Integer>(); + for (Integer other_element : other.crcSums) { + __this__crcSums.add(other_element); + } this.crcSums = __this__crcSums; } } @@ -9961,40 +9144,40 @@ public class ImageServer { return 0; } - @Override public int compareTo(submitImage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + submitImage_args typedOther = (submitImage_args)other; - lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId()); + lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(typedOther.isSetServerSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetServerSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, typedOther.serverSessionId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetImageDescription()).compareTo(other.isSetImageDescription()); + lastComparison = Boolean.valueOf(isSetImageDescription()).compareTo(typedOther.isSetImageDescription()); if (lastComparison != 0) { return lastComparison; } if (isSetImageDescription()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageDescription, other.imageDescription); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.imageDescription, typedOther.imageDescription); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCrcSums()).compareTo(other.isSetCrcSums()); + lastComparison = Boolean.valueOf(isSetCrcSums()).compareTo(typedOther.isSetCrcSums()); if (lastComparison != 0) { return lastComparison; } if (isSetCrcSums()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.crcSums, other.crcSums); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.crcSums, typedOther.crcSums); if (lastComparison != 0) { return lastComparison; } @@ -10112,7 +9295,7 @@ public class ImageServer { struct.crcSums = new ArrayList<Integer>(_list40.size); for (int _i41 = 0; _i41 < _list40.size; ++_i41) { - int _elem42; + int _elem42; // required _elem42 = iprot.readI32(); struct.crcSums.add(_elem42); } @@ -10224,7 +9407,7 @@ public class ImageServer { struct.crcSums = new ArrayList<Integer>(_list45.size); for (int _i46 = 0; _i46 < _list45.size; ++_i46) { - int _elem47; + int _elem47; // required _elem47 = iprot.readI32(); struct.crcSums.add(_elem47); } @@ -10236,7 +9419,7 @@ public class ImageServer { } - public static class submitImage_result implements org.apache.thrift.TBase<submitImage_result, submitImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_result> { + public static class submitImage_result implements org.apache.thrift.TBase<submitImage_result, submitImage_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -10611,50 +9794,50 @@ public class ImageServer { return 0; } - @Override public int compareTo(submitImage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + submitImage_result typedOther = (submitImage_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(typedOther.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, typedOther.failure); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2()); + lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(typedOther.isSetFailure2()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, typedOther.failure2); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure3()).compareTo(other.isSetFailure3()); + lastComparison = Boolean.valueOf(isSetFailure3()).compareTo(typedOther.isSetFailure3()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure3()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure3, other.failure3); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure3, typedOther.failure3); if (lastComparison != 0) { return lastComparison; } @@ -10901,7 +10084,7 @@ public class ImageServer { } - public static class getImage_args implements org.apache.thrift.TBase<getImage_args, getImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImage_args> { + public static class getImage_args implements org.apache.thrift.TBase<getImage_args, getImage_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImage_args"); private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)2); @@ -11158,30 +10341,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(getImage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + getImage_args typedOther = (getImage_args)other; - lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId()); + lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(typedOther.isSetServerSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetServerSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, typedOther.serverSessionId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUuid()).compareTo(other.isSetUuid()); + lastComparison = Boolean.valueOf(isSetUuid()).compareTo(typedOther.isSetUuid()); if (lastComparison != 0) { return lastComparison; } if (isSetUuid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuid, other.uuid); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uuid, typedOther.uuid); if (lastComparison != 0) { return lastComparison; } @@ -11355,7 +10538,7 @@ public class ImageServer { } - public static class getImage_result implements org.apache.thrift.TBase<getImage_result, getImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImage_result> { + public static class getImage_result implements org.apache.thrift.TBase<getImage_result, getImage_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImage_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -11671,40 +10854,40 @@ public class ImageServer { return 0; } - @Override public int compareTo(getImage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + getImage_result typedOther = (getImage_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(typedOther.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, typedOther.failure); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2()); + lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(typedOther.isSetFailure2()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure2()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, other.failure2); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure2, typedOther.failure2); if (lastComparison != 0) { return lastComparison; } @@ -11918,7 +11101,7 @@ public class ImageServer { } - public static class publishUser_args implements org.apache.thrift.TBase<publishUser_args, publishUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<publishUser_args> { + public static class publishUser_args implements org.apache.thrift.TBase<publishUser_args, publishUser_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("publishUser_args"); private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -12175,30 +11358,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(publishUser_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + publishUser_args typedOther = (publishUser_args)other; - lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId()); + lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(typedOther.isSetServerSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetServerSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, typedOther.serverSessionId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser()); + lastComparison = Boolean.valueOf(isSetUser()).compareTo(typedOther.isSetUser()); if (lastComparison != 0) { return lastComparison; } if (isSetUser()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, typedOther.user); if (lastComparison != 0) { return lastComparison; } @@ -12377,7 +11560,7 @@ public class ImageServer { } - public static class publishUser_result implements org.apache.thrift.TBase<publishUser_result, publishUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<publishUser_result> { + public static class publishUser_result implements org.apache.thrift.TBase<publishUser_result, publishUser_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("publishUser_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); @@ -12636,30 +11819,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(publishUser_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + publishUser_result typedOther = (publishUser_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure()); + lastComparison = Boolean.valueOf(isSetFailure()).compareTo(typedOther.isSetFailure()); if (lastComparison != 0) { return lastComparison; } if (isSetFailure()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, other.failure); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failure, typedOther.failure); if (lastComparison != 0) { return lastComparison; } @@ -12833,7 +12016,7 @@ public class ImageServer { } - public static class registerSatellite_args implements org.apache.thrift.TBase<registerSatellite_args, registerSatellite_args._Fields>, java.io.Serializable, Cloneable, Comparable<registerSatellite_args> { + public static class registerSatellite_args implements org.apache.thrift.TBase<registerSatellite_args, registerSatellite_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerSatellite_args"); private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -13208,50 +12391,50 @@ public class ImageServer { return 0; } - @Override public int compareTo(registerSatellite_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + registerSatellite_args typedOther = (registerSatellite_args)other; - lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId()); + lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(typedOther.isSetOrganizationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOrganizationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, typedOther.organizationId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress()); + lastComparison = Boolean.valueOf(isSetAddress()).compareTo(typedOther.isSetAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetAddress()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, typedOther.address); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetModulus()).compareTo(other.isSetModulus()); + lastComparison = Boolean.valueOf(isSetModulus()).compareTo(typedOther.isSetModulus()); if (lastComparison != 0) { return lastComparison; } if (isSetModulus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modulus, other.modulus); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modulus, typedOther.modulus); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetExponent()).compareTo(other.isSetExponent()); + lastComparison = Boolean.valueOf(isSetExponent()).compareTo(typedOther.isSetExponent()); if (lastComparison != 0) { return lastComparison; } if (isSetExponent()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exponent, other.exponent); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exponent, typedOther.exponent); if (lastComparison != 0) { return lastComparison; } @@ -13487,7 +12670,7 @@ public class ImageServer { } - public static class registerSatellite_result implements org.apache.thrift.TBase<registerSatellite_result, registerSatellite_result._Fields>, java.io.Serializable, Cloneable, Comparable<registerSatellite_result> { + public static class registerSatellite_result implements org.apache.thrift.TBase<registerSatellite_result, registerSatellite_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerSatellite_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); @@ -13687,20 +12870,20 @@ public class ImageServer { return 0; } - @Override public int compareTo(registerSatellite_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + registerSatellite_result typedOther = (registerSatellite_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -13841,7 +13024,7 @@ public class ImageServer { } - public static class updateSatelliteAddress_args implements org.apache.thrift.TBase<updateSatelliteAddress_args, updateSatelliteAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateSatelliteAddress_args> { + public static class updateSatelliteAddress_args implements org.apache.thrift.TBase<updateSatelliteAddress_args, updateSatelliteAddress_args._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSatelliteAddress_args"); private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -14098,30 +13281,30 @@ public class ImageServer { return 0; } - @Override public int compareTo(updateSatelliteAddress_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + updateSatelliteAddress_args typedOther = (updateSatelliteAddress_args)other; - lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId()); + lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(typedOther.isSetServerSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetServerSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, other.serverSessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverSessionId, typedOther.serverSessionId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress()); + lastComparison = Boolean.valueOf(isSetAddress()).compareTo(typedOther.isSetAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetAddress()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, typedOther.address); if (lastComparison != 0) { return lastComparison; } @@ -14295,7 +13478,7 @@ public class ImageServer { } - public static class updateSatelliteAddress_result implements org.apache.thrift.TBase<updateSatelliteAddress_result, updateSatelliteAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateSatelliteAddress_result> { + public static class updateSatelliteAddress_result implements org.apache.thrift.TBase<updateSatelliteAddress_result, updateSatelliteAddress_result._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSatelliteAddress_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); @@ -14495,20 +13678,20 @@ public class ImageServer { return 0; } - @Override public int compareTo(updateSatelliteAddress_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + updateSatelliteAddress_result typedOther = (updateSatelliteAddress_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java index e163c4f..50a6e5d 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/InvalidTokenException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class InvalidTokenException extends TException implements org.apache.thrift.TBase<InvalidTokenException, InvalidTokenException._Fields>, java.io.Serializable, Cloneable, Comparable<InvalidTokenException> { +public class InvalidTokenException extends TException implements org.apache.thrift.TBase<InvalidTokenException, InvalidTokenException._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InvalidTokenException"); @@ -165,13 +163,13 @@ public class InvalidTokenException extends TException implements org.apache.thri return 0; } - @Override public int compareTo(InvalidTokenException other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + InvalidTokenException typedOther = (InvalidTokenException)other; return 0; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/OrganizationData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/OrganizationData.java index 2177c37..f7cea30 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/OrganizationData.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/OrganizationData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class OrganizationData implements org.apache.thrift.TBase<OrganizationData, OrganizationData._Fields>, java.io.Serializable, Cloneable, Comparable<OrganizationData> { +public class OrganizationData implements org.apache.thrift.TBase<OrganizationData, OrganizationData._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OrganizationData"); private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -165,7 +163,10 @@ public class OrganizationData implements org.apache.thrift.TBase<OrganizationDat this.ecpUrl = other.ecpUrl; } if (other.isSetSuffixList()) { - List<String> __this__suffixList = new ArrayList<String>(other.suffixList); + List<String> __this__suffixList = new ArrayList<String>(); + for (String other_element : other.suffixList) { + __this__suffixList.add(other_element); + } this.suffixList = __this__suffixList; } } @@ -424,50 +425,50 @@ public class OrganizationData implements org.apache.thrift.TBase<OrganizationDat return 0; } - @Override public int compareTo(OrganizationData other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + OrganizationData typedOther = (OrganizationData)other; - lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId()); + lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(typedOther.isSetOrganizationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOrganizationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, typedOther.organizationId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName()); + lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(typedOther.isSetDisplayName()); if (lastComparison != 0) { return lastComparison; } if (isSetDisplayName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, other.displayName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.displayName, typedOther.displayName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetEcpUrl()).compareTo(other.isSetEcpUrl()); + lastComparison = Boolean.valueOf(isSetEcpUrl()).compareTo(typedOther.isSetEcpUrl()); if (lastComparison != 0) { return lastComparison; } if (isSetEcpUrl()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ecpUrl, other.ecpUrl); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ecpUrl, typedOther.ecpUrl); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSuffixList()).compareTo(other.isSetSuffixList()); + lastComparison = Boolean.valueOf(isSetSuffixList()).compareTo(typedOther.isSetSuffixList()); if (lastComparison != 0) { return lastComparison; } if (isSetSuffixList()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.suffixList, other.suffixList); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.suffixList, typedOther.suffixList); if (lastComparison != 0) { return lastComparison; } @@ -597,7 +598,7 @@ public class OrganizationData implements org.apache.thrift.TBase<OrganizationDat struct.suffixList = new ArrayList<String>(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - String _elem2; + String _elem2; // required _elem2 = iprot.readString(); struct.suffixList.add(_elem2); } @@ -723,7 +724,7 @@ public class OrganizationData implements org.apache.thrift.TBase<OrganizationDat struct.suffixList = new ArrayList<String>(_list5.size); for (int _i6 = 0; _i6 < _list5.size; ++_i6) { - String _elem7; + String _elem7; // required _elem7 = iprot.readString(); struct.suffixList.add(_elem7); } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java index 8f8893a..ce5482a 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/ServerSessionData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionData, ServerSessionData._Fields>, java.io.Serializable, Cloneable, Comparable<ServerSessionData> { +public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionData, ServerSessionData._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ServerSessionData"); 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); @@ -230,20 +228,20 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD return 0; } - @Override public int compareTo(ServerSessionData other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + ServerSessionData typedOther = (ServerSessionData)other; - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java index 711abeb..a1a30e1 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/SessionData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class SessionData implements org.apache.thrift.TBase<SessionData, SessionData._Fields>, java.io.Serializable, Cloneable, Comparable<SessionData> { +public class SessionData implements org.apache.thrift.TBase<SessionData, SessionData._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SessionData"); 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); @@ -348,40 +346,40 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session return 0; } - @Override public int compareTo(SessionData other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + SessionData typedOther = (SessionData)other; - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetAuthToken()).compareTo(other.isSetAuthToken()); + lastComparison = Boolean.valueOf(isSetAuthToken()).compareTo(typedOther.isSetAuthToken()); if (lastComparison != 0) { return lastComparison; } if (isSetAuthToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authToken, typedOther.authToken); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetServerAddress()).compareTo(other.isSetServerAddress()); + lastComparison = Boolean.valueOf(isSetServerAddress()).compareTo(typedOther.isSetServerAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetServerAddress()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverAddress, other.serverAddress); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverAddress, typedOther.serverAddress); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadData.java b/src/main/java/org/openslx/imagemaster/thrift/iface/UploadData.java index 314920e..45a589e 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadData.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/UploadData.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class UploadData implements org.apache.thrift.TBase<UploadData, UploadData._Fields>, java.io.Serializable, Cloneable, Comparable<UploadData> { +public class UploadData implements org.apache.thrift.TBase<UploadData, UploadData._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UploadData"); private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -291,30 +289,30 @@ public class UploadData implements org.apache.thrift.TBase<UploadData, UploadDat return 0; } - @Override public int compareTo(UploadData other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + UploadData typedOther = (UploadData)other; - lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken()); + lastComparison = Boolean.valueOf(isSetToken()).compareTo(typedOther.isSetToken()); if (lastComparison != 0) { return lastComparison; } if (isSetToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, other.token); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.token, typedOther.token); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort()); + lastComparison = Boolean.valueOf(isSetPort()).compareTo(typedOther.isSetPort()); if (lastComparison != 0) { return lastComparison; } if (isSetPort()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, typedOther.port); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadError.java b/src/main/java/org/openslx/imagemaster/thrift/iface/UploadError.java index 963ff1c..bcac7e1 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadError.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/UploadError.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadException.java b/src/main/java/org/openslx/imagemaster/thrift/iface/UploadException.java index bc4c150..eeaee66 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/UploadException.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/UploadException.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class UploadException extends TException implements org.apache.thrift.TBase<UploadException, UploadException._Fields>, java.io.Serializable, Cloneable, Comparable<UploadException> { +public class UploadException extends TException implements org.apache.thrift.TBase<UploadException, UploadException._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UploadException"); private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1); @@ -305,30 +303,30 @@ public class UploadException extends TException implements org.apache.thrift.TBa return 0; } - @Override public int compareTo(UploadException other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + UploadException typedOther = (UploadException)other; - lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber()); + lastComparison = Boolean.valueOf(isSetNumber()).compareTo(typedOther.isSetNumber()); if (lastComparison != 0) { return lastComparison; } if (isSetNumber()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, other.number); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.number, typedOther.number); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage()); + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, other.message); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java b/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java index 2d9581b..d5c3a69 100644 --- a/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java +++ b/src/main/java/org/openslx/imagemaster/thrift/iface/UserInfo.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.1) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; -import org.apache.thrift.async.AsyncMethodCallback; -import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -32,7 +30,7 @@ import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fields>, java.io.Serializable, Cloneable, Comparable<UserInfo> { +public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserInfo"); private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -466,60 +464,60 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie return 0; } - @Override public int compareTo(UserInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + UserInfo typedOther = (UserInfo)other; - lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId()); + lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId()); if (lastComparison != 0) { return lastComparison; } if (isSetUserId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, other.userId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName()); + lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(typedOther.isSetFirstName()); if (lastComparison != 0) { return lastComparison; } if (isSetFirstName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, other.firstName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.firstName, typedOther.firstName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName()); + lastComparison = Boolean.valueOf(isSetLastName()).compareTo(typedOther.isSetLastName()); if (lastComparison != 0) { return lastComparison; } if (isSetLastName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, other.lastName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastName, typedOther.lastName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetEMail()).compareTo(other.isSetEMail()); + lastComparison = Boolean.valueOf(isSetEMail()).compareTo(typedOther.isSetEMail()); if (lastComparison != 0) { return lastComparison; } if (isSetEMail()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eMail, other.eMail); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eMail, typedOther.eMail); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId()); + lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(typedOther.isSetOrganizationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOrganizationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, other.organizationId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organizationId, typedOther.organizationId); if (lastComparison != 0) { return lastComparison; } diff --git a/src/main/java/org/openslx/network/ProxyConfiguration.java b/src/main/java/org/openslx/network/ProxyConfiguration.java new file mode 100644 index 0000000..5a97b62 --- /dev/null +++ b/src/main/java/org/openslx/network/ProxyConfiguration.java @@ -0,0 +1,73 @@ +package org.openslx.network; + +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.Properties; + +import org.apache.log4j.Logger; +import org.openslx.util.Util; + +public class ProxyConfiguration +{ + private static Logger log = Logger.getLogger( ProxyConfiguration.class ); + private static final Properties properties = new Properties(); + + // Getting the proxy settings from config file stored in + // "/opt/openslx/proxy/conf". + public static String getProxyConf() + { + return properties.getProperty( "PROXY_CONF" ); + } + + public static String getProxyAddress() + { + return properties.getProperty( "PROXY_ADDR" ); + } + + public static String getProxyUsername() + { + return properties.getProperty( "PROXY_USERNAME" ); + } + + public static String getProxyPassword() + { + return properties.getProperty( "PROXY_PASSWORD" ); + } + + // Integers // + public static int getProxyPort() + { + return Util.tryToParseInt( properties.getProperty( "PROXY_PORT" ) ); + } + + /** + * Load properties + */ + static { + InputStreamReader stream = null; + try { + // Load all entries of the config file into properties + stream = new InputStreamReader( + new FileInputStream("/opt/openslx/proxy/config"), StandardCharsets.UTF_8); + properties.load(stream); + stream.close(); + } catch (IOException e) { + log.error("Could not load proxy properties from '/opt/openslx/proxy/conf'. Exiting."); + System.exit( 2 ); + } finally { + Util.streamClose( stream ); + } + } + + /** + * Check proxy settings for being not empty. + * @return + */ + public static boolean checkProxySettings() { + return ( + (getProxyAddress() != "") && + (getProxyPort() != 0)); + } +} diff --git a/src/main/java/org/openslx/util/Util.java b/src/main/java/org/openslx/util/Util.java new file mode 100644 index 0000000..9f98007 --- /dev/null +++ b/src/main/java/org/openslx/util/Util.java @@ -0,0 +1,74 @@ +package org.openslx.util; + +import java.io.Closeable; + +import org.apache.log4j.Logger; +import org.openslx.util.Util; + +public class Util +{ + private static Logger log = Logger.getLogger( Util.class ); + + /** + * Check if the given object is null, abort program if true. An optional + * message to be printed can be passed. A stack trace will be printed, too. + * Finally the application terminates with exit code 2. + * + * This comes in handy if something must not be null, and you want user + * friendly output. A perfect example would be reading settings from a + * config file. You can use this on mandatory fields. + * + * @param something + * the object to compare to null + * @param message + * the message to be printed if something is null + */ + public static void notNullFatal( Object something, String message ) + { + if ( something == null ) { + if ( message != null ) + log.fatal( "[NOTNULL] " + message ); + log.warn( Thread.currentThread().getStackTrace().toString() ); + System.exit( 2 ); + } + } + + public static void notNullOrEmptyFatal( String something, String message ) + { + if ( something == null || something.isEmpty() ) { + if ( message != null ) + log.fatal( "[NOTNULL] " + message ); + log.warn( Thread.currentThread().getStackTrace().toString() ); + System.exit( 2 ); + } + } + + + /** + * Tries to parse an int. Returns 0 on error. + * + * @param s + * The string to parse + * @return The parsed int or 0 on error + */ + public static int tryToParseInt( String s ) + { + try { + return Integer.parseInt( s ); + } catch ( NumberFormatException e ) { + return 0; + } + } + + public static void streamClose( Closeable... closeable ) + { + for ( Closeable c : closeable ) { + if ( c == null ) + continue; + try { + c.close(); + } catch ( Throwable t ) { + } + } + } +} |