public class SampleRANCollector extends Collector
SampleCollector
but makes use of the RANDataStore
in order to store RAN specific data. It also
implements a GetRanData(int, String)
method to respond to the GetRanData XML-RPC request from the RAN agent.collectData, collectorDescription, collectorName, collectorPort, dataStore, propsFileName, running
Constructor and Description |
---|
SampleRANCollector(java.lang.String collectorName,
java.lang.String collectorDescription)
Create a new instance of the RAN collector.
|
Modifier and Type | Method and Description |
---|---|
protected void |
collectData(int dataSourceId,
java.lang.String address,
java.lang.String mask)
This method adds some sample data to the collector RAN data store.
|
java.lang.String |
GetRanData(int dataSourceId,
java.lang.String deviceId)
Get RAN data for a given device.
|
protected void |
initialiseDataStore()
Initialise the data store.
|
static void |
main(java.lang.String[] args)
The collector is run by implementing a
public static void main(String[] args) method. |
GetAssociatedAddresses, GetAssociatedAddresses, getCommandLineArgument, GetConnections, GetConnections, GetDeviceInfo, GetDeviceInfo, GetDeviceInfo, GetDeviceList, GetEntities, GetEntities, GetInfo, GetInventory, GetInventory, GetLayer1Connections, GetLayer1Connections, GetLayer2Connections, GetLayer2Connections, GetLayer2Vpns, GetLayer2Vpns, GetLayer3Connections, GetLayer3Connections, GetLayer3Vpns, GetLayer3Vpns, GetMplsInterfaces, GetMplsInterfaces, getPortNumberArgument, getPropertiesFileNameArgument, getPropertyValue, isRunning, loadPropertiesFile, shutdown, startup, startup, UpdateData
public SampleRANCollector(java.lang.String collectorName, java.lang.String collectorDescription)
collectorName
- The name of the collectorcollectorDescription
- A description of the collectorprotected void collectData(int dataSourceId, java.lang.String address, java.lang.String mask)
This method adds some sample data to the collector RAN data store. The following are added to the data store:
collectData
in class Collector
dataSourceId
- Holds the ID of the data source which should be updatedaddress
- If mask is not defined then it holds the address (IP or native id) of the device to refresh, or else it holds the subnet to
refresh.mask
- Holds the subnet mask, or is not definedpublic java.lang.String GetRanData(int dataSourceId, java.lang.String deviceId)
RANDataStore.getRANData(int, String)
method of RANDataStore
to
generate the XML String.dataSourceId
- The ID of the data sourcedeviceId
- The ID of the deviceprotected void initialiseDataStore()
RANDataStore
instead of the
default DataStore
. Also adds a single data source (with ID 1) to the data store.initialiseDataStore
in class Collector
public static void main(java.lang.String[] args)
public static void main(String[] args)
method. Here we create a
new instance of the SampleRANCollector
and then use
CollectorEmbeddedServer.runEmbeddedServer(Collector, String[])
to run the collector on an embedded
server. If no port is specified in the command line arguments (-port <port_number>
), then the default
port of 8080 is used.args
- Command line arguments to the collector, e.g. -port <port_number>