universal
Class UniversalClient

java.lang.Object
  |
  +--universal.UniversalClient
Direct Known Subclasses:
UniversalClientCrashStop

public abstract class UniversalClient
extends java.lang.Object

This class is the superclass of the class UniversalClientCrashStop which is instantiated by the client application.

It finds a port free for the socket tcp to listen incomming message for the leader election from the replicated servers.
It instantiates the object ReceiverClient and ClientAnnounce.


Field Summary
 java.net.InetAddress add
           
(package private)  java.net.InetAddress add1
           
 universal.messagein.ClientAnnounce clientAnnounce
          Sends Corba message to the replicated servers to inform them on which port the client is listenning
 universal.leader.LeaderCrashStopClient lead
          Object which treats the leader election in the client side
 int port
           
 universal.communication.ReceiverClient receiverClient
          Object which waits for message comming to the socket
 java.lang.String serverNameFile
          The name of the file which contains the list of the name of the host on which are the others replicated servers and their associated pid.
 java.net.ServerSocket serverSocket
           
private  java.util.Date startTime
           
(package private)  java.lang.Thread t
           
 int totalDel
           
 boolean waiting
           
 
Constructor Summary
UniversalClient(java.lang.String serverNameFile)
           
 
Method Summary
private static java.net.InetAddress getLocalInetAddress()
           
abstract  void initializeTasks()
           
 void initializeUniversal()
          Look for a port free to listen.
 void startTasks()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

startTime

private java.util.Date startTime

totalDel

public int totalDel

receiverClient

public universal.communication.ReceiverClient receiverClient
Object which waits for message comming to the socket


lead

public universal.leader.LeaderCrashStopClient lead
Object which treats the leader election in the client side


clientAnnounce

public universal.messagein.ClientAnnounce clientAnnounce
Sends Corba message to the replicated servers to inform them on which port the client is listenning


add

public final java.net.InetAddress add

add1

java.net.InetAddress add1

port

public int port

waiting

public boolean waiting

serverSocket

public java.net.ServerSocket serverSocket

serverNameFile

public java.lang.String serverNameFile
The name of the file which contains the list of the name of the host on which are the others replicated servers and their associated pid.


t

java.lang.Thread t
Constructor Detail

UniversalClient

public UniversalClient(java.lang.String serverNameFile)
Method Detail

getLocalInetAddress

private static java.net.InetAddress getLocalInetAddress()

initializeUniversal

public void initializeUniversal()
Look for a port free to listen. Instantiate the object receiverClient,ClientAnnounce. Call the method Announce of the object ClientAnnounce which is going to send some corba message to inform the replicated servers on which port the client socket listen.


initializeTasks

public abstract void initializeTasks()

startTasks

public void startTasks()