Package com.inesm.KeyManager.model
Class Station
java.lang.Object
com.inesm.KeyManager.model.Station
- All Implemented Interfaces:
Resource,Serializable
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserialize(String data) Deserializes the resource from a data string generated by theResource.serialize()method.getKeys()getName()getPath()Gets the station resource identifier.longbooleanvoidUpdates the fields in the current object instance with the ones from another object.Serializes a resource into a string.voidsetCurrent(boolean current) voidsetIpAddress(String ipAddress) voidvoidsetLocation(String location) voidvoidvoidsetStationID(long l) toString()
-
Field Details
-
UNDEFINED
public static final long UNDEFINED- See Also:
-
-
Constructor Details
-
Station
public Station()
-
-
Method Details
-
patch
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
-
getResourceID
Description copied from interface:ResourceGets the station resource identifier.- Specified by:
getResourceIDin interfaceResource- Returns:
- a string containing the resource identifier.
-
serialize
Description copied from interface:ResourceSerializes a resource into a string.- Specified by:
serializein interfaceResource- Returns:
- the string representing the serialization of the resource.
- Throws:
IOException- if an error occurred during serialization
-
deserialize
Description copied from interface:ResourceDeserializes the resource from a data string generated by theResource.serialize()method.- Specified by:
deserializein interfaceResource- Parameters:
data- the serialized data as a string- Throws:
IOException- if an error occurred during the serialization processClassNotFoundException- if its was not possible to load the class data, or the class data was not found
-
getStationID
public long getStationID() -
getIpAddress
-
setIpAddress
-
setStationID
public void setStationID(long l) -
getName
-
setName
-
getLocation
-
setLocation
-
getKeys
-
setKeys
-
getPath
-
setPath
-
isCurrent
public boolean isCurrent() -
setCurrent
public void setCurrent(boolean current)
-