Class PeerResolver

java.lang.Object
  |
  +--PeerResolver
All Implemented Interfaces:
java.io.Serializable

public class PeerResolver
extends java.lang.Object
implements java.io.Serializable

This class implements PeerResolver that resolves peer using the node name in in the ontology

See Also:
Serialized Form

Constructor Summary
PeerResolver()
          Constructor : Constructs Peerresolver by creating the peerTable hashmap
 
Method Summary
 void addNodeMapping(java.lang.String nodeName, PeerDetailStruct pDStruct)
          Adds details of the new peer in HashMap against the name of the new node ( in registries ontology) where peer wants to add its registry
 void createMapping()
           
 java.util.ArrayList getNodeMapping(java.lang.String nodeName)
          Gets details of a peer in HashMap against the name of the node ( in registries ontology) where peer has added its registry
 java.util.HashMap getPeerTable()
          Gets PeerTable HashMap
static void main(java.lang.String[] args)
           
 void setPeerTable(java.util.HashMap pTable)
          Sets PeerTable HashMap
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PeerResolver

public PeerResolver()
Constructor : Constructs Peerresolver by creating the peerTable hashmap

Method Detail

addNodeMapping

public void addNodeMapping(java.lang.String nodeName,
                           PeerDetailStruct pDStruct)
Adds details of the new peer in HashMap against the name of the new node ( in registries ontology) where peer wants to add its registry


getNodeMapping

public java.util.ArrayList getNodeMapping(java.lang.String nodeName)
Gets details of a peer in HashMap against the name of the node ( in registries ontology) where peer has added its registry

Returns:
ArrayList List of all peers who have added their Registries in the nodeName node in Ontology

getPeerTable

public java.util.HashMap getPeerTable()
Gets PeerTable HashMap

Returns:
HashMap PeerTable of this PeerResolver

setPeerTable

public void setPeerTable(java.util.HashMap pTable)
Sets PeerTable HashMap


createMapping

public void createMapping()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)