inescID.revs.servers
Class CounterEngine

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byinescID.revs.servers.ServerEngine
                  extended byinescID.revs.servers.CounterEngine
All Implemented Interfaces:
CommonServerInterface, ICounter, ISubmission, java.rmi.Remote, java.io.Serializable

public class CounterEngine
extends ServerEngine
implements ICounter, ISubmission

See Also:
Serialized Form

Field Summary
(package private)  DB_Counter database
           
 
Fields inherited from class inescID.revs.servers.ServerEngine
commissioner_key, db_alias, kst, server_address, server_key
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
 
Fields inherited from class java.rmi.server.RemoteServer
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
CounterEngine(java.lang.String address, char[] keystore_pass, char[] key_pass)
           
CounterEngine(java.lang.String address, char[] keystore_pass, char[] key_pass, boolean noSSL)
           
 
Method Summary
 void decipherVotes()
           
 void gatherVotes(java.util.Vector counters)
           
 Reply getVotes()
          getVotes
 void init(java.lang.String database_address, java.net.PasswordAuthentication db_authentication)
          init
protected  void publishResults()
           
protected  void resultViews(java.lang.String result_path)
           
 Reply submitVote(int election, byte[] vote)
          submitVote
 void updateDatabase(java.lang.String file)
           
 
Methods inherited from class inescID.revs.servers.ServerEngine
configure_server, createDatabase, deleteDatabase, redoDatabase, start, stop
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

database

DB_Counter database
Constructor Detail

CounterEngine

public CounterEngine(java.lang.String address,
                     char[] keystore_pass,
                     char[] key_pass)
              throws java.rmi.RemoteException,
                     java.security.KeyStoreException,
                     java.security.cert.CertificateException,
                     java.security.NoSuchAlgorithmException,
                     java.io.IOException,
                     java.security.UnrecoverableKeyException

CounterEngine

public CounterEngine(java.lang.String address,
                     char[] keystore_pass,
                     char[] key_pass,
                     boolean noSSL)
              throws java.rmi.RemoteException,
                     java.io.IOException,
                     java.security.NoSuchAlgorithmException,
                     java.security.cert.CertificateException,
                     java.security.KeyStoreException,
                     java.io.FileNotFoundException,
                     java.security.UnrecoverableKeyException
Method Detail

updateDatabase

public void updateDatabase(java.lang.String file)
Specified by:
updateDatabase in interface CommonServerInterface

init

public void init(java.lang.String database_address,
                 java.net.PasswordAuthentication db_authentication)
init

Specified by:
init in interface CommonServerInterface
Parameters:
database_address - String
db_authentication - PasswordAuthentication

submitVote

public Reply submitVote(int election,
                        byte[] vote)
submitVote

Specified by:
submitVote in interface ISubmission
Parameters:
election - int
vote - Vote
Returns:
Reply

getVotes

public Reply getVotes()
getVotes

Specified by:
getVotes in interface ICounter
Returns:
Reply

gatherVotes

public void gatherVotes(java.util.Vector counters)

decipherVotes

public void decipherVotes()

publishResults

protected void publishResults()

resultViews

protected void resultViews(java.lang.String result_path)