Package wol.configuration
Class Machine
- java.lang.Object
-
- wol.configuration.Machine
-
public class Machine extends Object
This class represents a WakeOnLan configuration for a single computer.- Author:
- Steffen Moldaner
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(PropertyChangeListener listener)voidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener)booleanequals(Object obj)StringgetComment()Returns the commentStringgetEthernetAddress()Returns the machines ethernet addressStringgetHost()Returns the host the magic packet will be sent to.StringgetName()Returns this configurations name.intgetPort()returns the port the magic packet will be send to.voidremovePropertyChangeListener(PropertyChangeListener listener)voidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener)voidsetComment(String comment)Sets the comment.voidsetEthernetAddress(String ethernetAddress)Sets the ethernet address.voidsetHost(String host)Sets the host the magic packet will be sent to.voidsetName(String name)Sets the name.voidsetPort(int port)Sets the port.StringtoString()
-
-
-
Constructor Detail
-
Machine
public Machine()
Creates a new machine configuration
-
Machine
public Machine(String name)
Creates a new machine configuration with the given name.- Parameters:
name- the name of this configuration
-
-
Method Detail
-
getHost
public String getHost()
Returns the host the magic packet will be sent to.- Returns:
- the host
-
getEthernetAddress
public String getEthernetAddress()
Returns the machines ethernet address- Returns:
- the ethernet address
-
getName
public String getName()
Returns this configurations name.- Returns:
- the name
-
getPort
public int getPort()
returns the port the magic packet will be send to.- Returns:
- the port
-
setHost
public void setHost(String host)
Sets the host the magic packet will be sent to.- Parameters:
host- the host. Tis can be an IP addres or the name of the machine
-
setEthernetAddress
public void setEthernetAddress(String ethernetAddress)
Sets the ethernet address.- Parameters:
ethernetAddress- the ethernet address
-
setName
public void setName(String name)
Sets the name.- Parameters:
name- the name
-
setPort
public void setPort(int port)
Sets the port.- Parameters:
port- the port. The port must be between 0 and 0xFFFF- Throws:
IllegalArgumentException- if the port is not between the valid range
-
getComment
public String getComment()
Returns the comment- Returns:
- the comment
-
setComment
public void setComment(String comment)
Sets the comment.- Parameters:
comment- the comment
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
-
addPropertyChangeListener
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
-
removePropertyChangeListener
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
-
-