Class Station

java.lang.Object
com.inesm.KeyManager.model.Station
All Implemented Interfaces:
Resource, Serializable

public class Station extends Object implements Serializable, Resource
Represents a station running an instance of the Key Manager application. Used to allow distribution of shared resources.

All the getters and setters are the default ones.

Details about the meaning of each field are provided in the source code.

See Also:
  • Field Details

  • Constructor Details

    • Station

      public Station()
  • Method Details

    • patch

      public void patch(Station upd)
      Updates the fields in the current object instance with the ones from another object. Will only update the fields that have been modified after the initialization.
      Parameters:
      upd - the object containing the fields to update the current instance with
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getResourceID

      public String getResourceID()
      Description copied from interface: Resource
      Gets the station resource identifier.
      Specified by:
      getResourceID in interface Resource
      Returns:
      a string containing the resource identifier.
    • serialize

      public String serialize() throws IOException
      Description copied from interface: Resource
      Serializes a resource into a string.
      Specified by:
      serialize in interface Resource
      Returns:
      the string representing the serialization of the resource.
      Throws:
      IOException - if an error occurred during serialization
    • deserialize

      public void deserialize(String data) throws IOException, ClassNotFoundException
      Description copied from interface: Resource
      Deserializes the resource from a data string generated by the Resource.serialize() method.
      Specified by:
      deserialize in interface Resource
      Parameters:
      data - the serialized data as a string
      Throws:
      IOException - if an error occurred during the serialization process
      ClassNotFoundException - if its was not possible to load the class data, or the class data was not found
    • getStationID

      public long getStationID()
    • getIpAddress

      public String getIpAddress()
    • setIpAddress

      public void setIpAddress(String ipAddress)
    • setStationID

      public void setStationID(long l)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getLocation

      public String getLocation()
    • setLocation

      public void setLocation(String location)
    • getKeys

      public String getKeys()
    • setKeys

      public void setKeys(String keys)
    • getPath

      public String getPath()
    • setPath

      public void setPath(String path)
    • isCurrent

      public boolean isCurrent()
    • setCurrent

      public void setCurrent(boolean current)