Class Machine


  • public class Machine
    extends java.lang.Object
    This class represents a WakeOnLan configuration for a single computer.
    Author:
    Steffen Moldaner
    • Constructor Summary

      Constructors 
      Constructor Description
      Machine()
      Creates a new machine configuration
      Machine​(java.lang.String name)
      Creates a new machine configuration with the given name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)  
      void addPropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)  
      boolean equals​(java.lang.Object obj)  
      java.lang.String getComment()
      Returns the comment
      java.lang.String getEthernetAddress()
      Returns the machines ethernet address
      java.lang.String getHost()
      Returns the host the magic packet will be sent to.
      java.lang.String getName()
      Returns this configurations name.
      int getPort()
      returns the port the magic packet will be send to.
      void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)  
      void removePropertyChangeListener​(java.lang.String propertyName, java.beans.PropertyChangeListener listener)  
      void setComment​(java.lang.String comment)
      Sets the comment.
      void setEthernetAddress​(java.lang.String ethernetAddress)
      Sets the ethernet address.
      void setHost​(java.lang.String host)
      Sets the host the magic packet will be sent to.
      void setName​(java.lang.String name)
      Sets the name.
      void setPort​(int port)
      Sets the port.
      java.lang.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​(java.lang.String name)
        Creates a new machine configuration with the given name.
        Parameters:
        name - the name of this configuration
    • Method Detail

      • getHost

        public java.lang.String getHost()
        Returns the host the magic packet will be sent to.
        Returns:
        the host
      • getEthernetAddress

        public java.lang.String getEthernetAddress()
        Returns the machines ethernet address
        Returns:
        the ethernet address
      • getName

        public java.lang.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​(java.lang.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​(java.lang.String ethernetAddress)
        Sets the ethernet address.
        Parameters:
        ethernetAddress - the ethernet address
      • setName

        public void setName​(java.lang.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:
        java.lang.IllegalArgumentException - if the port is not between the valid range
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getComment

        public java.lang.String getComment()
        Returns the comment
        Returns:
        the comment
      • setComment

        public void setComment​(java.lang.String comment)
        Sets the comment.
        Parameters:
        comment - the comment
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
        See Also:
        PropertyChangeSupport.addPropertyChangeListener(java.beans.PropertyChangeListener)
      • addPropertyChangeListener

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

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

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object