|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kth.dks.dks_node.DefaultAppHandler
public class DefaultAppHandler
This is a default class implementing placeholders for every callback that an application should implement
Title: DKS
Description: DKS Middleware
Copyright: Copyright (c) 2004
Company: KTH-IMIT/SICS
| Field Summary | |
|---|---|
protected DKSCallbackInterface |
dks
|
| Constructor Summary | |
|---|---|
DefaultAppHandler()
|
|
DefaultAppHandler(DKSCallbackInterface dksImpl)
|
|
| Method Summary | |
|---|---|
void |
broadcastCallback(DKSObject payload)
This callback routine is called when the node recieves a broadcast message. |
void |
failCallback(DKSRef failed,
DKSRef failedPred)
This callback routine is called at the successor of a filed node, when it detects its predecessor has failed. |
void |
joinCallback(DKSRef pred,
DKSRef succ)
This callback routine is called at the joining node, when the node is about to join INVARIANT: this method must make a callback to DKSCallbacks.joinCallbackReturn |
void |
leaveCallback(DKSRef pred,
DKSRef succ)
This callback routine is called at the leaving node, when the node is about to leave INVARIANT: this method must make a callback to DKSCallbacks.joinCallbackReturn |
DKSObject |
routeCallback(long identifier,
DKSObject payload)
Is set in DKSInterface through setCallbackHandler(). |
void |
routeCallbackAsync(long identifier,
DKSObject payload)
Is set in DKSInterface through setCallbackHandler(). |
void |
setDKSCallbackInterface(DKSCallbackInterface d)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DKSCallbackInterface dks
| Constructor Detail |
|---|
public DefaultAppHandler(DKSCallbackInterface dksImpl)
public DefaultAppHandler()
| Method Detail |
|---|
public void setDKSCallbackInterface(DKSCallbackInterface d)
public DKSObject routeCallback(long identifier,
DKSObject payload)
DKSAppInterface
routeCallback in interface DKSAppInterfaceidentifier - long, the identifier searched for in route, maybe not interesting for the app in many cases.payload - DKSObject, the actual payload sent by the source
public void routeCallbackAsync(long identifier,
DKSObject payload)
DKSAppInterface
routeCallbackAsync in interface DKSAppInterfaceidentifier - long, the identifier searched for in route, maybe not interesting for the app in many cases.payload - DKSObject, the actual payload sent by the sourcepublic void broadcastCallback(DKSObject payload)
DKSAppInterface
broadcastCallback in interface DKSAppInterfacepayload - DKSObject, the actual payload sent by the source
public void joinCallback(DKSRef pred,
DKSRef succ)
DKSAppInterface
joinCallback in interface DKSAppInterfacepred - DKSRef predecessor reference, containing the identifier of the predecessor (useful for DHT impl)succ - DKSRef successor, containing the identifier of the successor (useful for DHT impl)
public void leaveCallback(DKSRef pred,
DKSRef succ)
DKSAppInterface
leaveCallback in interface DKSAppInterfacepred - DKSRef predecessor reference, containing the identifier of the predecessor (useful for DHT impl)succ - DKSRef successor, containing the identifier of the successor (useful for DHT impl)
public void failCallback(DKSRef failed,
DKSRef failedPred)
DKSAppInterface
failCallback in interface DKSAppInterfacefailed - DKSRef to the failed node (useful for DHT impl)failedPred - DKSRef to the failed nodes predecessor (useful for DHT impl)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||