wol.configuration
Class Machine

java.lang.Object
  extended bywol.configuration.Machine

public class Machine
extends Object

This class represents a WakeOnLan configuration for a single computer.

Author:
Steffen Moldaner

Constructor Summary
Machine()
          Creates a new machine configuration
Machine(String name)
          Creates a new machine configuration with the given name.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
           
 boolean equals(Object obj)
           
 String getComment()
          Returns the comment
 String getEthernetAddress()
          Returns the machines ethernet address
 String 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()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

toString

public String toString()

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)
See Also:
PropertyChangeSupport.addPropertyChangeListener(java.beans.PropertyChangeListener)

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
See Also:
PropertyChangeSupport.addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
See Also:
PropertyChangeSupport.removePropertyChangeListener(java.beans.PropertyChangeListener)

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
See Also:
PropertyChangeSupport.removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)

equals

public boolean equals(Object obj)