cgl.narada.aggregator
Class NotifierNode

java.lang.Object
  extended by cgl.narada.aggregator.NotifierNode
All Implemented Interfaces:
InterchangeConstants, Handler

public class NotifierNode
extends Object
implements Handler, InterchangeConstants

This is an example which demonstrates using the transport interfaces in Narada. This class has presently been written for TCP communications. Subsequent versions of this class would include support for other transport types supported in NaradaBrokering.


Field Summary
 
Fields inherited from interface cgl.narada.aggregator.InterchangeConstants
DEREGISTER_NOTIFIER, INFO_POST_FROM_NOTIFIER, INFO_REQUEST_FROM_AGGREGATOR, INFO_RESPONSE_FROM_NOTIFIER, REGISTER_NOTIFIER
 
Constructor Summary
NotifierNode(Properties commProps, String commType)
          The constructor for the notifier node has information pertaining to the Aggregation node passed to it.
 
Method Summary
 String createLinkTo(Properties props, String linkType)
           
 void handleData(byte[] data, String sender)
           
 boolean isClient()
          This method indicates that the node in question is a client
 void loadCommunicationsOfType(Properties commProps, String commType)
           
static void main(String[] args)
           
 void postInfoToAggregator()
           
 void postInfoToAggregator(String s)
           
 void sendDataTo(byte[] data, String node)
           
 void sendDeregistrationToAggregator()
           
 void sendRegistrationToAggregator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotifierNode

public NotifierNode(Properties commProps,
                    String commType)
The constructor for the notifier node has information pertaining to the Aggregation node passed to it. This includes the hostname, portnum and transport type information.

Method Detail

loadCommunicationsOfType

public void loadCommunicationsOfType(Properties commProps,
                                     String commType)

createLinkTo

public String createLinkTo(Properties props,
                           String linkType)

sendRegistrationToAggregator

public void sendRegistrationToAggregator()

sendDeregistrationToAggregator

public void sendDeregistrationToAggregator()

sendDataTo

public void sendDataTo(byte[] data,
                       String node)

isClient

public boolean isClient()
This method indicates that the node in question is a client

Specified by:
isClient in interface Handler

postInfoToAggregator

public void postInfoToAggregator()

postInfoToAggregator

public void postInfoToAggregator(String s)

handleData

public void handleData(byte[] data,
                       String sender)
Specified by:
handleData in interface Handler

main

public static void main(String[] args)


For comments and suggestions please send e-mail to The NaradaBrokering Project