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 void
addPropertyChangeListener(PropertyChangeListener listener)
void
addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
boolean
equals(Object obj)
String
getComment()
Returns the commentString
getEthernetAddress()
Returns the machines ethernet addressString
getHost()
Returns the host the magic packet will be sent to.String
getName()
Returns this configurations name.int
getPort()
returns the port the magic packet will be send to.void
removePropertyChangeListener(PropertyChangeListener listener)
void
removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
void
setComment(String comment)
Sets the comment.void
setEthernetAddress(String ethernetAddress)
Sets the ethernet address.void
setHost(String host)
Sets the host the magic packet will be sent to.void
setName(String name)
Sets the name.void
setPort(int port)
Sets the port.String
toString()
-
-
-
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)
-
-