Package org.netxms.client.objects
Class Interface
- java.lang.Object
-
- org.netxms.client.objects.AbstractObject
-
- org.netxms.client.objects.GenericObject
-
- org.netxms.client.objects.Interface
-
- All Implemented Interfaces:
ZoneMember
public class Interface extends GenericObject implements ZoneMember
Network interface object
-
-
Field Summary
-
Fields inherited from class org.netxms.client.objects.AbstractObject
accessList, backupZoneProxyId, BUSINESSSERVICEROOT, CALCULATE_DEFAULT, CALCULATE_MOST_CRITICAL, CALCULATE_MULTIPLE_THRESHOLDS, CALCULATE_SINGLE_THRESHOLD, children, comments, creationTime, customAttributes, DASHBOARDROOT, dashboards, drillDownObjectId, fixedPropagatedStatus, geolocation, guid, image, inheritAccessRights, inMaintenanceMode, isDeleted, moduleData, NETWORK, NETWORKMAPROOT, OBJECT_ACCESSPOINT, OBJECT_AGENTPOLICY, OBJECT_AGENTPOLICY_CONFIG, OBJECT_AGENTPOLICY_LOGPARSER, OBJECT_BUSINESSSERVICE, OBJECT_BUSINESSSERVICEROOT, OBJECT_CHASSIS, OBJECT_CLUSTER, OBJECT_CONDITION, OBJECT_CONTAINER, OBJECT_CUSTOM, OBJECT_DASHBOARD, OBJECT_DASHBOARDGROUP, OBJECT_DASHBOARDROOT, OBJECT_GENERIC, OBJECT_INTERFACE, OBJECT_MOBILEDEVICE, OBJECT_NETWORK, OBJECT_NETWORKMAP, OBJECT_NETWORKMAPGROUP, OBJECT_NETWORKMAPROOT, OBJECT_NETWORKSERVICE, OBJECT_NODE, OBJECT_NODELINK, OBJECT_POLICYGROUP, OBJECT_POLICYROOT, OBJECT_RACK, OBJECT_SENSOR, OBJECT_SERVICEROOT, OBJECT_SLMCHECK, OBJECT_SUBNET, OBJECT_TEMPLATE, OBJECT_TEMPLATEGROUP, OBJECT_TEMPLATEROOT, OBJECT_VPNCONNECTOR, OBJECT_ZONE, objectClass, objectId, objectName, parents, POLICYROOT, postalAddress, primaryZoneProxyId, PROPAGATE_DEFAULT, PROPAGATE_FIXED, PROPAGATE_RELATIVE, PROPAGATE_TRANSLATED, PROPAGATE_UNCHANGED, REPORTROOT, responsibleUsers, SERVICEROOT, session, status, statusCalculationMethod, statusPropagationMethod, statusShift, statusSingleThreshold, statusThresholds, statusTransformation, TEMPLATEROOT, trustedNodes, urls, ZONE0
-
-
Constructor Summary
Constructors Constructor Description Interface(org.netxms.base.NXCPMessage msg, NXCSession session)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAdminState()Get administrative stateStringgetAdminStateAsText()Get administrative state as textStringgetAlias()intgetChassis()StringgetDescription()intgetDot1xBackendState()Get 802.1x backend stateStringgetDot1xBackendStateAsText()Get 802.1x backend state as textintgetDot1xPaeState()Get 802.1x PAE stateStringgetDot1xPaeStateAsText()Get 802.1x PAE state as textintgetExpectedState()Get interface expected stateInetAddressgetFirstUnicastAddress()Get first unicast addressorg.netxms.base.InetAddressExgetFirstUnicastAddressEx()Get first unicast addressintgetFlags()intgetIfIndex()SnmpObjectIdgetIfTableSuffix()intgetIfType()StringgetIfTypeName()Get symbolic name for interface typestatic StringgetIfTypeName(int ifType)Get symbolic name for interface typeList<org.netxms.base.InetAddressEx>getIpAddressList()StringgetIpAddressListAsString()Get IP address list as stringorg.netxms.base.MacAddressgetMacAddress()Get interface MAC addressintgetModule()intgetMtu()StringgetObjectClassName()intgetOperState()Get operational stateStringgetOperStateAsText()Get operational state as textInterfacegetParentInterface()Get parent interface objectlonggetParentInterfaceId()Get object ID of parent interfaceAbstractNodegetParentNode()Get parent node object.LinkLayerDiscoveryProtocolgetPeerDiscoveryProtocol()Get peer discovery protocollonggetPeerInterfaceId()longgetPeerNodeId()StringgetPhysicalLocation()Get string describing interface physical location in form chassis/module/pic/portintgetPIC()intgetPort()intgetRequiredPollCount()longgetSpeed()Set<String>getStrings()Get all strings in objectlong[]getVlans()longgetZoneId()Get ID of the zone this object belongs toStringgetZoneName()Get name of the zone this object belongs tobooleanhasAddress(InetAddress addr)Check if given address present on interfacebooleanhasAddress(org.netxms.base.InetAddressEx addr)Check if given address present on interfacebooleanisAllowedOnMap()If this method returns true object is allowed to be on custom network map.booleanisExcludedFromTopology()Check if this interface is excluded from network topology calculationbooleanisIncludedInIcmpPoll()Check if this interface is included in ICMP poll for owning nodebooleanisLoopback()Check if this interface is a loopbackbooleanisPhysicalPort()Check if this interface is a physical port-
Methods inherited from class org.netxms.client.objects.AbstractObject
addString, getAccessList, getAllChildren, getAllChildren, getAllParents, getAllParents, getBackupZoneProxyId, getChildIdList, getChildren, getChildrenAsArray, getComments, getCreationTime, getCustomAttribute, getCustomAttributes, getCustomAttributeValue, getDashboards, getDrillDownObjectId, getEffectiveRights, getFixedPropagatedStatus, getGeolocation, getGuid, getImage, getModuleData, getObjectClass, getObjectId, getObjectName, getParentCount, getParentIdList, getParents, getParentsAsArray, getPostalAddress, getPrimaryZoneProxyId, getResponsibleUsers, getStatus, getStatusCalculationMethod, getStatusPropagationMethod, getStatusShift, getStatusSingleThreshold, getStatusThresholds, getStatusTransformation, getTrustedNodes, getUrls, hasAccessibleChildren, hasChildren, hashCode, hasParents, hasUrls, isAlarmsVisible, isChildOf, isChildOf, isDefaultImage, isDeleted, isDirectChildOf, isDirectParentOf, isInheritAccessRights, isInMaintenanceMode, isParentOf, isParentOf, setSession
-
-
-
-
Field Detail
-
IF_SYNTHETIC_MASK
public static final int IF_SYNTHETIC_MASK
- See Also:
- Constant Field Values
-
IF_PHYSICAL_PORT
public static final int IF_PHYSICAL_PORT
- See Also:
- Constant Field Values
-
IF_EXCLUDE_FROM_TOPOLOGY
public static final int IF_EXCLUDE_FROM_TOPOLOGY
- See Also:
- Constant Field Values
-
IF_LOOPBACK
public static final int IF_LOOPBACK
- See Also:
- Constant Field Values
-
IF_CREATED_MANUALLY
public static final int IF_CREATED_MANUALLY
- See Also:
- Constant Field Values
-
IF_PEER_REFLECTION
public static final int IF_PEER_REFLECTION
- See Also:
- Constant Field Values
-
IF_INCLUDE_IN_ICMP_POLL
public static final int IF_INCLUDE_IN_ICMP_POLL
- See Also:
- Constant Field Values
-
IF_EXPECTED_STATE_MASK
public static final int IF_EXPECTED_STATE_MASK
- See Also:
- Constant Field Values
-
ADMIN_STATE_UNKNOWN
public static final int ADMIN_STATE_UNKNOWN
- See Also:
- Constant Field Values
-
ADMIN_STATE_UP
public static final int ADMIN_STATE_UP
- See Also:
- Constant Field Values
-
ADMIN_STATE_DOWN
public static final int ADMIN_STATE_DOWN
- See Also:
- Constant Field Values
-
ADMIN_STATE_TESTING
public static final int ADMIN_STATE_TESTING
- See Also:
- Constant Field Values
-
OPER_STATE_UNKNOWN
public static final int OPER_STATE_UNKNOWN
- See Also:
- Constant Field Values
-
OPER_STATE_UP
public static final int OPER_STATE_UP
- See Also:
- Constant Field Values
-
OPER_STATE_DOWN
public static final int OPER_STATE_DOWN
- See Also:
- Constant Field Values
-
OPER_STATE_TESTING
public static final int OPER_STATE_TESTING
- See Also:
- Constant Field Values
-
OPER_STATE_DORMANT
public static final int OPER_STATE_DORMANT
- See Also:
- Constant Field Values
-
OPER_STATE_NOT_PRESENT
public static final int OPER_STATE_NOT_PRESENT
- See Also:
- Constant Field Values
-
EXPECTED_STATE_UP
public static final int EXPECTED_STATE_UP
- See Also:
- Constant Field Values
-
EXPECTED_STATE_DOWN
public static final int EXPECTED_STATE_DOWN
- See Also:
- Constant Field Values
-
EXPECTED_STATE_IGNORE
public static final int EXPECTED_STATE_IGNORE
- See Also:
- Constant Field Values
-
PAE_STATE_UNKNOWN
public static final int PAE_STATE_UNKNOWN
- See Also:
- Constant Field Values
-
PAE_STATE_INITIALIZE
public static final int PAE_STATE_INITIALIZE
- See Also:
- Constant Field Values
-
PAE_STATE_DISCONNECTED
public static final int PAE_STATE_DISCONNECTED
- See Also:
- Constant Field Values
-
PAE_STATE_CONNECTING
public static final int PAE_STATE_CONNECTING
- See Also:
- Constant Field Values
-
PAE_STATE_AUTHENTICATING
public static final int PAE_STATE_AUTHENTICATING
- See Also:
- Constant Field Values
-
PAE_STATE_AUTHENTICATED
public static final int PAE_STATE_AUTHENTICATED
- See Also:
- Constant Field Values
-
PAE_STATE_ABORTING
public static final int PAE_STATE_ABORTING
- See Also:
- Constant Field Values
-
PAE_STATE_HELD
public static final int PAE_STATE_HELD
- See Also:
- Constant Field Values
-
PAE_STATE_FORCE_AUTH
public static final int PAE_STATE_FORCE_AUTH
- See Also:
- Constant Field Values
-
PAE_STATE_FORCE_UNAUTH
public static final int PAE_STATE_FORCE_UNAUTH
- See Also:
- Constant Field Values
-
PAE_STATE_RESTART
public static final int PAE_STATE_RESTART
- See Also:
- Constant Field Values
-
BACKEND_STATE_UNKNOWN
public static final int BACKEND_STATE_UNKNOWN
- See Also:
- Constant Field Values
-
BACKEND_STATE_REQUEST
public static final int BACKEND_STATE_REQUEST
- See Also:
- Constant Field Values
-
BACKEND_STATE_RESPONSE
public static final int BACKEND_STATE_RESPONSE
- See Also:
- Constant Field Values
-
BACKEND_STATE_SUCCESS
public static final int BACKEND_STATE_SUCCESS
- See Also:
- Constant Field Values
-
BACKEND_STATE_FAIL
public static final int BACKEND_STATE_FAIL
- See Also:
- Constant Field Values
-
BACKEND_STATE_TIMEOUT
public static final int BACKEND_STATE_TIMEOUT
- See Also:
- Constant Field Values
-
BACKEND_STATE_IDLE
public static final int BACKEND_STATE_IDLE
- See Also:
- Constant Field Values
-
BACKEND_STATE_INITIALIZE
public static final int BACKEND_STATE_INITIALIZE
- See Also:
- Constant Field Values
-
BACKEND_STATE_IGNORE
public static final int BACKEND_STATE_IGNORE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Interface
public Interface(org.netxms.base.NXCPMessage msg, NXCSession session)- Parameters:
msg-
-
-
Method Detail
-
getParentNode
public AbstractNode getParentNode()
Get parent node object.- Returns:
- parent node object or null if it is not exist or inaccessible
-
getIfIndex
public int getIfIndex()
- Returns:
- Interface index
-
getIfType
public int getIfType()
- Returns:
- Interface type
-
getIfTypeName
public String getIfTypeName()
Get symbolic name for interface type- Returns:
- symbolic name for interface type
-
getMacAddress
public org.netxms.base.MacAddress getMacAddress()
Get interface MAC address- Returns:
- Interface MAC address
-
getRequiredPollCount
public int getRequiredPollCount()
- Returns:
- Number of polls required to change interface status
-
getObjectClassName
public String getObjectClassName()
- Overrides:
getObjectClassNamein classAbstractObject- Returns:
- Name of NetXMS object's class
-
isAllowedOnMap
public boolean isAllowedOnMap()
Description copied from class:AbstractObjectIf this method returns true object is allowed to be on custom network map. Default implementation always returns false.- Overrides:
isAllowedOnMapin classAbstractObject- Returns:
- true if object is allowed to be on custom network map
-
getChassis
public int getChassis()
- Returns:
- the chassis
-
getPIC
public int getPIC()
- Returns:
- the pic
-
getModule
public int getModule()
- Returns:
- the slot
-
getPort
public int getPort()
- Returns:
- the port
-
getPhysicalLocation
public String getPhysicalLocation()
Get string describing interface physical location in form chassis/module/pic/port- Returns:
- string describing interface physical location in form chassis/module/pic/port or emoty string if interface is not physical port
-
getPeerNodeId
public long getPeerNodeId()
- Returns:
- the peerNodeId
-
getPeerInterfaceId
public long getPeerInterfaceId()
- Returns:
- the peerInterfaceId
-
getZoneId
public long getZoneId()
Description copied from interface:ZoneMemberGet ID of the zone this object belongs to- Specified by:
getZoneIdin interfaceZoneMember- Returns:
- zone ID
-
getZoneName
public String getZoneName()
Description copied from interface:ZoneMemberGet name of the zone this object belongs to- Specified by:
getZoneNamein interfaceZoneMember- Returns:
- zone name
-
getDescription
public String getDescription()
- Returns:
- the description
-
getFlags
public int getFlags()
- Returns:
- the flags
-
getDot1xPaeState
public int getDot1xPaeState()
Get 802.1x PAE state- Returns:
- 802.1x PAE state
-
getDot1xPaeStateAsText
public String getDot1xPaeStateAsText()
Get 802.1x PAE state as text- Returns:
- 802.1x PAE state as text
-
getDot1xBackendState
public int getDot1xBackendState()
Get 802.1x backend state- Returns:
- 802.1x backend state
-
getDot1xBackendStateAsText
public String getDot1xBackendStateAsText()
Get 802.1x backend state as text- Returns:
- 802.1x backend state as text
-
getAdminState
public int getAdminState()
Get administrative state- Returns:
- administrative state
-
getAdminStateAsText
public String getAdminStateAsText()
Get administrative state as text- Returns:
- administrative state as text
-
getOperState
public int getOperState()
Get operational state- Returns:
- operational state
-
getOperStateAsText
public String getOperStateAsText()
Get operational state as text- Returns:
- operational state as text
-
getExpectedState
public int getExpectedState()
Get interface expected state- Returns:
- interface expected state
-
isPhysicalPort
public boolean isPhysicalPort()
Check if this interface is a physical port- Returns:
- true if this interface is a physical port
-
isLoopback
public boolean isLoopback()
Check if this interface is a loopback- Returns:
- true if this interface is a loopback
-
isExcludedFromTopology
public boolean isExcludedFromTopology()
Check if this interface is excluded from network topology calculation- Returns:
- true if this interface is excluded from network topology calculation
-
isIncludedInIcmpPoll
public boolean isIncludedInIcmpPoll()
Check if this interface is included in ICMP poll for owning node- Returns:
- true if this interface is included in ICMP poll for owning node
-
getPeerDiscoveryProtocol
public LinkLayerDiscoveryProtocol getPeerDiscoveryProtocol()
Get peer discovery protocol- Returns:
- peer discovery protocol
-
getMtu
public int getMtu()
- Returns:
- the mtu
-
getSpeed
public long getSpeed()
- Returns:
- the speed
-
getIfTableSuffix
public SnmpObjectId getIfTableSuffix()
- Returns:
- the ifTableSuffix
-
getAlias
public String getAlias()
- Returns:
- the alias
-
getIpAddressList
public List<org.netxms.base.InetAddressEx> getIpAddressList()
- Returns:
- the ipAddressList
-
hasAddress
public boolean hasAddress(org.netxms.base.InetAddressEx addr)
Check if given address present on interface- Parameters:
addr- IP address- Returns:
- true if given address present on interface
-
hasAddress
public boolean hasAddress(InetAddress addr)
Check if given address present on interface- Parameters:
addr- IP address- Returns:
- true if given address present on interface
-
getFirstUnicastAddress
public InetAddress getFirstUnicastAddress()
Get first unicast address- Returns:
- first unicast address
-
getFirstUnicastAddressEx
public org.netxms.base.InetAddressEx getFirstUnicastAddressEx()
Get first unicast address- Returns:
- first unicast address
-
getIpAddressListAsString
public String getIpAddressListAsString()
Get IP address list as string- Returns:
- IP address list as string
-
getIfTypeName
public static String getIfTypeName(int ifType)
Get symbolic name for interface type- Parameters:
ifType- interface type- Returns:
- symbolic name for interface type
-
getParentInterfaceId
public long getParentInterfaceId()
Get object ID of parent interface- Returns:
- parent interface object ID or 0
-
getParentInterface
public Interface getParentInterface()
Get parent interface object- Returns:
- parent interface object or null
-
getVlans
public long[] getVlans()
- Returns:
- the vlans
-
getStrings
public Set<String> getStrings()
Description copied from class:AbstractObjectGet all strings in object- Overrides:
getStringsin classAbstractObject- Returns:
- set of all strings in object
-
-