|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.vattp.vls.VatLocationServer
A vat location server, which maintains a collection of the locations of E vats which it can lookup on demand.
These registrations have a finite lifetime which we also manage here. In order to better decouple issues during this stage of development, this version is no longer persistent.
XXX The VLS must be registered under swiss number 0 so it can respond, as an E object, to registrations (and unregistrations?).
XXX The VLS must be registered by setVatLocationLookup to listen on port 0 for location queries.
Field Summary | |
private static int |
MINUTE
|
private FlexMap |
myRegistrations
Collection of current registrations |
private Timer |
myTimer
Can be transient or persistent, depending on policy |
private static String[] |
NO_LOCATIONS
|
private static int |
REG_DURATION
|
Constructor Summary | |
VatLocationServer(Timer timer)
Construct a vat location server. |
Method Summary | |
String[] |
getLocations(String vatID)
XXX Will currently only return either a zero or a one element array. |
void |
put(String vatID,
String searchPath)
Add a new vat to the registry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private final FlexMap myRegistrations
private final Timer myTimer
private static final int MINUTE
private static final int REG_DURATION
private static final String[] NO_LOCATIONS
Constructor Detail |
public VatLocationServer(Timer timer)
Since, in this version, we are only starting from scratch, it makes a new empty registration collection.
Method Detail |
public String[] getLocations(String vatID)
getLocations
in interface VatLocationLookup
public void put(String vatID, String searchPath)
vatID
- Vat ID of vat being addedsearchPath
- Were in the world to find it
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |