First Commit after cleanup
Socket Bridge in java now works with UDP
Now connecting to remote ccnd nodes ( unless there is a firewall on the
way) currently connecting to borges on port 9695
Cleaned up the code and added authors to all files since new people are
joining the project.
Separated java from javascript code.
diff --git a/js/Exclude.js b/js/Exclude.js
new file mode 100644
index 0000000..50f8ea7
--- /dev/null
+++ b/js/Exclude.js
@@ -0,0 +1,53 @@
+/*
+ * @author: ucla-cs
+ * This class represents Exclude objects
+ */
+
+var Exclude = function Exclude(_Values){
+
+ this.OPTIMUM_FILTER_SIZE = 100;
+
+
+ this.Values = _Values; //array of elements
+
+}
+
+Exclude.prototype.decode = function(/*XMLDecoder*/ decoder) {
+
+
+
+ decoder.readStartElement(this.getElementLabel());
+
+ //TODO APPLY FILTERS/EXCLUDE
+
+ //TODO
+ /*var component;
+ var any = false;
+ while ((component = decoder.peekStartElement(CCNProtocolDTags.Component)) ||
+ (any = decoder.peekStartElement(CCNProtocolDTags.Any)) ||
+ decoder.peekStartElement(CCNProtocolDTags.Bloom)) {
+ var ee = component?new ExcludeComponent(): any ? new ExcludeAny() : new BloomFilter();
+ ee.decode(decoder);
+ _values.add(ee);
+ }*/
+
+ decoder.readEndElement();
+
+};
+
+Exclude.prototype.encode=function(/*XMLEncoder*/ encoder) {
+ if (!validate()) {
+ throw new ContentEncodingException("Cannot encode " + this.getClass().getName() + ": field values missing.");
+ }
+
+ if (empty())
+ return;
+
+ encoder.writeStartElement(getElementLabel());
+
+ encoder.writeEndElement();
+
+ };
+
+Exclude.prototype.getElementLabel = function() { return CCNProtocolDTags.Exclude; };
+