public class Server
extends java.lang.Object
Constructor and Description |
---|
Server() |
Modifier and Type | Method and Description |
---|---|
void |
addDevice(Device device)
addDevice: This add a Device to the list of devices in the Server
|
Device |
getDevice(int pos)
getDevice: returns the device in the position specified.
|
Device |
getDevice(java.lang.String name)
getDevice: returns the device whose name matches with the parameter.
|
java.lang.String |
getIdentifier()
getIdentifier: get the identifier (name) of the server.
|
java.lang.String |
getIpAddress()
getIpAddress: get the IP address of the server.
|
java.lang.String |
getLastCommand()
getLastCommand: return the last command received on the server
|
java.util.Date |
getLastConnDate()
getLastConnDate: get the last connection Date.
|
java.lang.String |
getLastResponse()
getLastResponse: return the last command response sent by the server.
|
java.util.ArrayList<Device> |
getListDevices()
getListDevices: return the list of devices
|
int |
getNumDevices()
getNumDevices: return the number of devices on this server
|
boolean |
getOnline()
getOnline: get the status of the server.
|
java.lang.Integer |
getPort()
getPort: get the port of the server.
|
void |
setIdentifier(java.lang.String identifier)
setIdentifier: set the identifier (name) of the server.
|
void |
setIpAddress(java.lang.String ipAddress)
setIpAddress: set the IP address of the server.
|
void |
setLastCommand(java.lang.String lastCommand)
setLastCommand: set the last command received on the server
|
void |
setLastConnDate()
setLastConnDate: set the last connection Date.
|
void |
setLastConnDate(java.util.Date lastConnDate)
setLastConnDate: set the last connection Date.
|
void |
setLastResponse(java.lang.String lastResponse)
setLastResponse: set the last command response sent by the server.
|
void |
setOnline(boolean Online)
setOnline: set the status of the server.
|
void |
setPort(java.lang.Integer port)
setPort: set the port of the server.
|
java.lang.String |
toString()
toString:
|
void |
updateDevice(Device device)
updateDevice: update the device in the device list
|
public java.lang.String getIdentifier()
public void setIdentifier(java.lang.String identifier)
identifier
- the identifier to setpublic java.lang.String getIpAddress()
public void setIpAddress(java.lang.String ipAddress)
ipAddress
- the ipAddress to setpublic java.lang.Integer getPort()
public void setPort(java.lang.Integer port)
port
- the port to setpublic boolean getOnline()
public void setOnline(boolean Online)
Online
- the dateOnline to setpublic java.util.Date getLastConnDate()
public void setLastConnDate(java.util.Date lastConnDate)
lastConnDate
- the lastConnDate to setpublic void setLastConnDate()
public java.lang.String getLastCommand()
public void setLastCommand(java.lang.String lastCommand)
lastCommand
- the lastCommand to setpublic java.lang.String getLastResponse()
public void setLastResponse(java.lang.String lastResponse)
lastResponse
- the lastResponse to setpublic void addDevice(Device device)
device
- to addpublic void updateDevice(Device device)
device
- to updatepublic int getNumDevices()
public java.util.ArrayList<Device> getListDevices()
public Device getDevice(int pos)
pos
- position to get the device.public Device getDevice(java.lang.String name)
name
- Name of the device to getpublic java.lang.String toString()
toString
in class java.lang.Object