Renamed SimpleRegistry to Registry.

Voter-Registry
Vladimir Eliezer Tokarev 2016-03-04 06:06:37 -08:00
parent 9c52eff109
commit d9272c9f94
3 changed files with 14 additions and 14 deletions

View File

@ -30,7 +30,7 @@ ext {
nexusPassword = project.hasProperty('nexusPassword') ? project.property('nexusPassword') : ""
}
description = "Meerkat Voter SimpleRegistry application"
description = "Meerkat Voter Registry application"
// Your project version
version = "0.0"

View File

@ -25,16 +25,16 @@ import java.util.List;
* Created by Vladimir Eliezer Tokarev on 1/8/2016.
* Gives the ability to synchronously manage voters information
*/
public class SimpleRegistry implements VoterRegistry{
public class Registry implements VoterRegistry{
protected DigitalSignature signer;
protected AsyncBulletinBoardClient bulletinBoardClient ;
protected Crypto.Signature signature;
protected InputStream certificateStream;
public SimpleRegistry(DigitalSignature signer,
AsyncBulletinBoardClient communicator,
InputStream certificateStream) {
public Registry(DigitalSignature signer,
AsyncBulletinBoardClient communicator,
InputStream certificateStream) {
this.signer = signer;
this.bulletinBoardClient = communicator;
this.certificateStream = certificateStream;

View File

@ -1,9 +1,9 @@
import com.google.common.util.concurrent.FutureCallback;
import com.google.protobuf.InvalidProtocolBufferException;
import junit.framework.TestCase;
import meerkat.Registry;
import meerkat.Registry.CollectionMessagesUtils;
import meerkat.Registry.RegistryTags;
import meerkat.SimpleRegistry;
import meerkat.bulletinboard.AsyncBulletinBoardClient;
import meerkat.bulletinboard.ThreadedBulletinBoardClient;
import meerkat.crypto.concrete.ECDSASignature;
@ -114,7 +114,7 @@ public class SimpleRegistryTest extends TestCase {
}
/**
* Initialize SimpleRegistry object
* Initialize Registry object
*/
public void setUp() {
SetSigner();
@ -128,9 +128,9 @@ public class SimpleRegistryTest extends TestCase {
*/
public void testSimpleRegistryCreation() {
try {
new SimpleRegistry(signer, bulletinBoardClient, certStream);
new Registry(signer, bulletinBoardClient, certStream);
} catch (Exception e) {
assert false : "While creating the SimpleRegistry exception have been thrown " + e;
assert false : "While creating the Registry exception have been thrown " + e;
}
}
@ -173,7 +173,7 @@ public class SimpleRegistryTest extends TestCase {
String data = new BigInteger(130, random).toString(32);
VoterInfo voterInfo = VoterInfo.newBuilder().setId(VoterID.newBuilder().setId(id)).setInfo(data).build();
SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient, certStream);
Registry registry = new Registry(signer, bulletinBoardClient, certStream);
registry.AddVoter(voterInfo, handler);
jobSemaphore.acquire();
@ -201,7 +201,7 @@ public class SimpleRegistryTest extends TestCase {
String id = new BigInteger(130, random).toString(32);
VoterID voterInfo = VoterID.newBuilder().setId(id).build();
SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient, certStream);
Registry registry = new Registry(signer, bulletinBoardClient, certStream);
registry.SetVoted(voterInfo, handler);
jobSemaphore.acquire();
@ -231,7 +231,7 @@ public class SimpleRegistryTest extends TestCase {
.setVoterID(VoterID.newBuilder().setId(voterId))
.addGroupID(GroupID.newBuilder().setId(groupId)).build();
SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient, certStream);
Registry registry = new Registry(signer, bulletinBoardClient, certStream);
registry.AddToGroups(voterInfo, handler);
jobSemaphore.acquire();
@ -266,7 +266,7 @@ public class SimpleRegistryTest extends TestCase {
this.certStream = getClass().getResourceAsStream(CERT1_PEM_EXAMPLE);
SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient,certStream);
Registry registry = new Registry(signer, bulletinBoardClient,certStream);
registry.AddToGroups(voterInfo, handler);
jobSemaphore.acquire();
@ -293,7 +293,7 @@ public class SimpleRegistryTest extends TestCase {
VoterInfo voterInfo = VoterInfo.newBuilder().
setId(VoterID.newBuilder().setId(id)).setInfo(data).build();
SimpleRegistry registry = new SimpleRegistry(signer, bulletinBoardClient, certStream);
Registry registry = new Registry(signer, bulletinBoardClient, certStream);
registry.AddVoter(voterInfo, handler);
jobSemaphore.acquire();