diff options
author | Richard Maudsley <richard.maudsley@isode.com> | 2014-02-04 09:49:24 (GMT) |
---|---|---|
committer | Richard Maudsley <richard.maudsley@isode.com> | 2014-03-07 14:28:58 (GMT) |
commit | a511087b1f57f1f6372374f41d0b4b7ebeef9930 (patch) | |
tree | a319c6c65f4c4722635f78ac564a823a370d011c /src/com/isode/stroke/elements/PubSubError.java | |
parent | 535e1a979a164f807aa64bf2df2bb36e7015ff17 (diff) | |
download | stroke-a511087b1f57f1f6372374f41d0b4b7ebeef9930.zip stroke-a511087b1f57f1f6372374f41d0b4b7ebeef9930.tar.bz2 |
PubSub parsers and serializers, plus manager and test code.
Change-Id: Ie8ca77ba8dbcd83926d46307ad0e73d804ff7422
Diffstat (limited to 'src/com/isode/stroke/elements/PubSubError.java')
-rw-r--r-- | src/com/isode/stroke/elements/PubSubError.java | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/src/com/isode/stroke/elements/PubSubError.java b/src/com/isode/stroke/elements/PubSubError.java new file mode 100644 index 0000000..cd6aadf --- /dev/null +++ b/src/com/isode/stroke/elements/PubSubError.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2014, Isode Limited, London, England. + * All rights reserved. + */ +/* + * Copyright (c) 2014, Remko Tronçon. + * All rights reserved. + */ + +package com.isode.stroke.elements; + +public class PubSubError extends Payload { + public enum Type { + UnknownType, + ClosedNode, + ConfigurationRequired, + InvalidJID, + InvalidOptions, + InvalidPayload, + InvalidSubscriptionID, + ItemForbidden, + ItemRequired, + JIDRequired, + MaximumItemsExceeded, + MaximumNodesExceeded, + NodeIDRequired, + NotInRosterGroup, + NotSubscribed, + PayloadTooBig, + PayloadRequired, + PendingSubscription, + PresenceSubscriptionRequired, + SubscriptionIDRequired, + TooManySubscriptions, + Unsupported, + UnsupportedAccessModel + }; + + public enum UnsupportedFeatureType { + UnknownUnsupportedFeatureType, + AccessAuthorize, + AccessOpen, + AccessPresence, + AccessRoster, + AccessWhitelist, + AutoCreate, + AutoSubscribe, + Collections, + ConfigNode, + CreateAndConfigure, + CreateNodes, + DeleteItems, + DeleteNodes, + FilteredNotifications, + GetPending, + InstantNodes, + ItemIDs, + LastPublished, + LeasedSubscription, + ManageSubscriptions, + MemberAffiliation, + MetaData, + ModifyAffiliations, + MultiCollection, + MultiSubscribe, + OutcastAffiliation, + PersistentItems, + PresenceNotifications, + PresenceSubscribe, + Publish, + PublishOptions, + PublishOnlyAffiliation, + PublisherAffiliation, + PurgeNodes, + RetractItems, + RetrieveAffiliations, + RetrieveDefault, + RetrieveItems, + RetrieveSubscriptions, + Subscribe, + SubscriptionOptions, + SubscriptionNotifications + }; + + public PubSubError(Type type) { + type_ = Type.UnknownType; + unsupportedType_ = UnsupportedFeatureType.UnknownUnsupportedFeatureType; + } + + public Type getType() { + return type_; + } + + public void setType(Type type) { + type_ = type; + } + + public UnsupportedFeatureType getUnsupportedFeatureType() { + return unsupportedType_; + } + + public void setUnsupportedFeatureType(UnsupportedFeatureType unsupportedType) { + unsupportedType_ = unsupportedType; + } + + Type type_; + UnsupportedFeatureType unsupportedType_; +} |