Package org.deltava.beans.servinfo
Class Server
java.lang.Object
org.deltava.beans.servinfo.Server
- All Implemented Interfaces:
Serializable
,Comparable<Server>
A bean to store information about Online Network FSD Servers.
- Since:
- 3.4
- Version:
- 9.0
- Author:
- Luke
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compares two servers by comparing their names.Returns the server address.Returns the server comment.int
Returns the number of connections to this FSD server.boolean
Returns whether new connections to this FSD server are permitted.Returns the server location.getName()
Returns the server name.int
hashCode()
void
setAddress
(String addr) Updates the server address.void
setComment
(String comment) Updates the server comment.void
setConnections
(int cons) Updates the number of connections to this FSD server.void
setConnectionsAllowed
(boolean connectionsAllowed) Updates whether new connections to this FSD server are permitted.void
setLocation
(String loc) Updates the server location.
-
Constructor Details
-
Server
Creates a new Server bean.- Parameters:
name
- the server name- Throws:
NullPointerException
- if name is null
-
-
Method Details
-
getName
-
getAddress
-
getLocation
-
getComment
-
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
-
setLocation
-
setComment
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
-
compareTo
Compares two servers by comparing their names.- Specified by:
compareTo
in interfaceComparable<Server>
-