bb
Class BulletinBoard_Impl

java.lang.Object
  extended bybb.BulletinBoard_Impl
All Implemented Interfaces:
BulletinBoard, java.rmi.Remote

public class BulletinBoard_Impl
extends java.lang.Object
implements BulletinBoard

Implementation of the remote class BulletinBoard that is bound to the RMI registry for remote use. The BulletinBoard holds the votes and the DecryptedShares for the election

Author:
Bent K. Onshus

Constructor Summary
BulletinBoard_Impl()
          Empty constructor.
 
Method Summary
 void endElection()
          Ends the election, thus disallowing the posting of additional votes
 BinaryVote[] getBinaryVotes()
          Gets the BinaryVotes in the case of a single candidate election
 boolean getElectionStatus()
          Gets the status of the election
 java.util.ArrayList getKOfLShares()
          Gets the DecryptedShares in the case of a multiple vote election
 MultipleBinaryVotes[] getMultipleBinaryVotes()
          Gets the MultipleBinaryVotes in the case of a multi candidate election
 MultipleVotes[] getMultipleVotes()
          Gets the MultipleVotes in the case of a multi candidate election
 int getNoOfShares()
          Gets the number of DecryptedShares posted by the DecryptionServers
 int getNoOfVotes()
          Gets the number of votes cast in the election
 DecryptedShare[] getOneOfLShares()
          Gets the DecryptedShares in the case of a single vote election
 Vote[] getVotes()
          Gets the Votes in the case of a single candidate election
 void postShare(DecryptedShare ds)
          Posts a DecryptedShare to the bulletin board
 void postShare(DecryptedShare[] ds)
          Posts multiple DecryptedShares to the bulletin board in a multiple vote election
 void postVote(BinaryVote v)
          Posts a BinaryVote to the bulletin board
 void postVote(MultipleBinaryVotes v)
          Posts MultipleBinaryVotes to the bulletin board
 void postVote(MultipleVotes v)
          Posts MultipleVotes to the bulletin board
 void postVote(Vote v)
          Posts a Vote to the bulletin board
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulletinBoard_Impl

public BulletinBoard_Impl()
Empty constructor.

Method Detail

postVote

public void postVote(Vote v)
              throws java.rmi.RemoteException
Posts a Vote to the bulletin board

Specified by:
postVote in interface BulletinBoard
Parameters:
v - The vote
Throws:
java.rmi.RemoteException

postVote

public void postVote(BinaryVote v)
              throws java.rmi.RemoteException
Posts a BinaryVote to the bulletin board

Specified by:
postVote in interface BulletinBoard
Parameters:
v - The BinaryVote
Throws:
java.rmi.RemoteException

postVote

public void postVote(MultipleVotes v)
              throws java.rmi.RemoteException
Posts MultipleVotes to the bulletin board

Specified by:
postVote in interface BulletinBoard
Parameters:
v - The votes
Throws:
java.rmi.RemoteException

postVote

public void postVote(MultipleBinaryVotes v)
              throws java.rmi.RemoteException
Posts MultipleBinaryVotes to the bulletin board

Specified by:
postVote in interface BulletinBoard
Parameters:
v - The votes
Throws:
java.rmi.RemoteException

postShare

public void postShare(DecryptedShare ds)
               throws java.rmi.RemoteException
Posts a DecryptedShare to the bulletin board

Specified by:
postShare in interface BulletinBoard
Parameters:
ds - The DecryptedShare
Throws:
java.rmi.RemoteException

postShare

public void postShare(DecryptedShare[] ds)
               throws java.rmi.RemoteException
Posts multiple DecryptedShares to the bulletin board in a multiple vote election

Specified by:
postShare in interface BulletinBoard
Parameters:
ds - The DecryptedShares
Throws:
java.rmi.RemoteException

getOneOfLShares

public DecryptedShare[] getOneOfLShares()
                                 throws java.rmi.RemoteException
Gets the DecryptedShares in the case of a single vote election

Specified by:
getOneOfLShares in interface BulletinBoard
Returns:
The shares in an array
Throws:
java.rmi.RemoteException

getKOfLShares

public java.util.ArrayList getKOfLShares()
                                  throws java.rmi.RemoteException
Gets the DecryptedShares in the case of a multiple vote election

Specified by:
getKOfLShares in interface BulletinBoard
Returns:
The shares as DecryptedShare-arrays in an ArrayList
Throws:
java.rmi.RemoteException

getVotes

public Vote[] getVotes()
                throws java.rmi.RemoteException
Gets the Votes in the case of a single candidate election

Specified by:
getVotes in interface BulletinBoard
Returns:
The Votes in an array
Throws:
java.rmi.RemoteException

getBinaryVotes

public BinaryVote[] getBinaryVotes()
                            throws java.rmi.RemoteException
Gets the BinaryVotes in the case of a single candidate election

Specified by:
getBinaryVotes in interface BulletinBoard
Returns:
The BinaryVotes in an array
Throws:
java.rmi.RemoteException

getMultipleVotes

public MultipleVotes[] getMultipleVotes()
                                 throws java.rmi.RemoteException
Gets the MultipleVotes in the case of a multi candidate election

Specified by:
getMultipleVotes in interface BulletinBoard
Returns:
The MultipleVotes in an array
Throws:
java.rmi.RemoteException

getMultipleBinaryVotes

public MultipleBinaryVotes[] getMultipleBinaryVotes()
                                             throws java.rmi.RemoteException
Gets the MultipleBinaryVotes in the case of a multi candidate election

Specified by:
getMultipleBinaryVotes in interface BulletinBoard
Returns:
The MultipleBinaryVotes in an array
Throws:
java.rmi.RemoteException

getNoOfVotes

public int getNoOfVotes()
                 throws java.rmi.RemoteException
Gets the number of votes cast in the election

Specified by:
getNoOfVotes in interface BulletinBoard
Returns:
The number of votes
Throws:
java.rmi.RemoteException

getNoOfShares

public int getNoOfShares()
                  throws java.rmi.RemoteException
Gets the number of DecryptedShares posted by the DecryptionServers

Specified by:
getNoOfShares in interface BulletinBoard
Returns:
The number of DecryptedShares
Throws:
java.rmi.RemoteException

endElection

public void endElection()
                 throws java.rmi.RemoteException
Ends the election, thus disallowing the posting of additional votes

Specified by:
endElection in interface BulletinBoard
Throws:
java.rmi.RemoteException

getElectionStatus

public boolean getElectionStatus()
                          throws java.rmi.RemoteException
Gets the status of the election

Specified by:
getElectionStatus in interface BulletinBoard
Returns:
The status of the election. True if it is finished, false if not.
Throws:
java.rmi.RemoteException