Process Specification- continued.....

Load balancer server is an interface implemented by all server applications. The functioning of these methods are same for all the server applications. It has following methods as:

public void getdata()
This method retrieves the data from the database in a result set. This method is called only once when the central array list gets exhausted. It fetches the eligible message from the data stored in the result set and returns the result set.

public void populatedata()
This method populates the central array list with the messages stored in result set. This method is called only once when the central array list gets exhausted.

public void getstream()
This method creates new socket connection for the respective machine. It also sets the capacity and status for each machine in case of failed socket connection. It also sets the capacity and status for the machine that failed to make Socket connection earlier.

public void sharedata()
This method distributes the messages into array list for the respective machine from the central array list based on the capacity of the machine. The distributed messages are removed from the central array list. When the central array list is exhausted method call is made to retrieve the data from the database and populate it. It also returns the array list for the respective clients.

public void dispatchmessage()
This method dispatches the messages on an Object output stream to the respective machine. In case of an exception in writing the message, the messages are added to the top of the central array list.

public void getstatus()
This method reads the respective array list on an object input stream which contains the id and status of the messages.

public void setstatus()
This method updates the database based in the array list from the respective machines. It also reinitializes the capacity of the machine under various conditions.

Any improper functioning of the servers, the errors will be written to the serverlog file and any improper functioning of the clients, the errors will be written to clientlog file.

Now the server & client call application is started. The source and destination address is defined. The messages are picked up from the database with subject and required information and send to the customers.

The address specification is required like SMTP, HOST, POP3, etc., otherwise an error is thrown.


 

  Java Alert Notification System Home Page

   Previous    Next  
 

UNIVERSAL TEACHER PUBLICATIONS
Web: universalteacherpublications.com, universalteacher.com, universalteacher4u.com