formatting
authorbdemsky <bdemsky@uci.edu>
Sat, 23 Jul 2016 23:27:34 +0000 (16:27 -0700)
committerbdemsky <bdemsky@uci.edu>
Sat, 23 Jul 2016 23:27:34 +0000 (16:27 -0700)
27 files changed:
src/java/iotcloud/CloudComm.java
src/java/iotcloud/Entry.java
src/java/iotcloud/IoTString.java
src/java/iotcloud/KeyValue.java
src/java/iotcloud/LastMessage.java
src/java/iotcloud/Pair.java
src/java/iotcloud/RejectedMessage.java
src/java/iotcloud/Slot.java
src/java/iotcloud/SlotBuffer.java
src/java/iotcloud/SlotIndexer.java
src/java/iotcloud/Table.java
src/java/iotcloud/TableStatus.java
src/script/C.cfg [new file with mode: 0644]
src/script/java.cfg [new file with mode: 0644]
src/script/makefile [new file with mode: 0644]
src/server/iotquery.cpp
src/server/iotquery.h
src/serverJ/.idea/compiler.xml [deleted file]
src/serverJ/.idea/copyright/profiles_settings.xml [deleted file]
src/serverJ/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_52.xml [deleted file]
src/serverJ/.idea/libraries/Maven__org_json_json_20090211.xml [deleted file]
src/serverJ/.idea/misc.xml [deleted file]
src/serverJ/.idea/modules.xml [deleted file]
src/serverJ/.idea/workspace.xml [deleted file]
src/serverJ/pom.xml [deleted file]
src/serverJ/serverJ.iml [deleted file]
src/serverJ/src/main/java/com/iotcloud/iot/slots/Slot.java [deleted file]

index eb061a4..ca17ffb 100644 (file)
@@ -9,14 +9,14 @@ class CloudComm {
        Cipher encryptcipher;
        Cipher decryptcipher;
        Mac mac;
-       
+
        CloudComm(String _baseurl, Cipher _encrypt, Cipher _decrypt, Mac _mac) {
                this.baseurl=_baseurl;
                this.encryptcipher = _encrypt;
                this.decryptcipher = _decrypt;
                this.mac = _mac;
        }
-       
+
        private URL buildRequest(boolean isput, long sequencenumber, long maxentries) throws IOException {
                String reqstring=isput?"req=putslot":"req=getslot";
                String urlstr=baseurl+"?"+reqstring+"&seq="+sequencenumber;
@@ -25,11 +25,11 @@ class CloudComm {
                return new URL(urlstr);
        }
 
-       public Slot[] putSlot(Slot slot, int max) throws IOException{
+       public Slot[] putSlot(Slot slot, int max) throws IOException {
                try {
                        long sequencenumber=slot.getSequenceNumber();
                        byte[] bytes=slot.encode(mac);
-                       
+
                        URL url=buildRequest(true, sequencenumber, max);
                        URLConnection con=url.openConnection();
                        HttpURLConnection http = (HttpURLConnection) con;
@@ -40,7 +40,7 @@ class CloudComm {
                        OutputStream os=http.getOutputStream();
                        os.write(bytes);
                        System.out.println(http.getResponseMessage());
-                       
+
                        InputStream is=http.getInputStream();
                        DataInputStream dis=new DataInputStream(is);
                        byte[] resptype=new byte[7];
@@ -55,7 +55,7 @@ class CloudComm {
                        throw new Error("putSlot failed");
                }
        }
-       
+
        public Slot[] getSlots(long sequencenumber) {
                try {
                        URL url=buildRequest(false, sequencenumber, 0);
@@ -65,7 +65,7 @@ class CloudComm {
                        http.connect();
                        System.out.println(http.getResponseMessage());
                        InputStream is=http.getInputStream();
-                       
+
                        DataInputStream dis=new DataInputStream(is);
                        byte[] resptype=new byte[7];
                        dis.readFully(resptype);
@@ -77,15 +77,15 @@ class CloudComm {
                        throw new Error("getSlots failed");
                }
        }
-               
+
        Slot[] processSlots(DataInputStream dis) throws IOException {
                int numberofslots=dis.readInt();
                int[] sizesofslots=new int[numberofslots];
                Slot[] slots=new Slot[numberofslots];
-               for(int i=0;i<numberofslots;i++)
+               for(int i=0; i<numberofslots; i++)
                        sizesofslots[i]=dis.readInt();
 
-               for(int i=0;i<numberofslots;i++) {
+               for(int i=0; i<numberofslots; i++) {
                        byte[] data=new byte[sizesofslots[i]];
                        dis.readFully(data);
                        slots[i]=Slot.decode(data, mac);
index 881e5ce..ea4e118 100644 (file)
@@ -12,18 +12,22 @@ abstract class Entry implements Liveness {
        Entry(Slot _parentslot) {
                parentslot = _parentslot;
        }
-       
+
        static Entry decode(Slot slot, ByteBuffer bb) {
                byte type=bb.get();
                switch(type) {
                case TypeKeyValue:
                        return KeyValue.decode(slot, bb);
+
                case TypeLastMessage:
                        return LastMessage.decode(slot, bb);
+
                case TypeRejectedMessage:
                        return RejectedMessage.decode(slot, bb);
+
                case TypeTableStatus:
                        return TableStatus.decode(slot, bb);
+
                default:
                        throw new Error("Unrecognized Entry Type: "+type);
                }
@@ -37,7 +41,7 @@ abstract class Entry implements Liveness {
                islive = false;
                parentslot.decrementLiveCount();
        }
-       
+
        abstract void encode(ByteBuffer bb);
 
        abstract int getSize();
index 11e86e2..8051806 100644 (file)
@@ -8,7 +8,7 @@ public class IoTString {
 
        private IoTString() {
        }
-       
+
        public IoTString(byte[] _array) {
                array=(byte[]) _array.clone();
                hashcode=Arrays.hashCode(array);
@@ -29,7 +29,7 @@ public class IoTString {
        byte[] internalBytes() {
                return array;
        }
-       
+
        public int hashCode() {
                return hashcode;
        }
@@ -41,7 +41,7 @@ public class IoTString {
        public byte[] getBytes() {
                return (byte[]) array.clone();
        }
-       
+
        public boolean equals(Object o) {
                if (o instanceof IoTString) {
                        IoTString i=(IoTString)o;
index ac19759..51d84eb 100644 (file)
@@ -4,7 +4,7 @@ import java.nio.ByteBuffer;
 class KeyValue extends Entry {
        private IoTString key;
        private IoTString value;
-       
+
        KeyValue(Slot slot, IoTString _key, IoTString _value) {
                super(slot);
                key=_key;
@@ -18,7 +18,7 @@ class KeyValue extends Entry {
        IoTString getValue() {
                return value;
        }
-       
+
        static Entry decode(Slot slot, ByteBuffer bb) {
                int keylength=bb.getInt();
                int valuelength=bb.getInt();
index d49ce65..b96a483 100644 (file)
@@ -5,7 +5,7 @@ import java.nio.ByteBuffer;
 class LastMessage extends Entry {
        private long machineid;
        private long seqnum;
-       
+
        LastMessage(Slot slot, long _machineid, long _seqnum) {
                super(slot);
                machineid=_machineid;
@@ -19,7 +19,7 @@ class LastMessage extends Entry {
        long getSequenceNumber() {
                return seqnum;
        }
-       
+
        static Entry decode(Slot slot, ByteBuffer bb) {
                long machineid=bb.getLong();
                long seqnum=bb.getLong();
@@ -31,7 +31,7 @@ class LastMessage extends Entry {
                bb.putLong(machineid);
                bb.putLong(seqnum);
        }
-       
+
        int getSize() {
                return 2*Long.BYTES+Byte.BYTES;
        }
index 1c81444..6f57a57 100644 (file)
@@ -1,23 +1,23 @@
 package iotcloud;
 
 public class Pair<A,B> {
-  private A a;
-  private B b;
+       private A a;
+       private B b;
 
-  public Pair(A a, B b) {
-    this.a=a;
-    this.b=b;
-  }
+       public Pair(A a, B b) {
+               this.a=a;
+               this.b=b;
+       }
 
-  public A getFirst() {
-    return a;
-  }
+       public A getFirst() {
+               return a;
+       }
 
-  public B getSecond() {
-    return b;
-  }
+       public B getSecond() {
+               return b;
+       }
 
-  public String toString() {
-    return "<"+a+","+b+">";
-  }
+       public String toString() {
+               return "<"+a+","+b+">";
+       }
 }
index 44059bf..bd52ed0 100644 (file)
@@ -3,9 +3,9 @@ import java.nio.ByteBuffer;
 
 class RejectedMessage extends Entry {
        private long machineid;
-       private long oldseqnum;//Oldest seqnum in range
-       private long newseqnum;//Newest seqnum in range (inclusive)
-       private boolean equalto;//Is message sent or not sent by machineid
+       private long oldseqnum;                                                                                         //Oldest seqnum in range
+       private long newseqnum;                                                                                         //Newest seqnum in range (inclusive)
+       private boolean equalto;                                                                                                                        //Is message sent or not sent by machineid
 
        RejectedMessage(Slot slot, long _machineid, long _oldseqnum, long _newseqnum, boolean _equalto) {
                super(slot);
@@ -30,7 +30,7 @@ class RejectedMessage extends Entry {
        long getMachineID() {
                return machineid;
        }
-       
+
        static Entry decode(Slot slot, ByteBuffer bb) {
                long machineid=bb.getLong();
                long oldseqnum=bb.getLong();
@@ -38,7 +38,7 @@ class RejectedMessage extends Entry {
                byte equalto=bb.get();
                return new RejectedMessage(slot, machineid, oldseqnum, newseqnum, equalto==1);
        }
-       
+
        void encode(ByteBuffer bb) {
                bb.put(Entry.TypeRejectedMessage);
                bb.putLong(machineid);
@@ -46,7 +46,7 @@ class RejectedMessage extends Entry {
                bb.putLong(newseqnum);
                bb.put(equalto?(byte)1:(byte)0);
        }
-       
+
        int getSize() {
                return 3*Long.BYTES + 2*Byte.BYTES;
        }
index 0452590..707b528 100644 (file)
@@ -14,7 +14,7 @@ class Slot implements Liveness {
        private long machineid;
        private Vector<Entry> entries;
        private int livecount;
-       
+
        Slot(long _seqnum, long _machineid, byte[] _prevhmac, byte[] _hmac) {
                seqnum=_seqnum;
                machineid=_machineid;
@@ -23,7 +23,7 @@ class Slot implements Liveness {
                entries=new Vector<Entry>();
                livecount=1;
        }
-       
+
        Slot(long _seqnum, byte[] _bytes) {
                seqnum=_seqnum;
        }
@@ -40,11 +40,11 @@ class Slot implements Liveness {
                entries.add(e);
                livecount++;
        }
-       
+
        Vector<Entry> getEntries() {
                return entries;
        }
-       
+
        static Slot decode(byte[] array, Mac mac) {
                mac.update(array, HMAC_SIZE, array.length-HMAC_SIZE);
                byte[] realmac=mac.doFinal();
@@ -61,18 +61,18 @@ class Slot implements Liveness {
                long machineid=bb.getLong();
                int numentries=bb.getInt();
                Slot slot=new Slot(seqnum, machineid, prevhmac, hmac);
-               
-               for(int i=0;i<numentries;i++) {
+
+               for(int i=0; i<numentries; i++) {
                        slot.addEntry(Entry.decode(slot, bb));
                }
-               
+
                return slot;
        }
 
        byte[] encode(Mac mac) {
                byte[] array=new byte[SLOT_SIZE];
                ByteBuffer bb=ByteBuffer.wrap(array);
-               bb.position(HMAC_SIZE); //Leave space for the HMACs
+               bb.position(HMAC_SIZE);                                                                                                                                                                                                                                                 //Leave space for the HMACs
                bb.put(prevhmac);
                bb.putLong(seqnum);
                bb.putLong(machineid);
@@ -87,7 +87,7 @@ class Slot implements Liveness {
                bb.put(realmac);
                return array;
        }
-       
+
        long getSequenceNumber() {
                return seqnum;
        }
@@ -95,7 +95,7 @@ class Slot implements Liveness {
        long getMachineID() {
                return machineid;
        }
-       
+
        byte[] getBytes() {
                return null;
        }
@@ -103,7 +103,7 @@ class Slot implements Liveness {
        void decrementLiveCount() {
                livecount--;
        }
-       
+
        boolean isLive() {
                return livecount > 0;
        }
index a2bac02..b975850 100644 (file)
@@ -7,7 +7,7 @@ class SlotBuffer {
        private int head;
        private int tail;
        private long oldestseqn;
-       
+
        SlotBuffer() {
                array=new Slot[DEFAULT_SIZE+1];
        }
@@ -17,7 +17,7 @@ class SlotBuffer {
                        return head - tail;
                return (array.length + head) - tail;
        }
-       
+
        void resize(int newsize) {
                if (newsize == (array.length-1))
                        return;
@@ -54,11 +54,11 @@ class SlotBuffer {
                                return null;
                        index-= array.length;
                }
-               
+
                if (index >= array.length ||
                                index >= head)
                        return null;
-               
+
                return array[index];
        }
 
index 4e344b7..00a82bf 100644 (file)
@@ -4,7 +4,7 @@ class SlotIndexer {
        private Slot[] updates;
        private SlotBuffer buffer;
        private long firstslotseqnum;
-       
+
        SlotIndexer(Slot[] _updates, SlotBuffer _buffer) {
                buffer = _buffer;
                updates = _updates;
index 6cd2b32..dcb74e2 100644 (file)
@@ -7,13 +7,13 @@ import javax.crypto.*;
 public class Table {
        int numslots;
        HashMap<IoTString, KeyValue> table=new HashMap<IoTString, KeyValue>();
-       HashMap<Long, Pair<Long, Liveness>> lastmessagetable=new HashMap<Long, Pair<Long, Liveness>>();
+       HashMap<Long, Pair<Long, Liveness> > lastmessagetable=new HashMap<Long, Pair<Long, Liveness> >();
        SlotBuffer buffer;
        CloudComm cloud;
        private Mac hmac;
        long sequencenumber;
        long localmachineid;
-       
+
        public Table(String baseurl, String password, long _localmachineid) {
                localmachineid=_localmachineid;
                buffer = new SlotBuffer();
@@ -63,7 +63,7 @@ public class Table {
        public IoTString put(IoTString key, IoTString value) {
                return null;
        }
-       
+
        void validateandupdate(Slot[] newslots) {
                //The cloud communication layer has checked slot HMACs already
                //before decoding
@@ -79,7 +79,7 @@ public class Table {
                for(Slot slot: newslots) {
                        processSlot(indexer, slot);
                }
-               
+
        }
 
        void processEntry(KeyValue entry, SlotIndexer indexer) {
@@ -100,7 +100,7 @@ public class Table {
                long newseqnum=entry.getNewSeqNum();
                boolean isequal=entry.getEqual();
                long machineid=entry.getMachineID();
-               for(long seqnum=oldseqnum;seqnum<=newseqnum;seqnum++) {
+               for(long seqnum=oldseqnum; seqnum<=newseqnum; seqnum++) {
                        Slot slot=indexer.getSlot(seqnum);
                        if (slot != null) {
                                long slotmachineid=slot.getMachineID();
@@ -110,9 +110,9 @@ public class Table {
                        }
                }
        }
-       
+
        void processEntry(TableStatus entry, SlotIndexer indexer, Slot slot) {
-               
+
        }
 
        void updateLastMessage(long machineid, long seqnum, Liveness liveness) {
@@ -129,7 +129,7 @@ public class Table {
                } else {
                        throw new Error("Unrecognized type");
                }
-               
+
                //Check that nothing funny happened
                if (machineid == localmachineid) {
                        if (lastmsgseqnum != seqnum)
@@ -139,7 +139,7 @@ public class Table {
                                throw new Error("Server Error: Rolback on remote machine sequence number");
                }
        }
-       
+
        void processSlot(SlotIndexer indexer, Slot slot) {
                updateLastMessage(slot.getMachineID(), slot.getSequenceNumber(), slot);
 
@@ -148,21 +148,25 @@ public class Table {
                        case Entry.TypeKeyValue:
                                processEntry((KeyValue)entry, indexer);
                                break;
+
                        case Entry.TypeLastMessage:
                                processEntry((LastMessage)entry, indexer);
                                break;
+
                        case Entry.TypeRejectedMessage:
                                processEntry((RejectedMessage)entry, indexer);
                                break;
+
                        case Entry.TypeTableStatus:
                                processEntry((TableStatus)entry, indexer, slot);
                                break;
+
                        default:
                                throw new Error("Unrecognized type: "+entry.getType());
                        }
                }
        }
-       
+
        void checkHMACChain(SlotIndexer indexer, Slot[] newslots) {
                for(int i=0; i < newslots.length; i++) {
                        Slot currslot=newslots[i];
index 05e5896..83aa9cc 100644 (file)
@@ -3,12 +3,12 @@ import java.nio.ByteBuffer;
 
 class TableStatus extends Entry {
        int maxslots;
-       
+
        TableStatus(Slot slot, int _maxslots) {
                super(slot);
                maxslots=_maxslots;
        }
-       
+
        static Entry decode(Slot slot, ByteBuffer bb) {
                int maxslots=bb.getInt();
                return new TableStatus(slot, maxslots);
@@ -22,7 +22,7 @@ class TableStatus extends Entry {
        int getSize() {
                return Integer.BYTES+Byte.BYTES;
        }
-       
+
        byte getType() {
                return Entry.TypeTableStatus;
        }
diff --git a/src/script/C.cfg b/src/script/C.cfg
new file mode 100644 (file)
index 0000000..6165d83
--- /dev/null
@@ -0,0 +1,37 @@
+indent_with_tabs = 2
+indent_cmt_with_tabs = True
+indent_columns = 2
+indent_class = True
+output_tab_size = 2
+nl_if_brace = Remove
+nl_brace_else = Remove
+nl_elseif_brace = Remove
+nl_struct_brace = Remove
+nl_union_brace = Remove
+nl_fcall_brace = Remove
+nl_for_brace = Remove
+nl_fdef_brace = Remove
+nl_while_brace = Remove
+nl_do_brace = Remove
+nl_brace_while = Remove
+nl_switch_brace = Remove
+nl_before_case = True
+nl_try_brace = Remove
+nl_catch_brace = Remove
+nl_brace_catch = Remove
+sp_func_proto_paren = Remove
+sp_func_def_paren = Remove
+sp_inside_fparens = remove
+sp_inside_fparen = remove
+sp_func_call_paren = Remove
+sp_fparen_brace = Add
+sp_sparen_brace = Add
+sp_paren_brace = Add
+sp_else_brace = Add
+sp_brace_else = Add
+sp_catch_brace = Add
+sp_brace_catch = Add
+sp_try_brace = Add
+sp_after_sparen = Add
+sp_cond_colon = remove
+sp_cond_question = remove
diff --git a/src/script/java.cfg b/src/script/java.cfg
new file mode 100644 (file)
index 0000000..6165d83
--- /dev/null
@@ -0,0 +1,37 @@
+indent_with_tabs = 2
+indent_cmt_with_tabs = True
+indent_columns = 2
+indent_class = True
+output_tab_size = 2
+nl_if_brace = Remove
+nl_brace_else = Remove
+nl_elseif_brace = Remove
+nl_struct_brace = Remove
+nl_union_brace = Remove
+nl_fcall_brace = Remove
+nl_for_brace = Remove
+nl_fdef_brace = Remove
+nl_while_brace = Remove
+nl_do_brace = Remove
+nl_brace_while = Remove
+nl_switch_brace = Remove
+nl_before_case = True
+nl_try_brace = Remove
+nl_catch_brace = Remove
+nl_brace_catch = Remove
+sp_func_proto_paren = Remove
+sp_func_def_paren = Remove
+sp_inside_fparens = remove
+sp_inside_fparen = remove
+sp_func_call_paren = Remove
+sp_fparen_brace = Add
+sp_sparen_brace = Add
+sp_paren_brace = Add
+sp_else_brace = Add
+sp_brace_else = Add
+sp_catch_brace = Add
+sp_brace_catch = Add
+sp_try_brace = Add
+sp_after_sparen = Add
+sp_cond_colon = remove
+sp_cond_question = remove
diff --git a/src/script/makefile b/src/script/makefile
new file mode 100644 (file)
index 0000000..ac2da6e
--- /dev/null
@@ -0,0 +1,4 @@
+tabbing:
+       uncrustify -c java.cfg --no-backup $$(find .. -name "*.java")
+       uncrustify -c C.cfg --no-backup $$(find .. -name "*.cpp")
+       uncrustify -c C.cfg --no-backup $$(find .. -name "*.h")
index 0dac1f7..e865468 100644 (file)
@@ -57,7 +57,7 @@ void IoTQuery::decodeQuery() {
        char * str=new char[len+1];
        memcpy(str, query, len+1);
        char *tok_ptr=str;
-       
+
        /* Parse commands */
        char *command=strsep(&tok_ptr, "&");
        if (strncmp(command, "req=putslot", 11) == 0)
@@ -79,7 +79,7 @@ void IoTQuery::decodeQuery() {
        //don't allow a really old sequence number
        if (requestsequencenumber < oldestentry)
                requestsequencenumber = oldestentry;
-       
+
        /* Update size if we get request */
        char * numqueueentries_str = tok_ptr;
        if (numqueueentries_str != NULL &&
@@ -87,7 +87,7 @@ void IoTQuery::decodeQuery() {
                numqueueentries_str = strchr(numqueueentries_str + 1, '=');
                numqueueentries = strtoll(numqueueentries_str, NULL, 10);
        }
-               
+
        delete str;
 }
 
@@ -144,7 +144,7 @@ void IoTQuery::getSlot() {
                delete filename;
        }
        const char header[]="getslot";
-       long long size=sizeof(header)-1+sizeof(numrequeststosend)+4*numrequeststosend+numbytes; //header + payload + file count + sizes
+       long long size=sizeof(header)-1+sizeof(numrequeststosend)+4*numrequeststosend+numbytes;                                                                                                                         //header + payload + file count + sizes
        char * response = new char[size];
        long long offset=0;
        memcpy(response, header, sizeof(header)-1);
@@ -153,26 +153,26 @@ void IoTQuery::getSlot() {
        cerr << numrequeststosend << " " << numreq << endl;
        memcpy(response + offset, &numreq, sizeof(numreq));
        offset+=sizeof(numrequeststosend);
-       for(int i=0;i<numrequeststosend;i++) {
+       for(int i=0; i<numrequeststosend; i++) {
                int filesize=htonl(filesizes[i]);
                memcpy(response + offset, &filesize, sizeof(filesize));
                offset+=sizeof(int);
        }
-       
+
        //copy file data
-       for(int i=0;i<numrequeststosend;i++) {
+       for(int i=0; i<numrequeststosend; i++) {
                if (fdarray[i]>=0) {
                        doRead(fdarray[i], response+offset, filesizes[i]);
                        offset+=filesizes[i];
                }
        }
-       
+
        //write response out
        sendResponse(response, size);
 
        //cleanup
        delete response;
-       for(int i=0;i<numrequeststosend;i++) {
+       for(int i=0; i<numrequeststosend; i++) {
                if (fdarray[i] >= 0)
                        close(fdarray[i]);
        }
@@ -189,15 +189,15 @@ void IoTQuery::putSlot() {
                //need to drop slot
                removeOldestSlot();
        }
-       
+
        //write slot data out to file
        char *filename = getSlotFileName(requestsequencenumber);
        int slotfd = open(filename, O_CREAT|O_WRONLY, S_IRUSR| S_IWUSR);
        doWrite(slotfd, data, length);
        close(slotfd);
        delete filename;
-       newestentry = requestsequencenumber; // update sequence number
-       updateStatusFile(); // update counts
+       newestentry = requestsequencenumber;                                                                                                    // update sequence number
+       updateStatusFile();                                                                                                                                             // update counts
        char command[]="putslot";
        sendResponse(command, sizeof(command)-1);
 }
@@ -206,12 +206,12 @@ void IoTQuery::sendResponse(char * bytes, int len) {
        cout << "Accept-Ranges: bytes\r\n"
                         << "Content-Length: " << len << "\r\n"
                         << "\r\n";
-       cout.write(bytes, len); 
+       cout.write(bytes, len);
 }
 
 char * IoTQuery::getSlotFileName(long long slot) {
        int directorylen=strlen(directory);
-       char * filename=new char[25+directorylen];//19 digits for long number + 4 characters for SLOT + 1 character for null termination
+       char * filename=new char[25+directorylen];                                                                                                              //19 digits for long number + 4 characters for SLOT + 1 character for null termination
        snprintf(filename, 24+directorylen+1, "%s/SLOT%lld", directory, slot);
        return filename;
 }
@@ -249,7 +249,7 @@ void IoTQuery::processQuery() {
        flock(fd, LOCK_EX);
 
        decodeQuery();
-       
+
        if (reqGetSlot)
                getSlot();
        else if (reqPutSlot)
@@ -332,7 +332,7 @@ bool IoTQuery::openStatusFile() {
                cerr << strerror(errno) << " error opening statusfile" << endl;
                return false;
        }
-       
+
        int size;
        int needwrite=0;
        if (doread(fd, &size, sizeof(size), OFFSET_MAX))
index 6e35f9c..05156b8 100644 (file)
 #define OFFSET_NEW 12
 
 class IoTQuery {
- public:
+public:
        IoTQuery(FCGX_Request * request);
        ~IoTQuery();
        void processQuery();
-       
- private:
+
+private:
        void sendResponse(char *data, int length);
        void getQuery();
        void getDirectory();
@@ -28,7 +28,7 @@ class IoTQuery {
        void putSlot();
        void removeOldestSlot();
        char * getSlotFileName(long long);
-       
+
        FCGX_Request * request;
        char *data;
        char *directory;
diff --git a/src/serverJ/.idea/compiler.xml b/src/serverJ/.idea/compiler.xml
deleted file mode 100644 (file)
index 05ea1dc..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="CompilerConfiguration">
-    <resourceExtensions />
-    <wildcardResourcePatterns>
-      <entry name="!?*.java" />
-      <entry name="!?*.form" />
-      <entry name="!?*.class" />
-      <entry name="!?*.groovy" />
-      <entry name="!?*.scala" />
-      <entry name="!?*.flex" />
-      <entry name="!?*.kt" />
-      <entry name="!?*.clj" />
-      <entry name="!?*.aj" />
-    </wildcardResourcePatterns>
-    <annotationProcessing>
-      <profile default="true" name="Default" enabled="false">
-        <processorPath useClasspath="true" />
-      </profile>
-      <profile default="false" name="Maven default annotation processors profile" enabled="true">
-        <sourceOutputDir name="target/generated-sources/annotations" />
-        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
-        <outputRelativeToContentRoot value="true" />
-        <processorPath useClasspath="true" />
-        <module name="serverJ" />
-      </profile>
-    </annotationProcessing>
-    <bytecodeTargetLevel>
-      <module name="serverJ" target="1.5" />
-    </bytecodeTargetLevel>
-  </component>
-</project>
\ No newline at end of file
diff --git a/src/serverJ/.idea/copyright/profiles_settings.xml b/src/serverJ/.idea/copyright/profiles_settings.xml
deleted file mode 100644 (file)
index e7bedf3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<component name="CopyrightManager">
-  <settings default="" />
-</component>
\ No newline at end of file
diff --git a/src/serverJ/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_52.xml b/src/serverJ/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_52.xml
deleted file mode 100644 (file)
index 4b942f1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: org.bouncycastle:bcprov-jdk15on:1.52">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcprov-jdk15on/1.52/bcprov-jdk15on-1.52.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcprov-jdk15on/1.52/bcprov-jdk15on-1.52-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/bouncycastle/bcprov-jdk15on/1.52/bcprov-jdk15on-1.52-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/src/serverJ/.idea/libraries/Maven__org_json_json_20090211.xml b/src/serverJ/.idea/libraries/Maven__org_json_json_20090211.xml
deleted file mode 100644 (file)
index e57dc0a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<component name="libraryTable">
-  <library name="Maven: org.json:json:20090211">
-    <CLASSES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/json/json/20090211/json-20090211.jar!/" />
-    </CLASSES>
-    <JAVADOC>
-      <root url="jar://$MAVEN_REPOSITORY$/org/json/json/20090211/json-20090211-javadoc.jar!/" />
-    </JAVADOC>
-    <SOURCES>
-      <root url="jar://$MAVEN_REPOSITORY$/org/json/json/20090211/json-20090211-sources.jar!/" />
-    </SOURCES>
-  </library>
-</component>
\ No newline at end of file
diff --git a/src/serverJ/.idea/misc.xml b/src/serverJ/.idea/misc.xml
deleted file mode 100644 (file)
index 233a7f0..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="EntryPointsManager">
-    <entry_points version="2.0" />
-  </component>
-  <component name="MavenProjectsManager">
-    <option name="originalFiles">
-      <list>
-        <option value="$PROJECT_DIR$/pom.xml" />
-      </list>
-    </option>
-  </component>
-  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
-    <OptionsSetting value="true" id="Add" />
-    <OptionsSetting value="true" id="Remove" />
-    <OptionsSetting value="true" id="Checkout" />
-    <OptionsSetting value="true" id="Update" />
-    <OptionsSetting value="true" id="Status" />
-    <OptionsSetting value="true" id="Edit" />
-    <ConfirmationsSetting value="0" id="Add" />
-    <ConfirmationsSetting value="0" id="Remove" />
-  </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
-</project>
\ No newline at end of file
diff --git a/src/serverJ/.idea/modules.xml b/src/serverJ/.idea/modules.xml
deleted file mode 100644 (file)
index ef33d7f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/serverJ.iml" filepath="$PROJECT_DIR$/serverJ.iml" />
-    </modules>
-  </component>
-</project>
\ No newline at end of file
diff --git a/src/serverJ/.idea/workspace.xml b/src/serverJ/.idea/workspace.xml
deleted file mode 100644 (file)
index 655dfea..0000000
+++ /dev/null
@@ -1,770 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ChangeListManager">
-    <list default="true" id="53e1ed7e-ba35-4bd4-8ed6-e9816ece6d70" name="Default" comment="" />
-    <ignored path="serverJ.iws" />
-    <ignored path=".idea/workspace.xml" />
-    <ignored path="$PROJECT_DIR$/out/" />
-    <ignored path="$PROJECT_DIR$/target/" />
-    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
-    <option name="TRACKING_ENABLED" value="true" />
-    <option name="SHOW_DIALOG" value="false" />
-    <option name="HIGHLIGHT_CONFLICTS" value="true" />
-    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
-    <option name="LAST_RESOLUTION" value="IGNORE" />
-  </component>
-  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
-  <component name="CreatePatchCommitExecutor">
-    <option name="PATCH_PATH" value="" />
-  </component>
-  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
-  <component name="FavoritesManager">
-    <favorites_list name="serverJ" />
-  </component>
-  <component name="FileEditorManager">
-    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file leaf-file-name="Slot.java" pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/iotcloud/iot/slots/Slot.java">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="462">
-              <caret line="21" column="10" selection-start-line="21" selection-start-column="10" selection-end-line="21" selection-end-column="10" />
-              <folding>
-                <element signature="imports" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-    </leaf>
-  </component>
-  <component name="FileTemplateManagerImpl">
-    <option name="RECENT_TEMPLATES">
-      <list>
-        <option value="Class" />
-      </list>
-    </option>
-  </component>
-  <component name="GradleLocalSettings">
-    <option name="externalProjectsViewState">
-      <projects_view />
-    </option>
-  </component>
-  <component name="IdeDocumentHistory">
-    <option name="CHANGED_PATHS">
-      <list>
-        <option value="$PROJECT_DIR$/src/main/java/com/iotcloud/iot/slot/slot.java" />
-        <option value="/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar!/javax/crypto/Mac.class" />
-        <option value="$PROJECT_DIR$/pom.xml" />
-        <option value="$PROJECT_DIR$/src/main/java/com/iotcloud/iot/slots/Slot.java" />
-      </list>
-    </option>
-  </component>
-  <component name="MavenImportPreferences">
-    <option name="generalSettings">
-      <MavenGeneralSettings>
-        <option name="mavenHome" value="Bundled (Maven 3)" />
-      </MavenGeneralSettings>
-    </option>
-    <option name="importingSettings">
-      <MavenImportingSettings>
-        <option name="importAutomatically" value="true" />
-      </MavenImportingSettings>
-    </option>
-  </component>
-  <component name="MavenProjectNavigator">
-    <treeState />
-  </component>
-  <component name="ProjectFrameBounds">
-    <option name="y" value="-1056" />
-    <option name="width" value="1920" />
-    <option name="height" value="1056" />
-  </component>
-  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
-    <OptionsSetting value="true" id="Add" />
-    <OptionsSetting value="true" id="Remove" />
-    <OptionsSetting value="true" id="Checkout" />
-    <OptionsSetting value="true" id="Update" />
-    <OptionsSetting value="true" id="Status" />
-    <OptionsSetting value="true" id="Edit" />
-    <ConfirmationsSetting value="0" id="Add" />
-    <ConfirmationsSetting value="0" id="Remove" />
-  </component>
-  <component name="ProjectView">
-    <navigator currentView="ProjectPane" proportions="" version="1">
-      <flattenPackages />
-      <showMembers />
-      <showModules />
-      <showLibraryContents />
-      <hideEmptyPackages />
-      <abbreviatePackageNames />
-      <autoscrollToSource />
-      <autoscrollFromSource />
-      <sortByType />
-      <manualOrder />
-      <foldersAlwaysOnTop value="true" />
-    </navigator>
-    <panes>
-      <pane id="Scope">
-        <subPane subId="Project Files">
-          <PATH>
-            <PATH_ELEMENT USER_OBJECT="Root">
-              <option name="myItemId" value="" />
-              <option name="myItemType" value="" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT USER_OBJECT="serverJ">
-              <option name="myItemId" value="" />
-              <option name="myItemType" value="" />
-            </PATH_ELEMENT>
-          </PATH>
-        </subPane>
-      </pane>
-      <pane id="Scratches" />
-      <pane id="PackagesPane">
-        <subPane />
-      </pane>
-      <pane id="ProjectPane">
-        <subPane>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="src" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="test" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="src" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="main" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="src" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="main" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="java" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="iot" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="slots" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="serverJ" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="src" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="main" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="java" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="iot" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-        </subPane>
-      </pane>
-    </panes>
-  </component>
-  <component name="PropertiesComponent">
-    <property name="project.structure.last.edited" value="Modules" />
-    <property name="project.structure.proportion" value="0.15" />
-    <property name="project.structure.side.proportion" value="0.2" />
-  </component>
-  <component name="RunManager" selected="Application.Unnamed">
-    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
-      <module name="" />
-      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
-      <option name="PROGRAM_PARAMETERS" />
-      <method />
-    </configuration>
-    <configuration default="true" type="AndroidRunConfigurationType" factoryName="Android Application">
-      <module name="" />
-      <option name="DEPLOY" value="true" />
-      <option name="ARTIFACT_NAME" value="" />
-      <option name="PM_INSTALL_OPTIONS" value="" />
-      <option name="ACTIVITY_EXTRA_FLAGS" value="" />
-      <option name="MODE" value="default_activity" />
-      <option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
-      <option name="PREFERRED_AVD" value="" />
-      <option name="CLEAR_LOGCAT" value="false" />
-      <option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
-      <option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
-      <option name="FORCE_STOP_RUNNING_APP" value="true" />
-      <option name="USE_LAST_SELECTED_DEVICE" value="false" />
-      <option name="PREFERRED_AVD" value="" />
-      <option name="DEEP_LINK" value="" />
-      <option name="ACTIVITY_CLASS" value="" />
-      <method />
-    </configuration>
-    <configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
-      <module name="" />
-      <option name="TESTING_TYPE" value="0" />
-      <option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
-      <option name="METHOD_NAME" value="" />
-      <option name="CLASS_NAME" value="" />
-      <option name="PACKAGE_NAME" value="" />
-      <option name="EXTRA_OPTIONS" value="" />
-      <option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
-      <option name="PREFERRED_AVD" value="" />
-      <option name="CLEAR_LOGCAT" value="false" />
-      <option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
-      <option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
-      <option name="FORCE_STOP_RUNNING_APP" value="true" />
-      <option name="USE_LAST_SELECTED_DEVICE" value="false" />
-      <option name="PREFERRED_AVD" value="" />
-      <method />
-    </configuration>
-    <configuration default="true" type="Applet" factoryName="Applet">
-      <option name="HTML_USED" value="false" />
-      <option name="WIDTH" value="400" />
-      <option name="HEIGHT" value="300" />
-      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
-      <module />
-      <method />
-    </configuration>
-    <configuration default="true" type="Application" factoryName="Application">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="VM_PARAMETERS" />
-      <option name="PROGRAM_PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <module name="" />
-      <envs />
-      <method />
-    </configuration>
-    <configuration default="true" type="GradleRunConfiguration" factoryName="Gradle">
-      <ExternalSystemSettings>
-        <option name="executionName" />
-        <option name="externalProjectPath" />
-        <option name="externalSystemIdString" value="GRADLE" />
-        <option name="scriptParameters" />
-        <option name="taskDescriptions">
-          <list />
-        </option>
-        <option name="taskNames">
-          <list />
-        </option>
-        <option name="vmOptions" />
-      </ExternalSystemSettings>
-      <method />
-    </configuration>
-    <configuration default="true" type="JUnit" factoryName="JUnit">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <module name="" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="PACKAGE_NAME" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="METHOD_NAME" />
-      <option name="TEST_OBJECT" value="class" />
-      <option name="VM_PARAMETERS" value="-ea" />
-      <option name="PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <option name="TEST_SEARCH_SCOPE">
-        <value defaultName="singleModule" />
-      </option>
-      <envs />
-      <patterns />
-      <method />
-    </configuration>
-    <configuration default="true" type="JUnitTestDiscovery" factoryName="JUnit Test Discovery" changeList="All">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <module name="" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="PACKAGE_NAME" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="METHOD_NAME" />
-      <option name="TEST_OBJECT" value="class" />
-      <option name="VM_PARAMETERS" />
-      <option name="PARAMETERS" />
-      <option name="WORKING_DIRECTORY" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <option name="TEST_SEARCH_SCOPE">
-        <value defaultName="singleModule" />
-      </option>
-      <envs />
-      <patterns />
-      <method />
-    </configuration>
-    <configuration default="true" type="JarApplication" factoryName="JAR Application">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <envs />
-      <method />
-    </configuration>
-    <configuration default="true" type="Java Scratch" factoryName="Java Scratch">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <option name="SCRATCH_FILE_ID" value="0" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="VM_PARAMETERS" />
-      <option name="PROGRAM_PARAMETERS" />
-      <option name="WORKING_DIRECTORY" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <module name="" />
-      <envs />
-      <method />
-    </configuration>
-    <configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="VM_PARAMETERS" />
-      <option name="PROGRAM_PARAMETERS" />
-      <option name="WORKING_DIRECTORY" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <module name="serverJ" />
-      <envs />
-      <method />
-    </configuration>
-    <configuration default="true" type="KotlinStandaloneScriptRunConfigurationType" factoryName="Kotlin script">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <option name="filePath" />
-      <option name="vmParameters" />
-      <option name="alternativeJrePath" />
-      <option name="programParameters" />
-      <option name="passParentEnvs" value="true" />
-      <option name="workingDirectory" />
-      <option name="isAlternativeJrePathEnabled" value="false" />
-      <envs />
-      <method />
-    </configuration>
-    <configuration default="true" type="Remote" factoryName="Remote">
-      <option name="USE_SOCKET_TRANSPORT" value="true" />
-      <option name="SERVER_MODE" value="false" />
-      <option name="SHMEM_ADDRESS" value="javadebug" />
-      <option name="HOST" value="localhost" />
-      <option name="PORT" value="5005" />
-      <method />
-    </configuration>
-    <configuration default="true" type="ScalaTestRunConfiguration" factoryName="ScalaTest">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <module name="" />
-      <setting name="path" value="" />
-      <setting name="package" value="" />
-      <setting name="vmparams" value="" />
-      <setting name="params" value="" />
-      <setting name="workingDirectory" value="" />
-      <setting name="searchForTest" value="Across module dependencies" />
-      <setting name="testName" value="" />
-      <setting name="testKind" value="Class" />
-      <setting name="showProgressMessages" value="true" />
-      <envs />
-      <method />
-    </configuration>
-    <configuration default="true" type="Specs2RunConfiguration" factoryName="Specs2">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <module name="" />
-      <setting name="path" value="" />
-      <setting name="package" value="" />
-      <setting name="vmparams" value="" />
-      <setting name="params" value="" />
-      <setting name="workingDirectory" value="" />
-      <setting name="searchForTest" value="Across module dependencies" />
-      <setting name="testName" value="" />
-      <setting name="testKind" value="Class" />
-      <setting name="showProgressMessages" value="true" />
-      <envs />
-      <method />
-    </configuration>
-    <configuration default="true" type="TestNG" factoryName="TestNG">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <module name="" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="SUITE_NAME" />
-      <option name="PACKAGE_NAME" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="METHOD_NAME" />
-      <option name="GROUP_NAME" />
-      <option name="TEST_OBJECT" value="CLASS" />
-      <option name="VM_PARAMETERS" value="-ea" />
-      <option name="PARAMETERS" />
-      <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
-      <option name="OUTPUT_DIRECTORY" />
-      <option name="ANNOTATION_TYPE" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <option name="TEST_SEARCH_SCOPE">
-        <value defaultName="singleModule" />
-      </option>
-      <option name="USE_DEFAULT_REPORTERS" value="false" />
-      <option name="PROPERTIES_FILE" />
-      <envs />
-      <properties />
-      <listeners />
-      <method />
-    </configuration>
-    <configuration default="true" type="TestNGTestDiscovery" factoryName="TestNG Test Discovery" changeList="All">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <module name="" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="SUITE_NAME" />
-      <option name="PACKAGE_NAME" />
-      <option name="MAIN_CLASS_NAME" />
-      <option name="METHOD_NAME" />
-      <option name="GROUP_NAME" />
-      <option name="TEST_OBJECT" value="CLASS" />
-      <option name="VM_PARAMETERS" />
-      <option name="PARAMETERS" />
-      <option name="WORKING_DIRECTORY" />
-      <option name="OUTPUT_DIRECTORY" />
-      <option name="ANNOTATION_TYPE" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <option name="TEST_SEARCH_SCOPE">
-        <value defaultName="singleModule" />
-      </option>
-      <option name="USE_DEFAULT_REPORTERS" value="false" />
-      <option name="PROPERTIES_FILE" />
-      <envs />
-      <properties />
-      <listeners />
-      <method />
-    </configuration>
-    <configuration default="true" type="uTestRunConfiguration" factoryName="utest">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <module name="" />
-      <setting name="path" value="" />
-      <setting name="package" value="" />
-      <setting name="vmparams" value="" />
-      <setting name="params" value="" />
-      <setting name="workingDirectory" value="" />
-      <setting name="searchForTest" value="Across module dependencies" />
-      <setting name="testName" value="" />
-      <setting name="testKind" value="Class" />
-      <setting name="showProgressMessages" value="true" />
-      <envs />
-      <method />
-    </configuration>
-    <configuration default="false" name="Unnamed" type="Application" factoryName="Application">
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
-      <option name="MAIN_CLASS_NAME" value="com.iotcloud.iot.slots.Slot" />
-      <option name="VM_PARAMETERS" value="" />
-      <option name="PROGRAM_PARAMETERS" value="" />
-      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
-      <option name="ENV_VARIABLES" />
-      <option name="PASS_PARENT_ENVS" value="true" />
-      <module name="serverJ" />
-      <envs />
-      <method />
-    </configuration>
-    <list size="1">
-      <item index="0" class="java.lang.String" itemvalue="Application.Unnamed" />
-    </list>
-  </component>
-  <component name="SbtLocalSettings">
-    <option name="externalProjectsViewState">
-      <projects_view />
-    </option>
-  </component>
-  <component name="ShelveChangesManager" show_recycled="false">
-    <option name="remove_strategy" value="false" />
-  </component>
-  <component name="TaskManager">
-    <task active="true" id="Default" summary="Default task">
-      <changelist id="53e1ed7e-ba35-4bd4-8ed6-e9816ece6d70" name="Default" comment="" />
-      <created>1469215057799</created>
-      <option name="number" value="Default" />
-      <option name="presentableId" value="Default" />
-      <updated>1469215057799</updated>
-    </task>
-    <servers />
-  </component>
-  <component name="ToolWindowManager">
-    <frame x="0" y="-1056" width="1920" height="1056" extended-state="6" />
-    <editor active="true" />
-    <layout>
-      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
-      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
-      <window_info id="Palette&#9;" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
-      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32960325" sideWeight="0.50208336" order="0" side_tool="true" content_ui="tabs" />
-      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3296875" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24618515" sideWeight="0.49583334" order="2" side_tool="false" content_ui="tabs" />
-      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
-      <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.15520833" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
-      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
-      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="true" content_ui="tabs" />
-      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
-      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32960325" sideWeight="0.49791667" order="7" side_tool="false" content_ui="tabs" />
-      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
-      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32960325" sideWeight="0.49791667" order="5" side_tool="false" content_ui="tabs" />
-      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="6" side_tool="false" content_ui="combo" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
-      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
-    </layout>
-  </component>
-  <component name="Vcs.Log.UiProperties">
-    <option name="RECENTLY_FILTERED_USER_GROUPS">
-      <collection />
-    </option>
-    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
-      <collection />
-    </option>
-  </component>
-  <component name="VcsContentAnnotationSettings">
-    <option name="myLimit" value="2678400000" />
-  </component>
-  <component name="VcsManagerConfiguration">
-    <ignored-roots>
-      <path value="$PROJECT_DIR$/../.." />
-    </ignored-roots>
-  </component>
-  <component name="XDebuggerManager">
-    <breakpoint-manager>
-      <option name="time" value="1" />
-    </breakpoint-manager>
-    <watches-manager />
-  </component>
-  <component name="antWorkspaceConfiguration">
-    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
-    <option name="FILTER_TARGETS" value="false" />
-  </component>
-  <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/iotcloud/iot/slots/Slot.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="418">
-          <caret line="19" column="0" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/pom.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="0">
-          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/iotcloud/iot/slots/Slot.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="0">
-          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/entry/Entry.java" />
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/iotcloud/iot/slot/slot.java" />
-    <entry file="jar:///usr/lib/jvm/java-8-oracle/jre/lib/jce.jar!/javax/crypto/Mac.class">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="506">
-          <caret line="26" column="23" selection-start-line="26" selection-start-column="23" selection-end-line="26" selection-end-column="23" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="jar:///usr/lib/jvm/java-8-oracle/jre/lib/jce.jar!/javax/crypto/interfaces/DHKey.class">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="22">
-          <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="jar:///usr/lib/jvm/java-8-oracle/jre/lib/jce.jar!/javax/crypto/NoSuchPaddingException.class">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="132">
-          <caret line="9" column="8" selection-start-line="9" selection-start-column="8" selection-end-line="9" selection-end-column="8" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/serverJ.iml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="308">
-          <caret line="14" column="9" selection-start-line="14" selection-start-column="9" selection-end-line="14" selection-end-column="9" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/pom.xml">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="374">
-          <caret line="17" column="12" selection-start-line="17" selection-start-column="12" selection-end-line="17" selection-end-column="12" />
-          <folding />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/iotcloud/iot/slots/Slot.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="462">
-          <caret line="21" column="10" selection-start-line="21" selection-start-column="10" selection-end-line="21" selection-end-column="10" />
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-  </component>
-  <component name="masterDetails">
-    <states>
-      <state key="ArtifactsStructureConfigurable.UI">
-        <settings>
-          <artifact-editor />
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
-      <state key="FacetStructureConfigurable.UI">
-        <settings>
-          <last-edited>No facets are configured</last-edited>
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
-      <state key="GlobalLibrariesConfigurable.UI">
-        <settings>
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
-      <state key="JdkListConfigurable.UI">
-        <settings>
-          <last-edited>1.8</last-edited>
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
-      <state key="ModuleStructureConfigurable.UI">
-        <settings>
-          <last-edited>serverJ</last-edited>
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-                <option value="0.6" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
-      <state key="ProjectLibrariesConfigurable.UI">
-        <settings>
-          <splitter-proportions>
-            <option name="proportions">
-              <list>
-                <option value="0.2" />
-              </list>
-            </option>
-          </splitter-proportions>
-        </settings>
-      </state>
-    </states>
-  </component>
-</project>
\ No newline at end of file
diff --git a/src/serverJ/pom.xml b/src/serverJ/pom.xml
deleted file mode 100644 (file)
index ec5d251..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <groupId>com.iotcloud.iot</groupId>
-    <artifactId>iotcloudserverlib</artifactId>
-    <version>1.0-SNAPSHOT</version>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.bouncycastle</groupId>
-            <artifactId>bcprov-jdk15on</artifactId>
-            <version>1.52</version>
-        </dependency>
-        <dependency>
-            <groupId>org.json</groupId>
-            <artifactId>json</artifactId>
-            <version>20090211</version>
-        </dependency>
-    </dependencies>
-
-
-</project>
\ No newline at end of file
diff --git a/src/serverJ/serverJ.iml b/src/serverJ/serverJ.iml
deleted file mode 100644 (file)
index 61230e4..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.52" level="project" />
-    <orderEntry type="library" name="Maven: org.json:json:20090211" level="project" />
-  </component>
-</module>
\ No newline at end of file
diff --git a/src/serverJ/src/main/java/com/iotcloud/iot/slots/Slot.java b/src/serverJ/src/main/java/com/iotcloud/iot/slots/Slot.java
deleted file mode 100644 (file)
index 33605e9..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.iotcloud.iot.slots;
-
-/**
- * Created by joel on 7/22/16.
- */
-
-import org.json.JSONException;
-import org.json.JSONObject;
-public class Slot {
-
-
-    //int is not a good choice for sequenceNumber I believe;
-
-    int sequenceNumber;
-    String slotValue;
-
-    public Slot(int sequenceNumber, String slotValue) {
-        this.sequenceNumber = sequenceNumber;
-        this.slotValue = slotValue;
-    }
-
-    public String toJsonString() throws JSONException {
-        JSONObject obj = new JSONObject();
-        obj.put(Integer.toString(this.sequenceNumber),this.slotValue);
-        return obj.toString();
-    }
-
-}