collectData, collectorDescription, collectorName, collectorPort, dataStore, propsFileName, running
Constructor and Description |
---|
SampleCollector(java.lang.String name,
java.lang.String desc)
Create a sample collector with a given name and description.
|
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 data store.
|
protected void |
initialiseDataStore()
This method calls the super class to initialise the data store, which
makes use of the default
DataStore implementation and then adds
two sample data sources to the data store (one with id 1, another with id
2). |
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 SampleCollector(java.lang.String name, java.lang.String desc)
name
- The name of the collectordesc
- The description for the collectorprotected void initialiseDataStore()
DataStore
implementation and then adds
two sample data sources to the data store (one with id 1, another with id
2).initialiseDataStore
in class Collector
protected void collectData(int dataSourceId, java.lang.String address, java.lang.String mask)
This method adds some sample data to the collector 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 static void main(java.lang.String[] args)
public static void main(String[] args)
method. Here we create a
new instance of the SampleCollector
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>