ea
Class ElectionServer_Impl

java.lang.Object
  extended byea.ElectionServer_Impl
All Implemented Interfaces:
ElectionServer, java.rmi.Remote

public class ElectionServer_Impl
extends java.lang.Object
implements ElectionServer

The implementation of the remote object ElectionServer holding the PublicKey, the KeyShares and the ElectionProperties of the election

Author:
bent

Constructor Summary
ElectionServer_Impl(ElectionProperties eps, PublicKey pks, KeyShare[] kss)
          Constructor for the ElectionServer
 
Method Summary
 ElectionProperties getElectionProperties()
           
 KeyShare getKeyShare()
          Assigns an id to the decryption server, and returns the KeyShare
 int getNoOfDecryptionServers()
           
 int getNoOfVoters()
           
 PublicKey getPublicKey()
           
 int getVoterId()
          Gives an id to a voter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElectionServer_Impl

public ElectionServer_Impl(ElectionProperties eps,
                           PublicKey pks,
                           KeyShare[] kss)
                    throws java.rmi.RemoteException
Constructor for the ElectionServer

Parameters:
eps - The ElectionProperties for the election
pks - The PublicKey for the election
kss - The array of KeyShares for the decryption servers
Throws:
java.rmi.RemoteException
Method Detail

getKeyShare

public KeyShare getKeyShare()
                     throws java.rmi.RemoteException
Assigns an id to the decryption server, and returns the KeyShare

Specified by:
getKeyShare in interface ElectionServer
Throws:
java.rmi.RemoteException

getElectionProperties

public ElectionProperties getElectionProperties()
                                         throws java.rmi.RemoteException
Specified by:
getElectionProperties in interface ElectionServer
Throws:
java.rmi.RemoteException

getPublicKey

public PublicKey getPublicKey()
                       throws java.rmi.RemoteException
Specified by:
getPublicKey in interface ElectionServer
Throws:
java.rmi.RemoteException

getVoterId

public int getVoterId()
               throws java.rmi.RemoteException
Gives an id to a voter

Specified by:
getVoterId in interface ElectionServer
Returns:
The id
Throws:
java.rmi.RemoteException

getNoOfVoters

public int getNoOfVoters()
                  throws java.rmi.RemoteException
Specified by:
getNoOfVoters in interface ElectionServer
Throws:
java.rmi.RemoteException

getNoOfDecryptionServers

public int getNoOfDecryptionServers()
                             throws java.rmi.RemoteException
Specified by:
getNoOfDecryptionServers in interface ElectionServer
Throws:
java.rmi.RemoteException