edu.virginia.cs.mng.hypercast
Class HTTP_ServerOverlayHandler
java.lang.Object
|
+--edu.virginia.cs.mng.hypercast.HTTP_ServerOverlayHandler
- class HTTP_ServerOverlayHandler
- extends java.lang.Object
The handler for overlay functions (create overlay, does overlay exist, etc.)
|
Field Summary |
(package private) java.util.Hashtable |
idsToAttributes
Map of created Overlays to each Overlay's key attributes. |
(package private) java.lang.String |
uniqueProcessPrefix
Unique prefix for this process. |
|
Method Summary |
private java.lang.String |
generateID()
Creates a new unique overlayID. |
java.lang.String |
generateResponse(java.util.Hashtable parsedAttributes)
Generates single string response to request. |
private java.lang.String |
getKeyAttributes(java.util.Hashtable parsedAttributes)
Extract the "KeyAttributes" from the hashtable and
place them in a CGI string. |
| Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
idsToAttributes
java.util.Hashtable idsToAttributes
- Map of created Overlays to each Overlay's key attributes.
uniqueProcessPrefix
java.lang.String uniqueProcessPrefix
- Unique prefix for this process. It is usually an IP_Address plus port number.
It is used to generate a unique Overlay ID
HTTP_ServerOverlayHandler
public HTTP_ServerOverlayHandler(java.lang.String upp)
- Parameters:
upp - The prefix for new OverlayIDs. It is unique over all processes and machines.
generateResponse
public java.lang.String generateResponse(java.util.Hashtable parsedAttributes)
- Generates single string response to request.
generateID
private java.lang.String generateID()
- Creates a new unique overlayID.
Format:
uniqueProcessPrefix + "TS" + milliseconds since epoch.
getKeyAttributes
private java.lang.String getKeyAttributes(java.util.Hashtable parsedAttributes)
- Extract the "KeyAttributes" from the hashtable and
place them in a CGI string.