de.fhg.igd.atlas.core
Interface StorageDBEntry

All Known Implementing Classes:
MemoryDBEntry

public interface StorageDBEntry

The interface for entry objects which can be stored in StorageDB databases. An entry contains all infomation stored in a Location Service Server (LSServer) used to locate the identified mobile object. There exists a mapping between entries of this type and a StorageDBImmutableEntry.

The implicit name is the unique identifier of an mobile object for instance the hashcode of its static part. The contact address should consist of a URL string that specifies the protocol, address, and port of a management service provided by the server, which is in possession of the specified object. The cookie is used as authorisation mechanism by the LS-Server permitting a client to update or delete an entry. The timestamp represents the last modification time in milliseconds since January 1, 1970, 00:00:00 GMT.

Version:
"$Id: StorageDBEntry.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Peters
See Also:
LSServerService, StorageDBImmutableEntry

Method Summary
 URL getContactAddress()
          Returns the contact address.
 byte[] getCookie()
          Returns the cookie.
 byte[] getImplicitName()
          Returns the implicit name.
 long getTimestamp()
          Returns the timestamp in milliseconds since January 1, 1970, 00:00:00 GMT.
 void touch()
          Sets the timestamp of the entry to the current time.
 void update(URL contactAddress, byte[] cookie)
          Updates the entry with the given contactAddress and cookie.
 

Method Detail

update

public void update(URL contactAddress,
                   byte[] cookie)
Updates the entry with the given contactAddress and cookie. The timestamp is set to the current time.

Parameters:
contactAddress - The contact address.
cookie - The cookie.

touch

public void touch()
Sets the timestamp of the entry to the current time.


getImplicitName

public byte[] getImplicitName()
Returns the implicit name.

Returns:
The implicit name.

getContactAddress

public URL getContactAddress()
Returns the contact address.

Returns:
The contact address.

getCookie

public byte[] getCookie()
Returns the cookie.

Returns:
The cookie.

getTimestamp

public long getTimestamp()
Returns the timestamp in milliseconds since January 1, 1970, 00:00:00 GMT.

Returns:
The timestamp.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.