From 724c3c8da78f8a01a07688e93f5a2b2c5cd9c240 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Tue, 26 Feb 2019 14:49:24 +0400 Subject: [PATCH] Fixed package in classes of kademlia package. --- app/build.gradle | 7 +++- .../kademlia/DefaultConfiguration.java | 2 +- .../influence/kademlia/JKademliaNode.java | 42 +++++++++---------- .../influence/kademlia/KadConfiguration.java | 2 +- .../influence/kademlia/KadServer.java | 14 +++---- .../influence/kademlia/KadStatistician.java | 2 +- .../influence/kademlia/KademliaNode.java | 20 ++++----- .../influence/kademlia/Statistician.java | 2 +- .../influence/kademlia/dht/DHT.java | 14 +++---- .../influence/kademlia/dht/GetParameter.java | 4 +- .../kademlia/dht/JKademliaStorageEntry.java | 2 +- .../influence/kademlia/dht/KadContent.java | 4 +- .../influence/kademlia/dht/KademliaDHT.java | 12 +++--- .../kademlia/dht/KademliaStorageEntry.java | 2 +- .../dht/KademliaStorageEntryMetadata.java | 4 +- .../kademlia/dht/StorageEntryMetadata.java | 4 +- .../kademlia/dht/StoredContentManager.java | 10 ++--- .../exceptions/ContentExistException.java | 2 +- .../exceptions/ContentNotFoundException.java | 2 +- .../exceptions/KadServerDownException.java | 2 +- .../kademlia/exceptions/RoutingException.java | 2 +- .../exceptions/UnknownMessageException.java | 2 +- .../kademlia/message/AcknowledgeMessage.java | 4 +- .../kademlia/message/ConnectMessage.java | 4 +- .../kademlia/message/ConnectReceiver.java | 6 +-- .../message/ContentLookupMessage.java | 8 ++-- .../message/ContentLookupReceiver.java | 10 ++--- .../kademlia/message/ContentMessage.java | 8 ++-- .../message/KademliaMessageFactory.java | 4 +- .../influence/kademlia/message/Message.java | 2 +- .../kademlia/message/MessageFactory.java | 10 ++--- .../kademlia/message/NodeLookupMessage.java | 6 +-- .../kademlia/message/NodeLookupReceiver.java | 10 ++--- .../kademlia/message/NodeReplyMessage.java | 4 +- .../influence/kademlia/message/Receiver.java | 2 +- .../kademlia/message/SimpleMessage.java | 2 +- .../kademlia/message/SimpleReceiver.java | 2 +- .../kademlia/message/StoreContentMessage.java | 8 ++-- .../message/StoreContentReceiver.java | 8 ++-- .../kademlia/message/Streamable.java | 2 +- .../influence/kademlia/node/KademliaId.java | 4 +- .../kademlia/node/KeyComparator.java | 2 +- .../influence/kademlia/node/Node.java | 4 +- .../operation/BucketRefreshOperation.java | 10 ++--- .../kademlia/operation/ConnectOperation.java | 22 +++++----- .../operation/ContentLookupOperation.java | 38 ++++++++--------- .../operation/ContentRefreshOperation.java | 20 ++++----- .../operation/KadRefreshOperation.java | 10 ++--- .../operation/NodeLookupOperation.java | 26 ++++++------ .../kademlia/operation/Operation.java | 6 +-- .../kademlia/operation/PingOperation.java | 8 ++-- .../kademlia/operation/StoreOperation.java | 18 ++++---- .../influence/kademlia/routing/Contact.java | 4 +- .../routing/ContactLastSeenComparator.java | 2 +- .../kademlia/routing/JKademliaBucket.java | 6 +-- .../routing/JKademliaRoutingTable.java | 10 ++--- .../kademlia/routing/KademliaBucket.java | 4 +- .../routing/KademliaRoutingTable.java | 8 ++-- .../simulations/AutoRefreshOperation.java | 10 ++--- .../simulations/AutoRefreshOperation2.java | 10 ++--- .../simulations/ContentSendingTest.java | 12 +++--- .../simulations/ContentUpdatingTest.java | 12 +++--- .../kademlia/simulations/DHTContentImpl.java | 6 +-- .../simulations/NodeConnectionTest.java | 6 +-- .../simulations/RefreshOperationTest.java | 12 +++--- .../simulations/RoutingTableSimulation.java | 8 ++-- .../simulations/RoutingTableStateTesting.java | 8 ++-- .../kademlia/simulations/SaveStateTest.java | 6 +-- .../kademlia/simulations/SaveStateTest2.java | 10 ++--- .../simulations/SimpleMessageTest.java | 10 ++--- .../kademlia/simulations/Simulation.java | 2 +- .../kademlia/util/HashCalculator.java | 2 +- .../kademlia/util/RouteLengthChecker.java | 4 +- .../util/serializer/JsonDHTSerializer.java | 8 ++-- .../JsonRoutingTableSerializer.java | 10 ++--- .../util/serializer/JsonSerializer.java | 2 +- .../util/serializer/KadSerializer.java | 2 +- 77 files changed, 302 insertions(+), 297 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c9242df..185a9bd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,10 +19,15 @@ android { } dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar']) + def room_version = "2.1.0-alpha04" + + implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + implementation 'com.google.code.gson:gson:2.8.5' + implementation "androidx.room:room-runtime:$room_version" + annotationProcessor "androidx.room:room-compiler:$room_version" } diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/DefaultConfiguration.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/DefaultConfiguration.java index 5c1575e..8824c80 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/DefaultConfiguration.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/DefaultConfiguration.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia; +package io.github.chronosx88.influence.kademlia; import java.io.File; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/JKademliaNode.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/JKademliaNode.java index b56fd93..929116a 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/JKademliaNode.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/JKademliaNode.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia; +package io.github.chronosx88.influence.kademlia; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -11,26 +11,26 @@ import java.net.InetAddress; import java.util.NoSuchElementException; import java.util.Timer; import java.util.TimerTask; -import com.github.joshuakissoon.kademlia.dht.GetParameter; -import com.github.joshuakissoon.kademlia.dht.DHT; -import com.github.joshuakissoon.kademlia.dht.KadContent; -import com.github.joshuakissoon.kademlia.dht.KademliaDHT; -import com.github.joshuakissoon.kademlia.dht.JKademliaStorageEntry; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.exceptions.RoutingException; -import com.github.joshuakissoon.kademlia.message.MessageFactory; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.node.KademliaId; -import com.github.joshuakissoon.kademlia.operation.ConnectOperation; -import com.github.joshuakissoon.kademlia.operation.ContentLookupOperation; -import com.github.joshuakissoon.kademlia.operation.Operation; -import com.github.joshuakissoon.kademlia.operation.KadRefreshOperation; -import com.github.joshuakissoon.kademlia.operation.StoreOperation; -import com.github.joshuakissoon.kademlia.routing.JKademliaRoutingTable; -import com.github.joshuakissoon.kademlia.routing.KademliaRoutingTable; -import com.github.joshuakissoon.kademlia.util.serializer.JsonDHTSerializer; -import com.github.joshuakissoon.kademlia.util.serializer.JsonRoutingTableSerializer; -import com.github.joshuakissoon.kademlia.util.serializer.JsonSerializer; +import io.github.chronosx88.influence.kademlia.dht.GetParameter; +import io.github.chronosx88.influence.kademlia.dht.DHT; +import io.github.chronosx88.influence.kademlia.dht.KadContent; +import io.github.chronosx88.influence.kademlia.dht.KademliaDHT; +import io.github.chronosx88.influence.kademlia.dht.JKademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.exceptions.RoutingException; +import io.github.chronosx88.influence.kademlia.message.MessageFactory; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.operation.ConnectOperation; +import io.github.chronosx88.influence.kademlia.operation.ContentLookupOperation; +import io.github.chronosx88.influence.kademlia.operation.Operation; +import io.github.chronosx88.influence.kademlia.operation.KadRefreshOperation; +import io.github.chronosx88.influence.kademlia.operation.StoreOperation; +import io.github.chronosx88.influence.kademlia.routing.JKademliaRoutingTable; +import io.github.chronosx88.influence.kademlia.routing.KademliaRoutingTable; +import io.github.chronosx88.influence.kademlia.util.serializer.JsonDHTSerializer; +import io.github.chronosx88.influence.kademlia.util.serializer.JsonRoutingTableSerializer; +import io.github.chronosx88.influence.kademlia.util.serializer.JsonSerializer; /** * The main Kademlia Node on the network, this node manages everything for this local system. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/KadConfiguration.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/KadConfiguration.java index e3d8a42..da6fcc5 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/KadConfiguration.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/KadConfiguration.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia; +package io.github.chronosx88.influence.kademlia; /** * Interface that defines a KadConfiguration object diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/KadServer.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/KadServer.java index 76513c6..e3ea683 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/KadServer.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/KadServer.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia; +package io.github.chronosx88.influence.kademlia; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -13,11 +13,11 @@ import java.util.Map; import java.util.Random; import java.util.Timer; import java.util.TimerTask; -import com.github.joshuakissoon.kademlia.exceptions.KadServerDownException; -import com.github.joshuakissoon.kademlia.message.KademliaMessageFactory; -import com.github.joshuakissoon.kademlia.message.Message; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.message.Receiver; +import io.github.chronosx88.influence.kademlia.exceptions.KadServerDownException; +import io.github.chronosx88.influence.kademlia.message.KademliaMessageFactory; +import io.github.chronosx88.influence.kademlia.message.Message; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.message.Receiver; /** * The server that handles sending and receiving messages between nodes on the Kad Network @@ -104,7 +104,7 @@ public class KadServer * @return Integer The communication ID of this message * * @throws IOException - * @throws com.github.joshuakissoon.kademlia.exceptions.KadServerDownException + * @throws KadServerDownException */ public synchronized int sendMessage(Node to, Message msg, Receiver recv) throws IOException, KadServerDownException { diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/KadStatistician.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/KadStatistician.java index 41cdb9a..89660af 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/KadStatistician.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/KadStatistician.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia; +package io.github.chronosx88.influence.kademlia; /** * Specification for class that keeps statistics for a Kademlia instance. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/KademliaNode.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/KademliaNode.java index 20dadac..112c25b 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/KademliaNode.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/KademliaNode.java @@ -1,15 +1,15 @@ -package com.github.joshuakissoon.kademlia; +package io.github.chronosx88.influence.kademlia; import java.io.IOException; import java.util.NoSuchElementException; -import com.github.joshuakissoon.kademlia.dht.GetParameter; -import com.github.joshuakissoon.kademlia.dht.JKademliaStorageEntry; -import com.github.joshuakissoon.kademlia.dht.KadContent; -import com.github.joshuakissoon.kademlia.dht.KademliaDHT; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.exceptions.RoutingException; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.routing.KademliaRoutingTable; +import io.github.chronosx88.influence.kademlia.dht.GetParameter; +import io.github.chronosx88.influence.kademlia.dht.JKademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.dht.KadContent; +import io.github.chronosx88.influence.kademlia.dht.KademliaDHT; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.exceptions.RoutingException; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.routing.KademliaRoutingTable; /** * The main Kademlia Node on the network, this node manages everything for this local system. @@ -105,7 +105,7 @@ public interface KademliaNode * @return DHTContent The content * * @throws java.io.IOException - * @throws com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException + * @throws ContentNotFoundException */ public JKademliaStorageEntry get(GetParameter param) throws NoSuchElementException, IOException, ContentNotFoundException; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/Statistician.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/Statistician.java index b05e24f..a7df5e5 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/Statistician.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/Statistician.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia; +package io.github.chronosx88.influence.kademlia; import java.text.DecimalFormat; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/DHT.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/DHT.java index e9677c4..6de2df5 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/DHT.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/DHT.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.dht; +package io.github.chronosx88.influence.kademlia.dht; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -9,12 +9,12 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.List; import java.util.NoSuchElementException; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.exceptions.ContentExistException; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.node.KademliaId; -import com.github.joshuakissoon.kademlia.util.serializer.JsonSerializer; -import com.github.joshuakissoon.kademlia.util.serializer.KadSerializer; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.exceptions.ContentExistException; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.util.serializer.JsonSerializer; +import io.github.chronosx88.influence.kademlia.util.serializer.KadSerializer; /** * The main Distributed Hash Table class that manages the entire DHT diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/GetParameter.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/GetParameter.java index beaf803..28507d5 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/GetParameter.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/GetParameter.java @@ -1,6 +1,6 @@ -package com.github.joshuakissoon.kademlia.dht; +package io.github.chronosx88.influence.kademlia.dht; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * A GET request can get content based on Key, Owner, Type, etc diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/JKademliaStorageEntry.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/JKademliaStorageEntry.java index 45aa9e1..8a7e5b2 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/JKademliaStorageEntry.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/JKademliaStorageEntry.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.dht; +package io.github.chronosx88.influence.kademlia.dht; /** * A JKademliaStorageEntry class that is used to store a content on the DHT diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KadContent.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KadContent.java index 08019f5..db5007b 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KadContent.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KadContent.java @@ -1,6 +1,6 @@ -package com.github.joshuakissoon.kademlia.dht; +package io.github.chronosx88.influence.kademlia.dht; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Any piece of content that needs to be stored on the DHT diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaDHT.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaDHT.java index eb41bb4..8f1d566 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaDHT.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaDHT.java @@ -1,13 +1,13 @@ -package com.github.joshuakissoon.kademlia.dht; +package io.github.chronosx88.influence.kademlia.dht; import java.io.FileNotFoundException; import java.io.IOException; import java.util.List; import java.util.NoSuchElementException; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.node.KademliaId; -import com.github.joshuakissoon.kademlia.util.serializer.KadSerializer; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.util.serializer.KadSerializer; /** * The main Distributed Hash Table interface that manages the entire DHT @@ -100,7 +100,7 @@ public interface KademliaDHT * @param content The Content to Remove * * - * @throws com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException + * @throws ContentNotFoundException */ public void remove(KadContent content) throws ContentNotFoundException; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaStorageEntry.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaStorageEntry.java index b248474..70bcab0 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaStorageEntry.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaStorageEntry.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.dht; +package io.github.chronosx88.influence.kademlia.dht; /** * A StorageEntry interface for the storage entry class used to store a content on the DHT diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaStorageEntryMetadata.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaStorageEntryMetadata.java index 650db75..2221d48 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaStorageEntryMetadata.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/KademliaStorageEntryMetadata.java @@ -1,6 +1,6 @@ -package com.github.joshuakissoon.kademlia.dht; +package io.github.chronosx88.influence.kademlia.dht; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Keeps track of data for a Content stored in the DHT diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/StorageEntryMetadata.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/StorageEntryMetadata.java index f74aa19..8da66c1 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/StorageEntryMetadata.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/StorageEntryMetadata.java @@ -1,7 +1,7 @@ -package com.github.joshuakissoon.kademlia.dht; +package io.github.chronosx88.influence.kademlia.dht; import java.util.Objects; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Keeps track of data for a Content stored in the DHT diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/StoredContentManager.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/StoredContentManager.java index f745a3d..e6d49ef 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/StoredContentManager.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/dht/StoredContentManager.java @@ -1,13 +1,13 @@ -package com.github.joshuakissoon.kademlia.dht; +package io.github.chronosx88.influence.kademlia.dht; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; -import com.github.joshuakissoon.kademlia.exceptions.ContentExistException; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.exceptions.ContentExistException; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * It would be infeasible to keep all content in memory to be send when requested @@ -46,7 +46,7 @@ class StoredContentManager { if (!this.entries.containsKey(entry.getKey())) { - this.entries.put(entry.getKey(), new ArrayList<>()); + this.entries.put(entry.getKey(), new ArrayList()); } /* If this entry doesn't already exist, then we add it */ diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/ContentExistException.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/ContentExistException.java index b76133a..821a15d 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/ContentExistException.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/ContentExistException.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.exceptions; +package io.github.chronosx88.influence.kademlia.exceptions; /** * An exception used to indicate that a content already exist on the DHT diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/ContentNotFoundException.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/ContentNotFoundException.java index a568e66..0e92cff 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/ContentNotFoundException.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/ContentNotFoundException.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.exceptions; +package io.github.chronosx88.influence.kademlia.exceptions; /** * An exception used to indicate that a content does not exist on the DHT diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/KadServerDownException.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/KadServerDownException.java index 9757f8f..857f5a6 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/KadServerDownException.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/KadServerDownException.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.exceptions; +package io.github.chronosx88.influence.kademlia.exceptions; /** * An exception to be thrown whenever the Kad Server is down diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/RoutingException.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/RoutingException.java index 2d4e5b0..d89118b 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/RoutingException.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/RoutingException.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.exceptions; +package io.github.chronosx88.influence.kademlia.exceptions; import java.io.IOException; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/UnknownMessageException.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/UnknownMessageException.java index 1d9b048..d709ca9 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/UnknownMessageException.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/exceptions/UnknownMessageException.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.exceptions; +package io.github.chronosx88.influence.kademlia.exceptions; /** * An exception used to indicate an unknown message type or communication identifier diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/AcknowledgeMessage.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/AcknowledgeMessage.java index 421214b..cb744e9 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/AcknowledgeMessage.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/AcknowledgeMessage.java @@ -1,9 +1,9 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.Node; /** * A message used to acknowledge a request from a node; can be used in many situations. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ConnectMessage.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ConnectMessage.java index 9652b31..db59e4e 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ConnectMessage.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ConnectMessage.java @@ -1,9 +1,9 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.Node; /** * A message sent to another node requesting to connect to them. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ConnectReceiver.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ConnectReceiver.java index e7a8f49..574ab7b 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ConnectReceiver.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ConnectReceiver.java @@ -1,8 +1,8 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.IOException; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; /** * Receives a ConnectMessage and sends an AcknowledgeMessage as reply. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentLookupMessage.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentLookupMessage.java index 86bfea5..ea6c9a5 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentLookupMessage.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentLookupMessage.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import com.github.joshuakissoon.kademlia.dht.GetParameter; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.util.serializer.JsonSerializer; +import io.github.chronosx88.influence.kademlia.dht.GetParameter; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.util.serializer.JsonSerializer; /** * Messages used to send to another node requesting content. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentLookupReceiver.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentLookupReceiver.java index 0ce93d9..68e5fa2 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentLookupReceiver.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentLookupReceiver.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.IOException; import java.util.NoSuchElementException; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.dht.KademliaDHT; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.dht.KademliaDHT; /** * Responds to a ContentLookupMessage by sending a ContentMessage containing the requested content; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentMessage.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentMessage.java index d4e8c84..4638f24 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentMessage.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/ContentMessage.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import com.github.joshuakissoon.kademlia.dht.JKademliaStorageEntry; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.util.serializer.JsonSerializer; +import io.github.chronosx88.influence.kademlia.dht.JKademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.util.serializer.JsonSerializer; /** * A Message used to send content between nodes diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/KademliaMessageFactory.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/KademliaMessageFactory.java index 4505124..483cee8 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/KademliaMessageFactory.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/KademliaMessageFactory.java @@ -1,8 +1,8 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.IOException; -import com.github.joshuakissoon.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KadServer; /** * A factory that handles creating messages and receivers diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Message.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Message.java index de17277..1831599 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Message.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Message.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; public interface Message extends Streamable { diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/MessageFactory.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/MessageFactory.java index edd7ceb..d7e27ed 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/MessageFactory.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/MessageFactory.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.IOException; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.dht.KademliaDHT; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.dht.KademliaDHT; /** * Handles creating messages and receivers diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeLookupMessage.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeLookupMessage.java index 195b42a..e410e10 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeLookupMessage.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeLookupMessage.java @@ -1,10 +1,10 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * A message sent to other nodes requesting the K-Closest nodes to a key sent in this message. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeLookupReceiver.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeLookupReceiver.java index b7a7f20..a923485 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeLookupReceiver.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeLookupReceiver.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.IOException; import java.util.List; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.node.Node; /** * Receives a NodeLookupMessage and sends a NodeReplyMessage as reply with the K-Closest nodes to the ID sent. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeReplyMessage.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeReplyMessage.java index b76de1e..41db449 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeReplyMessage.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/NodeReplyMessage.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.Node; /** * A message used to connect nodes. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Receiver.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Receiver.java index 169f873..4ace84d 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Receiver.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Receiver.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.IOException; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/SimpleMessage.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/SimpleMessage.java index 5cc42d8..212988d 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/SimpleMessage.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/SimpleMessage.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/SimpleReceiver.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/SimpleReceiver.java index fe86e1f..10acf2a 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/SimpleReceiver.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/SimpleReceiver.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.IOException; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/StoreContentMessage.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/StoreContentMessage.java index 8c30860..c71cad3 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/StoreContentMessage.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/StoreContentMessage.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; -import com.github.joshuakissoon.kademlia.dht.JKademliaStorageEntry; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.util.serializer.JsonSerializer; +import io.github.chronosx88.influence.kademlia.dht.JKademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.util.serializer.JsonSerializer; /** * A StoreContentMessage used to send a store message to a node diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/StoreContentReceiver.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/StoreContentReceiver.java index e85b728..b4e1424 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/StoreContentReceiver.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/StoreContentReceiver.java @@ -1,9 +1,9 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.IOException; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.dht.KademliaDHT; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.dht.KademliaDHT; /** * Receiver for incoming StoreContentMessage diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Streamable.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Streamable.java index 0f3573d..ee068cb 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Streamable.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/message/Streamable.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.message; +package io.github.chronosx88.influence.kademlia.message; import java.io.DataInputStream; import java.io.DataOutputStream; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/node/KademliaId.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/node/KademliaId.java index 3eb4a5d..c5e0b54 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/node/KademliaId.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/node/KademliaId.java @@ -3,7 +3,7 @@ * @created 20140215 * @desc Represents a Kademlia Node ID */ -package com.github.joshuakissoon.kademlia.node; +package io.github.chronosx88.influence.kademlia.node; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -13,7 +13,7 @@ import java.math.BigInteger; import java.util.Arrays; import java.util.BitSet; import java.util.Random; -import com.github.joshuakissoon.kademlia.message.Streamable; +import io.github.chronosx88.influence.kademlia.message.Streamable; public class KademliaId implements Streamable, Serializable { diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/node/KeyComparator.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/node/KeyComparator.java index 99c2454..aa2f495 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/node/KeyComparator.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/node/KeyComparator.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.node; +package io.github.chronosx88.influence.kademlia.node; import java.math.BigInteger; import java.util.Comparator; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/node/Node.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/node/Node.java index 7b2b91b..3a253d6 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/node/Node.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/node/Node.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.node; +package io.github.chronosx88.influence.kademlia.node; import java.io.DataInputStream; import java.io.DataOutputStream; @@ -6,7 +6,7 @@ import java.io.IOException; import java.io.Serializable; import java.net.InetAddress; import java.net.InetSocketAddress; -import com.github.joshuakissoon.kademlia.message.Streamable; +import io.github.chronosx88.influence.kademlia.message.Streamable; /** * A Node in the Kademlia network - Contains basic node network information. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/BucketRefreshOperation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/BucketRefreshOperation.java index 03a7327..6c6cdd3 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/BucketRefreshOperation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/BucketRefreshOperation.java @@ -1,10 +1,10 @@ -package com.github.joshuakissoon.kademlia.operation; +package io.github.chronosx88.influence.kademlia.operation; import java.io.IOException; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * At each time interval t, nodes need to refresh their K-Buckets diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ConnectOperation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ConnectOperation.java index ba15621..09b1e0b 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ConnectOperation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ConnectOperation.java @@ -3,19 +3,19 @@ * @created 20140218 * @desc Operation that handles connecting to an existing Kademlia network using a bootstrap node */ -package com.github.joshuakissoon.kademlia.operation; +package io.github.chronosx88.influence.kademlia.operation; -import com.github.joshuakissoon.kademlia.message.Receiver; +import io.github.chronosx88.influence.kademlia.message.Receiver; import java.io.IOException; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.exceptions.RoutingException; -import com.github.joshuakissoon.kademlia.message.AcknowledgeMessage; -import com.github.joshuakissoon.kademlia.message.ConnectMessage; -import com.github.joshuakissoon.kademlia.message.Message; -import com.github.joshuakissoon.kademlia.node.Node; + +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.exceptions.RoutingException; +import io.github.chronosx88.influence.kademlia.message.AcknowledgeMessage; +import io.github.chronosx88.influence.kademlia.message.ConnectMessage; +import io.github.chronosx88.influence.kademlia.message.Message; +import io.github.chronosx88.influence.kademlia.node.Node; public class ConnectOperation implements Operation, Receiver { diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ContentLookupOperation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ContentLookupOperation.java index 0058c3b..6b1e60b 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ContentLookupOperation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ContentLookupOperation.java @@ -1,6 +1,6 @@ -package com.github.joshuakissoon.kademlia.operation; +package io.github.chronosx88.influence.kademlia.operation; -import com.github.joshuakissoon.kademlia.message.Receiver; +import io.github.chronosx88.influence.kademlia.message.Receiver; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; @@ -10,21 +10,21 @@ import java.util.List; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.dht.GetParameter; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.dht.JKademliaStorageEntry; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.exceptions.RoutingException; -import com.github.joshuakissoon.kademlia.exceptions.UnknownMessageException; -import com.github.joshuakissoon.kademlia.message.ContentLookupMessage; -import com.github.joshuakissoon.kademlia.message.ContentMessage; -import com.github.joshuakissoon.kademlia.message.Message; -import com.github.joshuakissoon.kademlia.message.NodeReplyMessage; -import com.github.joshuakissoon.kademlia.node.KeyComparator; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.util.RouteLengthChecker; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.dht.GetParameter; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.dht.JKademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.exceptions.RoutingException; +import io.github.chronosx88.influence.kademlia.exceptions.UnknownMessageException; +import io.github.chronosx88.influence.kademlia.message.ContentLookupMessage; +import io.github.chronosx88.influence.kademlia.message.ContentMessage; +import io.github.chronosx88.influence.kademlia.message.Message; +import io.github.chronosx88.influence.kademlia.message.NodeReplyMessage; +import io.github.chronosx88.influence.kademlia.node.KeyComparator; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.util.RouteLengthChecker; /** * Looks up a specified identifier and returns the value associated with it @@ -92,7 +92,7 @@ public class ContentLookupOperation implements Operation, Receiver /** * @throws java.io.IOException - * @throws com.github.joshuakissoon.kademlia.exceptions.RoutingException + * @throws RoutingException */ @Override public synchronized void execute() throws IOException, RoutingException @@ -318,7 +318,7 @@ public class ContentLookupOperation implements Operation, Receiver /** * @return The list of all content found during the lookup operation * - * @throws com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException + * @throws ContentNotFoundException */ public JKademliaStorageEntry getContentFound() throws ContentNotFoundException { diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ContentRefreshOperation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ContentRefreshOperation.java index f9df8e0..72b757e 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ContentRefreshOperation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/ContentRefreshOperation.java @@ -1,16 +1,16 @@ -package com.github.joshuakissoon.kademlia.operation; +package io.github.chronosx88.influence.kademlia.operation; import java.io.IOException; import java.util.List; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.dht.KademliaDHT; -import com.github.joshuakissoon.kademlia.dht.KademliaStorageEntryMetadata; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.message.Message; -import com.github.joshuakissoon.kademlia.message.StoreContentMessage; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.dht.KademliaDHT; +import io.github.chronosx88.influence.kademlia.dht.KademliaStorageEntryMetadata; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.message.Message; +import io.github.chronosx88.influence.kademlia.message.StoreContentMessage; +import io.github.chronosx88.influence.kademlia.node.Node; /** * Refresh/Restore the data on this node by sending the data to the K-Closest nodes to the data diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/KadRefreshOperation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/KadRefreshOperation.java index 664dd89..a4bd5dd 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/KadRefreshOperation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/KadRefreshOperation.java @@ -1,10 +1,10 @@ -package com.github.joshuakissoon.kademlia.operation; +package io.github.chronosx88.influence.kademlia.operation; import java.io.IOException; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.dht.KademliaDHT; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.dht.KademliaDHT; /** * An operation that handles refreshing the entire Kademlia Systems including buckets and content diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/NodeLookupOperation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/NodeLookupOperation.java index f0e3621..5a40035 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/NodeLookupOperation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/NodeLookupOperation.java @@ -1,6 +1,6 @@ -package com.github.joshuakissoon.kademlia.operation; +package io.github.chronosx88.influence.kademlia.operation; -import com.github.joshuakissoon.kademlia.message.Receiver; +import io.github.chronosx88.influence.kademlia.message.Receiver; import java.io.IOException; import java.util.ArrayList; import java.util.Comparator; @@ -8,16 +8,16 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.exceptions.RoutingException; -import com.github.joshuakissoon.kademlia.message.Message; -import com.github.joshuakissoon.kademlia.message.NodeLookupMessage; -import com.github.joshuakissoon.kademlia.message.NodeReplyMessage; -import com.github.joshuakissoon.kademlia.node.KeyComparator; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.exceptions.RoutingException; +import io.github.chronosx88.influence.kademlia.message.Message; +import io.github.chronosx88.influence.kademlia.message.NodeLookupMessage; +import io.github.chronosx88.influence.kademlia.message.NodeReplyMessage; +import io.github.chronosx88.influence.kademlia.node.KeyComparator; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Finds the K closest nodes to a specified identifier @@ -78,7 +78,7 @@ public class NodeLookupOperation implements Operation, Receiver /** * @throws java.io.IOException - * @throws com.github.joshuakissoon.kademlia.exceptions.RoutingException + * @throws RoutingException */ @Override public synchronized void execute() throws IOException, RoutingException diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/Operation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/Operation.java index e491870..6e30575 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/Operation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/Operation.java @@ -1,7 +1,7 @@ -package com.github.joshuakissoon.kademlia.operation; +package io.github.chronosx88.influence.kademlia.operation; import java.io.IOException; -import com.github.joshuakissoon.kademlia.exceptions.RoutingException; +import io.github.chronosx88.influence.kademlia.exceptions.RoutingException; /** * An operation in the Kademlia routing protocol @@ -15,7 +15,7 @@ public interface Operation /** * Starts an operation and returns when the operation is finished * - * @throws com.github.joshuakissoon.kademlia.exceptions.RoutingException + * @throws RoutingException */ public void execute() throws IOException, RoutingException; } diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/PingOperation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/PingOperation.java index 33daad4..4c5e72e 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/PingOperation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/PingOperation.java @@ -5,12 +5,12 @@ * @author Joshua Kissoon * @since 20140218 */ -package com.github.joshuakissoon.kademlia.operation; +package io.github.chronosx88.influence.kademlia.operation; import java.io.IOException; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.exceptions.RoutingException; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.exceptions.RoutingException; +import io.github.chronosx88.influence.kademlia.node.Node; public class PingOperation implements Operation { diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/StoreOperation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/StoreOperation.java index 852e2aa..5ff82c5 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/StoreOperation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/operation/StoreOperation.java @@ -1,15 +1,15 @@ -package com.github.joshuakissoon.kademlia.operation; +package io.github.chronosx88.influence.kademlia.operation; import java.io.IOException; import java.util.List; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.KadServer; -import com.github.joshuakissoon.kademlia.KademliaNode; -import com.github.joshuakissoon.kademlia.dht.JKademliaStorageEntry; -import com.github.joshuakissoon.kademlia.dht.KademliaDHT; -import com.github.joshuakissoon.kademlia.message.Message; -import com.github.joshuakissoon.kademlia.message.StoreContentMessage; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.KadServer; +import io.github.chronosx88.influence.kademlia.KademliaNode; +import io.github.chronosx88.influence.kademlia.dht.JKademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.dht.KademliaDHT; +import io.github.chronosx88.influence.kademlia.message.Message; +import io.github.chronosx88.influence.kademlia.message.StoreContentMessage; +import io.github.chronosx88.influence.kademlia.node.Node; /** * Operation that stores a DHT Content onto the K closest nodes to the content Key diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/Contact.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/Contact.java index 2526c82..c1a8346 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/Contact.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/Contact.java @@ -1,6 +1,6 @@ -package com.github.joshuakissoon.kademlia.routing; +package io.github.chronosx88.influence.kademlia.routing; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.Node; /** * Keeps information about contacts of the Node; Contacts are stored in the Buckets in the Routing Table. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/ContactLastSeenComparator.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/ContactLastSeenComparator.java index 1f00194..9c61e06 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/ContactLastSeenComparator.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/ContactLastSeenComparator.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.routing; +package io.github.chronosx88.influence.kademlia.routing; import java.util.Comparator; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/JKademliaBucket.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/JKademliaBucket.java index 8492346..694ca7f 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/JKademliaBucket.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/JKademliaBucket.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.routing; +package io.github.chronosx88.influence.kademlia.routing; import java.util.ArrayList; import java.util.List; import java.util.NoSuchElementException; import java.util.TreeSet; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.node.Node; /** * A bucket in the Kademlia routing table diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/JKademliaRoutingTable.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/JKademliaRoutingTable.java index e24bb4f..4f0273d 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/JKademliaRoutingTable.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/JKademliaRoutingTable.java @@ -1,12 +1,12 @@ -package com.github.joshuakissoon.kademlia.routing; +package io.github.chronosx88.influence.kademlia.routing; import java.util.ArrayList; import java.util.List; import java.util.TreeSet; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.node.KeyComparator; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.node.KeyComparator; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Implementation of a Kademlia routing table diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/KademliaBucket.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/KademliaBucket.java index af5012f..f0e4058 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/KademliaBucket.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/KademliaBucket.java @@ -1,7 +1,7 @@ -package com.github.joshuakissoon.kademlia.routing; +package io.github.chronosx88.influence.kademlia.routing; import java.util.List; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.Node; /** * A bucket used to store Contacts in the routing table. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/KademliaRoutingTable.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/KademliaRoutingTable.java index 7129421..d1ac3f5 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/KademliaRoutingTable.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/routing/KademliaRoutingTable.java @@ -1,9 +1,9 @@ -package com.github.joshuakissoon.kademlia.routing; +package io.github.chronosx88.influence.kademlia.routing; import java.util.List; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.node.Node; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Specification for Kademlia's Routing Table diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/AutoRefreshOperation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/AutoRefreshOperation.java index c9b7a51..97504e9 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/AutoRefreshOperation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/AutoRefreshOperation.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; import java.util.Timer; import java.util.TimerTask; -import com.github.joshuakissoon.kademlia.DefaultConfiguration; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.DefaultConfiguration; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Testing the Kademlia Auto Content and Node table refresh operations diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/AutoRefreshOperation2.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/AutoRefreshOperation2.java index 6e8ae6d..03e84d8 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/AutoRefreshOperation2.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/AutoRefreshOperation2.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; import java.util.Timer; import java.util.TimerTask; -import com.github.joshuakissoon.kademlia.DefaultConfiguration; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.DefaultConfiguration; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Testing the Kademlia Auto Content and Node table refresh operations diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/ContentSendingTest.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/ContentSendingTest.java index 3e67afb..7b4b646 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/ContentSendingTest.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/ContentSendingTest.java @@ -1,12 +1,12 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; import java.io.IOException; import java.util.UUID; -import com.github.joshuakissoon.kademlia.dht.GetParameter; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.dht.KademliaStorageEntry; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.dht.GetParameter; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.dht.KademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Testing sending and receiving content between 2 Nodes on a network diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/ContentUpdatingTest.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/ContentUpdatingTest.java index 048d3ce..8eb5376 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/ContentUpdatingTest.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/ContentUpdatingTest.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; import java.io.IOException; -import com.github.joshuakissoon.kademlia.dht.GetParameter; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.dht.KademliaStorageEntry; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.dht.GetParameter; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.dht.KademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Testing sending and receiving content between 2 Nodes on a network diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/DHTContentImpl.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/DHTContentImpl.java index 2df4e79..9688043 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/DHTContentImpl.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/DHTContentImpl.java @@ -1,8 +1,8 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; import com.google.gson.Gson; -import com.github.joshuakissoon.kademlia.dht.KadContent; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.dht.KadContent; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * A simple DHT Content object to test DHT storage diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/NodeConnectionTest.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/NodeConnectionTest.java index 97727c0..d97f857 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/NodeConnectionTest.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/NodeConnectionTest.java @@ -1,8 +1,8 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; import java.io.IOException; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Testing connecting 2 nodes to each other diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RefreshOperationTest.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RefreshOperationTest.java index 3c97c47..5f00638 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RefreshOperationTest.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RefreshOperationTest.java @@ -1,11 +1,11 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; import java.io.IOException; -import com.github.joshuakissoon.kademlia.dht.GetParameter; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.dht.KademliaStorageEntry; -import com.github.joshuakissoon.kademlia.exceptions.ContentNotFoundException; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.dht.GetParameter; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.dht.KademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.exceptions.ContentNotFoundException; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Testing sending and receiving content between 2 Nodes on a network diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RoutingTableSimulation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RoutingTableSimulation.java index 9170e9e..541d9c3 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RoutingTableSimulation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RoutingTableSimulation.java @@ -1,8 +1,8 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.node.KademliaId; -import com.github.joshuakissoon.kademlia.routing.KademliaRoutingTable; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.routing.KademliaRoutingTable; /** * Testing how the routing table works and checking if everything works properly diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RoutingTableStateTesting.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RoutingTableStateTesting.java index d5b290b..4367df9 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RoutingTableStateTesting.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/RoutingTableStateTesting.java @@ -1,10 +1,10 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; import java.io.IOException; import java.util.Scanner; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.dht.KadContent; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.dht.KadContent; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Testing how the routing table works and it's state after different operations diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SaveStateTest.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SaveStateTest.java index db3ac56..4122d15 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SaveStateTest.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SaveStateTest.java @@ -1,7 +1,7 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Testing the save and retrieve state operations diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SaveStateTest2.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SaveStateTest2.java index 287fdcd..562dd9d 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SaveStateTest2.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SaveStateTest2.java @@ -1,9 +1,9 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.dht.GetParameter; -import com.github.joshuakissoon.kademlia.dht.KademliaStorageEntry; -import com.github.joshuakissoon.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.dht.GetParameter; +import io.github.chronosx88.influence.kademlia.dht.KademliaStorageEntry; +import io.github.chronosx88.influence.kademlia.node.KademliaId; /** * Testing the save and retrieve state operations. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SimpleMessageTest.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SimpleMessageTest.java index f98035e..1f7239c 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SimpleMessageTest.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/SimpleMessageTest.java @@ -1,10 +1,10 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; import java.io.IOException; -import com.github.joshuakissoon.kademlia.JKademliaNode; -import com.github.joshuakissoon.kademlia.message.SimpleMessage; -import com.github.joshuakissoon.kademlia.node.KademliaId; -import com.github.joshuakissoon.kademlia.message.SimpleReceiver; +import io.github.chronosx88.influence.kademlia.JKademliaNode; +import io.github.chronosx88.influence.kademlia.message.SimpleMessage; +import io.github.chronosx88.influence.kademlia.node.KademliaId; +import io.github.chronosx88.influence.kademlia.message.SimpleReceiver; /** * Test 1: Try sending a simple message between nodes diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/Simulation.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/Simulation.java index fa4fbdf..80bcd35 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/Simulation.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/simulations/Simulation.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.simulations; +package io.github.chronosx88.influence.kademlia.simulations; /** * A class that specifies the structure for simulations. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/HashCalculator.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/HashCalculator.java index f866811..edde403 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/HashCalculator.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/HashCalculator.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.util; +package io.github.chronosx88.influence.kademlia.util; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/RouteLengthChecker.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/RouteLengthChecker.java index b121da8..781c82f 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/RouteLengthChecker.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/RouteLengthChecker.java @@ -1,8 +1,8 @@ -package com.github.joshuakissoon.kademlia.util; +package io.github.chronosx88.influence.kademlia.util; import java.util.Collection; import java.util.HashMap; -import com.github.joshuakissoon.kademlia.node.Node; +import io.github.chronosx88.influence.kademlia.node.Node; /** * Class that helps compute the route length taken to complete an operation. diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonDHTSerializer.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonDHTSerializer.java index 939dd0d..f087200 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonDHTSerializer.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonDHTSerializer.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.util.serializer; +package io.github.chronosx88.influence.kademlia.util.serializer; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -11,9 +11,9 @@ import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.lang.reflect.Type; import java.util.List; -import com.github.joshuakissoon.kademlia.dht.DHT; -import com.github.joshuakissoon.kademlia.dht.KademliaDHT; -import com.github.joshuakissoon.kademlia.dht.KademliaStorageEntryMetadata; +import io.github.chronosx88.influence.kademlia.dht.DHT; +import io.github.chronosx88.influence.kademlia.dht.KademliaDHT; +import io.github.chronosx88.influence.kademlia.dht.KademliaStorageEntryMetadata; /** * A KadSerializer that serializes DHT to JSON format diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonRoutingTableSerializer.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonRoutingTableSerializer.java index 8d01b81..aa6e883 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonRoutingTableSerializer.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonRoutingTableSerializer.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.util.serializer; +package io.github.chronosx88.influence.kademlia.util.serializer; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -9,12 +9,12 @@ import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; -import com.github.joshuakissoon.kademlia.routing.JKademliaRoutingTable; +import io.github.chronosx88.influence.kademlia.routing.JKademliaRoutingTable; import java.lang.reflect.Type; import java.util.List; -import com.github.joshuakissoon.kademlia.KadConfiguration; -import com.github.joshuakissoon.kademlia.routing.Contact; -import com.github.joshuakissoon.kademlia.routing.KademliaRoutingTable; +import io.github.chronosx88.influence.kademlia.KadConfiguration; +import io.github.chronosx88.influence.kademlia.routing.Contact; +import io.github.chronosx88.influence.kademlia.routing.KademliaRoutingTable; /** * A KadSerializer that serializes routing tables to JSON format diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonSerializer.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonSerializer.java index d8ac462..04b8fe8 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonSerializer.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/JsonSerializer.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.util.serializer; +package io.github.chronosx88.influence.kademlia.util.serializer; import com.google.gson.Gson; import com.google.gson.stream.JsonReader; diff --git a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/KadSerializer.java b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/KadSerializer.java index 92ad7d4..4db67b1 100644 --- a/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/KadSerializer.java +++ b/app/src/main/java/io/github/chronosx88/influence/kademlia/util/serializer/KadSerializer.java @@ -1,4 +1,4 @@ -package com.github.joshuakissoon.kademlia.util.serializer; +package io.github.chronosx88.influence.kademlia.util.serializer; import java.io.DataInputStream; import java.io.DataOutputStream;