|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.protocol.ProfilePropagationProtocol
public class ProfilePropagationProtocol
This determines if a profile change needs to be propagated to a higher level node, and is responsible for doing so. In addition, a node could be gateway at multiple levels. Depending on the level for which profile changes have taken place, the propagation needs to be done accordingly.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
ProfilePropagationProtocol(GatewayInfo gatewayInfo,
ProtocolHandler protocolHandler)
|
|
| Method Summary | |
|---|---|
Object |
computeEventDestinationsAtLevel(NBEvent nbEvent,
int level)
This method is called only if the isGatewayAtLevel returns true. |
void |
connectionToClientLost(Object clientIdentifier,
String linkId)
|
boolean |
isGatewayAtLevel(int level)
This method indicates if the node in question is a gateway at the level in the argument |
static void |
main(String[] args)
|
byte[] |
marshallProfilesForSpecifiedLevelOnwards(int level)
Marshall the profiles from a specified level onwards to a newly added node. |
void |
processMarshalledProfiles(byte[] marshalledBytes)
Process the profiles bytes that have been received. |
void |
processProfilePropagationRequest(byte[] requestBytes,
String sender)
Handle profile propagation requests. |
void |
propagateProfileChange(Profile profile,
int level,
boolean addProfile)
This method is responsible for propagating profile changes to trees at the next highest level. |
void |
setAsGatewayAtLevel(int level)
This designates this node as a gateway at level level. |
void |
setDestination(Destinations destination)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProfilePropagationProtocol(GatewayInfo gatewayInfo,
ProtocolHandler protocolHandler)
| Method Detail |
|---|
public void setDestination(Destinations destination)
public boolean isGatewayAtLevel(int level)
level - The level for which we are testing if the node is a gateway.public void setAsGatewayAtLevel(int level)
public Object computeEventDestinationsAtLevel(NBEvent nbEvent,
int level)
nbEvent - The event that needs to be matched.level - The destinations at level (level-1) that we are
interested in.
public void processProfilePropagationRequest(byte[] requestBytes,
String sender)
public void propagateProfileChange(Profile profile,
int level,
boolean addProfile)
profile - This is the subscription profile that needs to be propagated.level - The level for which this change is being propagatedaddProfile - A boolean variable indicating wether this profile is being
added to the system or is being removed.
public void connectionToClientLost(Object clientIdentifier,
String linkId)
public byte[] marshallProfilesForSpecifiedLevelOnwards(int level)
level -
public void processMarshalledProfiles(byte[] marshalledBytes)
marshalledBytes - public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||