Class SnmpInterface
- java.lang.Object
-
- org.opennms.upgrade.implementations.SnmpInterface
-
- Direct Known Subclasses:
SnmpInterfaceUpgrade
public class SnmpInterface extends Object
The Class SnmpInterface.- Author:
- Alejandro Galue
-
-
Constructor Summary
Constructors Constructor Description SnmpInterface(int nodeId, String foreignSource, String foreignId, String ifDescr, String ifName, String physAddr, boolean storeByForeignSource)
Instantiates a new SNMP interface.SnmpInterface(ResultSet rs, boolean storeByForeignSource)
Instantiates a new SNMP interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getForeignId()
Gets the foreign id.String
getForeignSource()
Gets the foreign source.String
getIfDescr()
Gets the interface description.String
getIfName()
Gets the interface name.ResourceId
getNewResourceId()
Gets the new resource id.String
getNewRrdLabel()
Gets the new RRD label.int
getNodeId()
Gets the node id.ResourceId
getOldResourceId()
Gets the old resource id.String
getOldRrdLabel()
Gets the old RRD label.String
getPhysAddr()
Gets the physical address.protected void
initialize()
Initialize.boolean
shouldUpdate(String resourceId)
Checks if the resourceId should be updated.String
toString()
-
-
-
Constructor Detail
-
SnmpInterface
public SnmpInterface(ResultSet rs, boolean storeByForeignSource) throws SQLException
Instantiates a new SNMP interface.- Parameters:
rs
- the ResultSetstoreByForeignSource
- true, if the store by foreign source is enabled- Throws:
SQLException
- the SQL exception
-
SnmpInterface
public SnmpInterface(int nodeId, String foreignSource, String foreignId, String ifDescr, String ifName, String physAddr, boolean storeByForeignSource)
Instantiates a new SNMP interface.- Parameters:
nodeId
- the node idforeignSource
- the foreign sourceforeignId
- the foreign idifDescr
- the SNMP interface descriptionifName
- the SNMP interface namephysAddr
- the SNMP physical addressstoreByForeignSource
- true, if store by foreign source is enabled
-
-
Method Detail
-
initialize
protected void initialize()
Initialize.
-
getNodeId
public int getNodeId()
Gets the node id.- Returns:
- the node id
-
getForeignId
public String getForeignId()
Gets the foreign id.- Returns:
- the foreign id
-
getForeignSource
public String getForeignSource()
Gets the foreign source.- Returns:
- the foreign source
-
getIfName
public String getIfName()
Gets the interface name.- Returns:
- the interface name
-
getIfDescr
public String getIfDescr()
Gets the interface description.- Returns:
- the interface description
-
getPhysAddr
public String getPhysAddr()
Gets the physical address.- Returns:
- the physical address
-
getOldRrdLabel
public String getOldRrdLabel()
Gets the old RRD label.- Returns:
- the old RRD label
-
getNewRrdLabel
public String getNewRrdLabel()
Gets the new RRD label.- Returns:
- the new RRD label
-
getOldResourceId
public ResourceId getOldResourceId()
Gets the old resource id.- Returns:
- the old resource id
-
getNewResourceId
public ResourceId getNewResourceId()
Gets the new resource id.- Returns:
- the new resource id
-
shouldUpdate
public boolean shouldUpdate(String resourceId)
Checks if the resourceId should be updated.- Parameters:
resourceId
- the resource id to check- Returns:
- true, if the resource should be updated
-
-