|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hypercast.DT.GNP_Landmark
Field Summary |
Fields inherited from interface hypercast.I_Node |
DEFAULT_CONFIG_FILE, PROTOSUB_BUDDYLIST, PROTOSUB_MULTICAST, PROTOSUB_NOSPEC, PROTOSUB_SERVER |
Constructor Summary | |
GNP_Landmark(hypercast.HyperCastConfig config,
hypercast.I_UnicastAdapter adapter,
java.lang.String prefix)
|
|
GNP_Landmark(java.lang.String cf,
java.lang.String addrStr,
java.lang.String prefix)
Constructor. |
Method Summary | |
hypercast.I_LogicalAddress |
createLogicalAddress(byte[] laddr,
int offset)
Creates a logical address object from a byte array. |
hypercast.I_LogicalAddress |
createLogicalAddress(java.lang.String laStr)
Creates a logical address object from a String. |
hypercast.I_AddressPair |
getAddressPair()
Returns this logical and physical addresses of this node. |
hypercast.I_AddressPair[] |
getAllNeighbors()
Returns the node's neighbors' physical/logical address pairs. |
hypercast.I_AddressPair[] |
getChildren(hypercast.I_LogicalAddress root)
Returns the node's children's physical/logical address pairs, with respect to the spanning tree rooted at root . |
hypercast.I_AddressPair[] |
getParent(hypercast.I_LogicalAddress root)
Returns the addresspair of the next hop for a message routed by this node towards the root. |
org.w3c.dom.Element[] |
getReadSchema(org.w3c.dom.Document doc,
org.apache.xpath.XPath xpath)
Return the schema element which represents the root of the sub-tree, specified by the given xpath, in read schema tree. |
org.w3c.dom.Element[] |
getStats(org.w3c.dom.Document doc,
org.apache.xpath.XPath xpath)
Return the result of query for the statistics specified by the given xpath. |
java.lang.String |
getStatsName()
Gets the element name of this I_Stats instance. |
org.w3c.dom.Element[] |
getWriteSchema(org.w3c.dom.Document doc,
org.apache.xpath.XPath xpath)
Return the schema element which represents the root of the sub-tree, specified by the given xpath, in write schema tree. |
void |
joinOverlay()
Joins the overlay. |
void |
leaveOverlay()
Leaves the overlay. |
static void |
main(java.lang.String[] args)
|
void |
messageArrivedFromAdapter(hypercast.I_Message msg)
Process received message based on their types. |
boolean |
previousHopCheck(hypercast.I_LogicalAddress src,
hypercast.I_LogicalAddress dst,
hypercast.I_LogicalAddress prehop)
Verify the previous hop of the message. |
hypercast.I_Message |
restoreMessage(byte[] receiveBuffer,
int[] validBytesStart,
int validBytesEnd)
Reconstruct GNP message from byte array. |
void |
setLogicalAddress(hypercast.I_LogicalAddress la)
Sets the logical address to specified one. |
void |
setNotificationHandler(hypercast.NotificationHandler nh)
Set notification handler. |
org.w3c.dom.Element[] |
setStats(org.w3c.dom.Document doc,
org.apache.xpath.XPath xpath,
org.w3c.dom.Element newValue)
Set the statistics specified by the given xpath. |
void |
setStatsName(java.lang.String name)
Assigns a name to this I_Stats instance. |
void |
startProbe()
Probe management: 1. |
void |
timerExpired(java.lang.Object Timer_ID)
Handle timer-related tasks. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GNP_Landmark(hypercast.HyperCastConfig config, hypercast.I_UnicastAdapter adapter, java.lang.String prefix)
public GNP_Landmark(java.lang.String cf, java.lang.String addrStr, java.lang.String prefix)
cf
- Name of configuration file.addrStr
- String used to create address. It is not used in current version.prefix
- Property prefix.Method Detail |
public void startProbe()
public void messageArrivedFromAdapter(hypercast.I_Message msg)
messageArrivedFromAdapter
in interface I_AdapterCallback
public void timerExpired(java.lang.Object Timer_ID)
timerExpired
in interface I_AdapterCallback
public hypercast.I_Message restoreMessage(byte[] receiveBuffer, int[] validBytesStart, int validBytesEnd)
restoreMessage
in interface I_AdapterCallback
receiveBuffer
- the byte array buffer of a incoming streamvalidBytesStart
- the start index to create a message fromvalidBytesEnd
- the total length of bytes in this buffer
public void joinOverlay()
joinOverlay
in interface I_Node
public void leaveOverlay()
leaveOverlay
in interface I_Node
public hypercast.I_AddressPair[] getParent(hypercast.I_LogicalAddress root)
getParent
in interface I_Node
public hypercast.I_AddressPair[] getChildren(hypercast.I_LogicalAddress root)
root
. Return null;
getChildren
in interface I_Node
public hypercast.I_AddressPair[] getAllNeighbors()
getAllNeighbors
in interface I_Node
public hypercast.I_AddressPair getAddressPair()
getAddressPair
in interface I_Node
public hypercast.I_LogicalAddress createLogicalAddress(byte[] laddr, int offset)
createLogicalAddress
in interface I_Node
public hypercast.I_LogicalAddress createLogicalAddress(java.lang.String laStr)
createLogicalAddress
in interface I_Node
public void setLogicalAddress(hypercast.I_LogicalAddress la)
setLogicalAddress
in interface I_Node
public boolean previousHopCheck(hypercast.I_LogicalAddress src, hypercast.I_LogicalAddress dst, hypercast.I_LogicalAddress prehop)
previousHopCheck
in interface I_Node
public void setNotificationHandler(hypercast.NotificationHandler nh)
setNotificationHandler
in interface I_Node
public org.w3c.dom.Element[] getStats(org.w3c.dom.Document doc, org.apache.xpath.XPath xpath) throws HyperCastStatsException
getStats
in interface I_Stats
doc
- Document used for create new elements or nodes.xpath
- XPath instance represents the statistics to be queried.
HyperCastStatsException
- If the xpath does not specify a valid subtree.I_Stats.getStats(org.w3c.dom.Document, org.apache.xpath.XPath)
public org.w3c.dom.Element[] setStats(org.w3c.dom.Document doc, org.apache.xpath.XPath xpath, org.w3c.dom.Element newValue) throws HyperCastStatsException
setStats
in interface I_Stats
doc
- Document used for create new elements or nodes.xpath
- XPath instance represents the statistics to be queried.newValue
- Element representing the value or sub-tree to be set.
HyperCastStatsException
- If the xpath does not specify a
valid subtree or if any part of the the subtree is read-only,
or if the newValue
does not conform with the
expected format.I_Stats.setStats(org.w3c.dom.Document, org.apache.xpath.XPath, org.w3c.dom.Element)
public org.w3c.dom.Element[] getReadSchema(org.w3c.dom.Document doc, org.apache.xpath.XPath xpath) throws HyperCastStatsException
getReadSchema
in interface I_Stats
doc
- Document used for create new elements or nodes.xpath
- XPath instance representing the statistics which is the root
of the sub-tree to be queried.
HyperCastStatsException
- If some part of the specified
subtree does not correctly implement this interface method.I_Stats.getReadSchema(Document, XPath)
public org.w3c.dom.Element[] getWriteSchema(org.w3c.dom.Document doc, org.apache.xpath.XPath xpath) throws HyperCastStatsException
getWriteSchema
in interface I_Stats
doc
- Document used for create new elements or nodes.xpath
- XPath instance representing the statistics which is the root
of the sub-tree to be queried.
HyperCastStatsException
- If some part of the specified
subtree does not correctly implement this interface method.I_Stats.getWriteSchema(Document, XPath)
public java.lang.String getStatsName()
I_Stats
getStatsName
in interface I_Stats
I_Stats.getStatsName()
public void setStatsName(java.lang.String name)
I_Stats
setStatsName
in interface I_Stats
name
- the name assigned to the I_Stats instance.I_Stats.setStatsName(String)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |