voter
Class RemoteEntityConnectionC

java.lang.Object
  extended byvoter.RemoteEntityConnectionC

public class RemoteEntityConnectionC
extends java.lang.Object

The class responsible for interacting with the RMI Registry and returning stubs for the remote objects for use in the application.

Author:
bent

Constructor Summary
RemoteEntityConnectionC(java.lang.String host, int port)
          Creates a connection to the RMI Registry at the given host and port
 
Method Summary
 BulletinBoard getBulletinBoard()
          Returns the stub for the remote object BulletinBoard
 ElectionServer getElectionServer()
          Returns the stub for the remote object ElectionServer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteEntityConnectionC

public RemoteEntityConnectionC(java.lang.String host,
                               int port)
                        throws java.rmi.RemoteException
Creates a connection to the RMI Registry at the given host and port

Parameters:
host -
port -
Throws:
java.rmi.RemoteException - If the RMI Registry can not be contacted.
Method Detail

getElectionServer

public ElectionServer getElectionServer()
                                 throws java.rmi.AccessException,
                                        java.rmi.RemoteException,
                                        java.rmi.NotBoundException
Returns the stub for the remote object ElectionServer

Returns:
The stub for accessing the ElectionServer remote object.
Throws:
java.rmi.AccessException - If access is denied
java.rmi.RemoteException
java.rmi.NotBoundException - If the object was not bound to the registry.

getBulletinBoard

public BulletinBoard getBulletinBoard()
                               throws java.rmi.AccessException,
                                      java.rmi.RemoteException,
                                      java.rmi.NotBoundException
Returns the stub for the remote object BulletinBoard

Returns:
The stub for accessing the BulletinBoard remote object.
Throws:
java.rmi.AccessException - If access is denied
java.rmi.RemoteException
java.rmi.NotBoundException - If the object was not bound to the registry.