org.openuat.apps.groupkey
Class App2tgdh
java.lang.Object
org.openuat.apps.groupkey.App2tgdh
- All Implemented Interfaces:
- java.lang.Runnable, ifListener
public class App2tgdh
- extends java.lang.Object
- implements ifListener
- Author:
- Martijn Sack
Application stub to GroupKey (tgdh) stub
Basic tree creation and mutation TGDH tree funtions are implemented in this class.
org.openuat.channel.http is used as communicator instead of the tgdh.comm class.
|
Method Summary |
static tgdh.tree.BasicTree |
createTree(java.lang.String _uniqueId)
|
void |
handleStringEvent(java.lang.String _data,
boolean _success)
Wakes up the sleeping Thread as it got a String-message |
static tgdh.tree.BasicTree |
joinTree(tgdh.tree.BasicTree _basicTree,
java.lang.String _uniqueID,
java.lang.String _treeGroupName)
|
static tgdh.tree.BasicTree |
leaveTree(tgdh.tree.BasicTree _basicTree,
tgdh.tree.Node _leavingNode)
|
static tgdh.tree.BasicTree |
mergeTrees(tgdh.tree.BasicTree _basicTree1,
tgdh.tree.BasicTree _basicTree2)
|
static tgdh.tree.BasicTree |
partitionTree(tgdh.tree.BasicTree _basicTree,
tgdh.tree.Node[] _nodesToLeave)
|
static boolean |
retreiveMessage(java.lang.String _data,
java.lang.String _messageType,
java.lang.String _treeAlteration,
java.lang.String _messageStep)
MESSAGE: messageType*messageProtocolAlteration*messageProtocolStep*PAYLOAD
MESSAGE TYPES:
1. tree: message contains a tree
2. joinMessage: JoinMessage
MESSAGE TREE ALTERATION:
1. create: at creating trees
2. join:at joining into tree
MESSAGE PROTOCOL STEP
1,2,3,4 |
void |
run()
|
void |
testJoinTree()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
App2tgdh
public App2tgdh()
createTree
public static tgdh.tree.BasicTree createTree(java.lang.String _uniqueId)
joinTree
public static tgdh.tree.BasicTree joinTree(tgdh.tree.BasicTree _basicTree,
java.lang.String _uniqueID,
java.lang.String _treeGroupName)
throws java.lang.Exception
- Throws:
java.lang.Exception
leaveTree
public static tgdh.tree.BasicTree leaveTree(tgdh.tree.BasicTree _basicTree,
tgdh.tree.Node _leavingNode)
mergeTrees
public static tgdh.tree.BasicTree mergeTrees(tgdh.tree.BasicTree _basicTree1,
tgdh.tree.BasicTree _basicTree2)
partitionTree
public static tgdh.tree.BasicTree partitionTree(tgdh.tree.BasicTree _basicTree,
tgdh.tree.Node[] _nodesToLeave)
handleStringEvent
public void handleStringEvent(java.lang.String _data,
boolean _success)
- Description copied from interface:
ifListener
- Wakes up the sleeping Thread as it got a String-message
- Specified by:
handleStringEvent in interface ifListener
- Parameters:
_data - received data_success - tells if there was success or not
retreiveMessage
public static boolean retreiveMessage(java.lang.String _data,
java.lang.String _messageType,
java.lang.String _treeAlteration,
java.lang.String _messageStep)
- MESSAGE: messageType*messageProtocolAlteration*messageProtocolStep*PAYLOAD
MESSAGE TYPES:
1. tree: message contains a tree
2. joinMessage: JoinMessage
MESSAGE TREE ALTERATION:
1. create: at creating trees
2. join:at joining into tree
MESSAGE PROTOCOL STEP
1,2,3,4
testJoinTree
public void testJoinTree()
run
public void run()
- Specified by:
run in interface java.lang.Runnable
2005-2009, Rene Mayrhofer.