eu.reservoir.monitoring.distribution.udp
Class AbstractUDPDataPlaneProducer

java.lang.Object
  extended by eu.reservoir.monitoring.distribution.udp.AbstractUDPDataPlaneProducer
All Implemented Interfaces:
DataSourceDelegateInteracter, MeasurementReceiver, DataPlane, DataService, Plane, Transmitting
Direct Known Subclasses:
UDPDataPlaneProducerNoNames, UDPDataPlaneProducerWithNames

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

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


Constructor Summary
AbstractUDPDataPlaneProducer(java.net.InetSocketAddress addr)
          Construct an AbstractUDPDataPlaneProducer.
 
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, with an extra object that has context info
 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 dsp)
          Send a message onto the 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

AbstractUDPDataPlaneProducer

public AbstractUDPDataPlaneProducer(java.net.InetSocketAddress addr)
Construct an AbstractUDPDataPlaneProducer.

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 dsp)
                      throws java.lang.Exception
Send a message onto the 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, with an extra object that has context info

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