Class Server

java.lang.Object
org.deltava.beans.servinfo.Server
All Implemented Interfaces:
Serializable, Comparable<Server>

public class Server extends Object implements Serializable, Comparable<Server>
A bean to store information about Online Network FSD Servers.
Since:
3.4
Version:
9.0
Author:
Luke
See Also:
  • Constructor Details

    • Server

      public Server(String name)
      Creates a new Server bean.
      Parameters:
      name - the server name
      Throws:
      NullPointerException - if name is null
  • Method Details

    • getName

      public String getName()
      Returns the server name.
      Returns:
      the name
    • getAddress

      public String getAddress()
      Returns the server address.
      Returns:
      the IP address
    • getLocation

      public String getLocation()
      Returns the server location.
      Returns:
      the location
    • getComment

      public String getComment()
      Returns the server comment.
      Returns:
      the comment
    • getConnections

      public int getConnections()
      Returns the number of connections to this FSD server.
      Returns:
      the number of connections
    • getConnectionsAllowed

      public boolean getConnectionsAllowed()
      Returns whether new connections to this FSD server are permitted.
      Returns:
      TRUE if new connections permitted, otherwise FALSE
    • setAddress

      public void setAddress(String addr)
      Updates the server address.
      Parameters:
      addr - the IP address
    • setLocation

      public void setLocation(String loc)
      Updates the server location.
      Parameters:
      loc - the location
    • setComment

      public void setComment(String comment)
      Updates the server comment.
      Parameters:
      comment - the comment
    • setConnections

      public void setConnections(int cons)
      Updates the number of connections to this FSD server.
      Parameters:
      cons - the number of connections
    • setConnectionsAllowed

      public void setConnectionsAllowed(boolean connectionsAllowed)
      Updates whether new connections to this FSD server are permitted.
      Parameters:
      connectionsAllowed - TRUE if new connections permitted, otherwise FALSE
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(Server s2)
      Compares two servers by comparing their names.
      Specified by:
      compareTo in interface Comparable<Server>