|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectplanet.test.broadcast.DHTApplication
| Field Summary | |
static java.lang.String |
applicationId
Identification of the application. |
| Constructor Summary | |
DHTApplication()
Constructor |
|
DHTApplication(java.lang.String name)
Sets a new application id. |
|
| 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 |
getId()
Gets the identification of the Application |
Message |
makeTestMessage(java.lang.String data)
Makes a new instance of a Message to be sent with the specified data. |
void |
send(java.lang.String textKey,
DHTPeerTestMessage mess)
Owner DHTApplication method which permits to send a broadcast Message. |
void |
setEndPoint(EndPoint ep)
Sets the underlying EndPoint of this application. |
void |
setId(java.lang.String appId)
Sets the String identification of this application. |
Application |
setValues(java.lang.String applicationName)
Sets the name for this applicaton. |
java.lang.String |
toString()
Shows a String representation of the actual 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, wait, wait, wait |
| Field Detail |
public static java.lang.String applicationId
| Constructor Detail |
public DHTApplication()
public DHTApplication(java.lang.String name)
name - New application id.| Method Detail |
public void byStep()
byStep in interface Applicationpublic Message makeTestMessage(java.lang.String data)
data - Data to be sent.
public void setEndPoint(EndPoint ep)
setEndPoint in interface Applicationep - Underlying EndPoint to be used in Message comunication.public 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 deliver(Id id,
Message message)
deliver in interface Applicationid - The destination id of the messagemessage - The message being sentpublic java.lang.String getId()
getId in interface ApplicationApplication.getId()public void setId(java.lang.String appId)
setId in interface ApplicationappId - New identification of this application.Application.setId(java.lang.String)
public void send(java.lang.String textKey,
DHTPeerTestMessage mess)
textKey - Text to be used as material for construct Message Id.mess - Message to be send with broadcast.public java.lang.String toString()
Object.toString()
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 | ||||||||||