Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mapping
Class AvailabilityServer

    java.lang.Object
      mapping.AvailabilityServer

All Implemented Interfaces:
  java.lang.Runnable

    public class AvailabilityServer

extends java.lang.Object
implements java.lang.Runnable

Author:
  Majd Kokaly This server is responsible of receiving availability information from servers (nodes) in the grid and updating the Server objects accordingly.

Constructor Summary
`AvailabilityServer(Mapper mapper)` Default constructor.

Method Summary
`int` | `getAvailablityPort()`
`Logger` | `getLogger()`
`Mapper` | `getMapper()`
`boolean` | `isAlive()`
`void` | `run()` In the run method, this thread listens on a port for aj values sent by the Servers and change the servers table accordingly.
`void` | `setAlive(boolean alive)`
`void` | `setAvailablityPort(int availablityPort)`
`void` | `setLogger(Logger logger)`
`void` | `setMapper(Mapper mapper)`
`void` | `startServer()` This method starts the the thread.
`void` | `stopServer()` This method stops the the server and the thread.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AvailabilityServer

    public AvailabilityServer(Mapper mapper)

  Default constructor.

  Parameters:
    `mapper` - to set the mapper field

Method Detail

### isAlive

    public boolean isAlive()

### setAlive

    public void setAlive(boolean alive)

### getAvailablityPort

    public int getAvailablityPort()

### setAvailablityPort

    public void setAvailablityPort(int availablityPort)

### getMapper

    public Mapper getMapper()

### setMapper

    public void setMapper(Mapper mapper)

### getLogger

    public Logger getLogger()

### setLogger

    public void setLogger(Logger logger)

### startServer

    public void startServer()

  This method starts the the thread.

### stopServer

    public void stopServer()

  This method stops the the server and the thread.

### run

    public void run()

  In the run method, this thread listens on a port for aj values sent by the Servers and change the servers table accordingly. The format of the message received is serverAddress#availability

  Specified by:
    `run` in interface `java.lang.Runnable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD