eu.reservoir.monitoring.distribution.multicast
Class AbstractMulticastDataPlaneProducer

java.lang.Object
  extended by eu.reservoir.monitoring.distribution.multicast.AbstractMulticastDataPlaneProducer
All Implemented Interfaces:
DataSourceDelegateInteracter, MeasurementReceiver, DataPlane, DataService, Plane, Transmitting
Direct Known Subclasses:
MulticastDataPlaneProducerNoNames, MulticastDataPlaneProducerWithNames

public abstract class AbstractMulticastDataPlaneProducer
extends java.lang.Object
implements DataPlane, DataSourceDelegateInteracter, Transmitting

A MulticastDataPlaneProducer is a DataPlane implementation that sends Measurements by multicast. It is also a DataSourceDelegateInteracter so it can, if needed, talk to the DataSource object it gets bound to.


Constructor Summary
AbstractMulticastDataPlaneProducer(MulticastAddress addr)
          Construct a MulticastDataPlaneProducer.
 
Method Summary
 boolean announce()
          Announce that the plane is up and running
 boolean connect()
          Connect to a delivery mechansim.
 boolean dennounce()
          Un-announce that the plane is up and running
 boolean disconnect()
          Disconnect from a delivery mechansim.
 DataSourceDelegate getDataSourceDelegate()
          Get the dataSourceDelegate this is a delegate for.
 Measurement report(Measurement m)
          Receiver of a measurment
 int sendData(DataPlaneMessage dpm)
          Send a message.
 boolean sentData(int id)
          This method is called just after a message has been sent to the underlying transport.
 DataSourceDelegate setDataSourceDelegate(DataSourceDelegate ds)
          Set the dataSourceDelegate this is a delegate for.
abstract  int transmit(DataPlaneMessage dpm)
          Send a message onto the multicast address.
 boolean transmitted(int id)
          This method is called just after a message has been sent to the underlying transport.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMulticastDataPlaneProducer

public AbstractMulticastDataPlaneProducer(MulticastAddress addr)
Construct a MulticastDataPlaneProducer.

Method Detail

connect

public boolean connect()
Connect to a delivery mechansim.

Specified by:
connect in interface Plane

disconnect

public boolean disconnect()
Disconnect from a delivery mechansim.

Specified by:
disconnect in interface Plane

announce

public boolean announce()
Announce that the plane is up and running

Specified by:
announce in interface Plane

dennounce

public boolean dennounce()
Un-announce that the plane is up and running

Specified by:
dennounce in interface Plane

transmit

public abstract int transmit(DataPlaneMessage dpm)
                      throws java.lang.Exception
Send a message onto the multicast address. The message is XDR encoded and it's structure is: +-------------------------------------------------------------------+ | data source id (long) | msg type (int) | seq no (int) | payload | +-------------------------------------------------------------------+

Specified by:
transmit in interface Transmitting
Throws:
java.lang.Exception

transmitted

public boolean transmitted(int id)
This method is called just after a message has been sent to the underlying transport.

Specified by:
transmitted in interface Transmitting

sendData

public int sendData(DataPlaneMessage dpm)
             throws java.lang.Exception
Send a message.

Specified by:
sendData in interface DataService
Throws:
java.lang.Exception

sentData

public boolean sentData(int id)
This method is called just after a message has been sent to the underlying transport.

Specified by:
sentData in interface DataService

report

public Measurement report(Measurement m)
Receiver of a measurment

Specified by:
report in interface MeasurementReceiver

getDataSourceDelegate

public DataSourceDelegate getDataSourceDelegate()
Get the dataSourceDelegate this is a delegate for.

Specified by:
getDataSourceDelegate in interface DataSourceDelegateInteracter

setDataSourceDelegate

public DataSourceDelegate setDataSourceDelegate(DataSourceDelegate ds)
Set the dataSourceDelegate this is a delegate for.

Specified by:
setDataSourceDelegate in interface DataSourceDelegateInteracter


RESERVOIR Monitoring 0.6.4