HPSearch

cgl.hpsearch.shell.narada
Class NBPerfData

java.lang.Object
  extended bycgl.hpsearch.shell.narada.NBPerfData
All Implemented Interfaces:
NBEventListener

public class NBPerfData
extends Object
implements NBEventListener


Constructor Summary
NBPerfData(String host, String port)
          Create a Connection to some broker and subscribe as a listener of the topic NB_PERFORMANCE_DATA_TOPIC.
 
Method Summary
 String[] getLinks(String nodeId)
           
 String[] getNodes()
           
 void insertUpdateRecord(String data)
          Adds the data to a DOM Tree
 void onEvent(NBEvent nbEvent)
          Registers the data in the DOM-Tree / Vector when an event is received
 void printTree()
           
 String[] query(String xpathQuery)
           
 boolean startReceivingEvents()
          Starts listening on the topic specified by NB_PERFORMANCE_DATA_TOPIC
 boolean stopReceivingEvents()
          Stops listening on the topic specified by NB_PERFORMANCE_DATA_TOPIC
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NBPerfData

public NBPerfData(String host,
                  String port)
Create a Connection to some broker and subscribe as a listener of the topic NB_PERFORMANCE_DATA_TOPIC.

Parameters:
host - - String representing the host of the broker to connect to
port - - String representing the port on which the broker is listening
Method Detail

stopReceivingEvents

public boolean stopReceivingEvents()
Stops listening on the topic specified by NB_PERFORMANCE_DATA_TOPIC

Returns:
true if success, false otherwise

startReceivingEvents

public boolean startReceivingEvents()
Starts listening on the topic specified by NB_PERFORMANCE_DATA_TOPIC

Returns:
true if success, false otherwise

onEvent

public void onEvent(NBEvent nbEvent)
Registers the data in the DOM-Tree / Vector when an event is received

Specified by:
onEvent in interface NBEventListener
See Also:
NBEventListener.onEvent(cgl.narada.event.NBEvent)

getNodes

public String[] getNodes()

getLinks

public String[] getLinks(String nodeId)

query

public String[] query(String xpathQuery)

insertUpdateRecord

public void insertUpdateRecord(String data)
Adds the data to a DOM Tree

Parameters:
data - XML String containaing to data.

printTree

public void printTree()

HPSearch

For comments and suggestions please send e-mail to Harshawardhan Gadgil
Last updated: June 9 2006