|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectplanet.test.dht2.DHTApplication
Application that contains all key/values pairs, required for owner Node Id.
| Field Summary | |
static java.lang.String |
APPLICATION_ID
|
| Constructor Summary | |
DHTApplication()
Constructor |
|
DHTApplication(java.lang.String name)
Simple constructor where is specified the application identification. |
|
| Method Summary | |
void |
byStep()
An upcall to inform this Application for a new step. |
void |
deliver(Id id,
Message message)
This method is called on the application at the destination node for the given id. |
boolean |
forward(Message message)
This method is invoked on applications when the underlying node is about to forward the given message with the provided target to the specified next hop. |
java.lang.String |
gatherStatistics()
Generate a string with a representation of keys and values existing at this application. |
java.lang.String |
getId()
Gets the identification of this instance of Application. |
void |
insert(java.lang.String key,
java.lang.String value)
Owner SymphonyDHTApplication method which permits to send a Message with a key/value pair, for INSERT. |
void |
lookup(java.lang.String key)
Owner SymphonyDHTApplication method which permits to send a Message with a key/value pair, for LOOKUP. |
void |
retrieve(DHTMessage msg)
This method retrieves value from a key from the dsitributed repository build on top of Symphony Lookup protocol. |
void |
setEndPoint(EndPoint endPoint)
Sets the actual EndPoint to use to communication with underlying network. |
void |
setId(java.lang.String appId)
Sets the identification of this instance of Application. |
Application |
setValues(java.lang.String applicationName)
Sets the name for this applicaton. |
void |
store(DHTMessage msg)
This method stores key/value pair on the distributed repository of DHT application. |
void |
update(NodeHandle node,
boolean joined)
Shows that the node has been joinded or not to the network. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String APPLICATION_ID
| Constructor Detail |
public DHTApplication()
public DHTApplication(java.lang.String name)
name - New name to set to this application.| Method Detail |
public void byStep()
byStep in interface Applicationpublic boolean forward(Message message)
forward in interface Applicationmessage - The message being sent, containing an internal message along
with a destination key and nodeHandle next hop.
public void store(DHTMessage msg)
msg - The message exchanged between applications.public void retrieve(DHTMessage msg)
msg - The message exchanged between applications.
public void deliver(Id id,
Message message)
deliver in interface Applicationid - The destination id of the messagemessage - The message being sentpublic java.lang.String gatherStatistics()
public java.lang.String getId()
getId in interface ApplicationApplication.getId()public void setId(java.lang.String appId)
setId in interface ApplicationappId - New identification of this instance of Application.Application.setId(java.lang.String)public void setEndPoint(EndPoint endPoint)
setEndPoint in interface ApplicationendPoint - EndPoint to contact that knows how talk with
underlying node.Application.setEndPoint(planet.commonapi.EndPoint)
public void insert(java.lang.String key,
java.lang.String value)
key - Text to be used as material for construct Message Id, in
hexadecimal format.value - Related value to that key.public void lookup(java.lang.String key)
key - Text to be used as material for construct Message Id, in
hexadecimal format.
public void update(NodeHandle node,
boolean joined)
update in interface Applicationnode - Node that has been joined or leaved.joined - If true, the node has been joinded. If false, the
node has been leaved to the network.Application.update(planet.commonapi.NodeHandle, boolean)public Application setValues(java.lang.String applicationName)
setValues in interface ApplicationapplicationName - Name for this application.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||