Class CollectionAgentDTO
- java.lang.Object
-
- org.opennms.netmgt.collection.dto.CollectionAgentDTO
-
- All Implemented Interfaces:
CollectionAgent
public class CollectionAgentDTO extends java.lang.Object implements CollectionAgent
-
-
Constructor Summary
Constructors Constructor Description CollectionAgentDTO()CollectionAgentDTO(CollectionAgent agent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.net.InetAddressgetAddress()Returns the address information for the interface.<V> VgetAttribute(java.lang.String property)This method is used to return the object that is associated with the property name.java.util.Set<java.lang.String>getAttributeNames()Retrieves the names of all available attributes.java.lang.StringgetForeignId()getForeignIdjava.lang.StringgetForeignSource()getForeignSourcejava.lang.StringgetHostAddress()getHostAddressjava.lang.StringgetLocationName()getLocationNameintgetNodeId()getNodeIdjava.lang.StringgetNodeLabel()getNodeLabellonggetSavedSysUpTime()getSavedSysUpTimeResourcePathgetStorageResourcePath()inthashCode()java.lang.BooleanisStoreByForeignSource()isStoreByForeignSourcevoidsetAddress(java.net.InetAddress address)java.lang.ObjectsetAttribute(java.lang.String property, java.lang.Object value)This method is used to associate an object value with a textual key.voidsetForeignId(java.lang.String foreignId)voidsetForeignSource(java.lang.String foreignSource)voidsetLocationName(java.lang.String location)voidsetNodeId(int nodeId)voidsetNodeLabel(java.lang.String nodeLabel)voidsetSavedSysUpTime(long sysUpTime)setSavedSysUpTimevoidsetStorageResourcePath(ResourcePath storageResourcePath)voidsetStoreByForeignSource(java.lang.Boolean storeByForeignSource)java.lang.StringtoString()
-
-
-
Constructor Detail
-
CollectionAgentDTO
public CollectionAgentDTO()
-
CollectionAgentDTO
public CollectionAgentDTO(CollectionAgent agent)
-
-
Method Detail
-
getAddress
public java.net.InetAddress getAddress()
Description copied from interface:CollectionAgentReturns the address information for the interface.
- Specified by:
getAddressin interfaceCollectionAgent- Returns:
- a
Objectobject.
-
setAddress
public void setAddress(java.net.InetAddress address)
-
getAttributeNames
public java.util.Set<java.lang.String> getAttributeNames()
Description copied from interface:CollectionAgentRetrieves the names of all available attributes.- Specified by:
getAttributeNamesin interfaceCollectionAgent- Returns:
- a
Setthat contains the name of all configured attributes
-
getAttribute
public <V> V getAttribute(java.lang.String property)
Description copied from interface:CollectionAgentThis method is used to return the object that is associated with the property name. This is very similar to the java.util.Map get() method, but requires that the lookup be performed using a String name. The object may be of any instance that the monitor previous stored.
If there is no matching object for the property key, then a null pointer is returned to the application.
- Specified by:
getAttributein interfaceCollectionAgent- Parameters:
property- The key for the lookup.- Returns:
- The resulting value for the key, null if no value exist.
- See Also:
Map.get(java.lang.Object)
-
setAttribute
public java.lang.Object setAttribute(java.lang.String property, java.lang.Object value)Description copied from interface:CollectionAgentThis method is used to associate an object value with a textual key. If a previous value was associated with the key then the old value is returned to the caller. This is identical to the behavior defined by the java.util.Map put() method. The only restriction is that the key must be a java string instance.
- Specified by:
setAttributein interfaceCollectionAgent- Parameters:
property- The keyvalue- The value to associate with the key- Returns:
- The object that was previously associated with the key. Null is returned if there was no previous value associated.
- See Also:
Map.put(java.lang.Object, java.lang.Object)
-
isStoreByForeignSource
public java.lang.Boolean isStoreByForeignSource()
Description copied from interface:CollectionAgentisStoreByForeignSource
- Specified by:
isStoreByForeignSourcein interfaceCollectionAgent- Returns:
- a
Booleanobject.
-
setStoreByForeignSource
public void setStoreByForeignSource(java.lang.Boolean storeByForeignSource)
-
getHostAddress
public java.lang.String getHostAddress()
Description copied from interface:CollectionAgentgetHostAddress
- Specified by:
getHostAddressin interfaceCollectionAgent- Returns:
- a
Stringobject.
-
getNodeId
public int getNodeId()
Description copied from interface:CollectionAgentgetNodeId
- Specified by:
getNodeIdin interfaceCollectionAgent- Returns:
- a int.
-
setNodeId
public void setNodeId(int nodeId)
-
getNodeLabel
public java.lang.String getNodeLabel()
Description copied from interface:CollectionAgentgetNodeLabel
- Specified by:
getNodeLabelin interfaceCollectionAgent- Returns:
- a
Stringobject.
-
setNodeLabel
public void setNodeLabel(java.lang.String nodeLabel)
-
getForeignSource
public java.lang.String getForeignSource()
Description copied from interface:CollectionAgentgetForeignSource
- Specified by:
getForeignSourcein interfaceCollectionAgent- Returns:
- a
Stringobject.
-
setForeignSource
public void setForeignSource(java.lang.String foreignSource)
-
getForeignId
public java.lang.String getForeignId()
Description copied from interface:CollectionAgentgetForeignId
- Specified by:
getForeignIdin interfaceCollectionAgent- Returns:
- a
Stringobject.
-
setForeignId
public void setForeignId(java.lang.String foreignId)
-
getLocationName
public java.lang.String getLocationName()
Description copied from interface:CollectionAgentgetLocationName
- Specified by:
getLocationNamein interfaceCollectionAgent- Returns:
- a
Stringobject.
-
setLocationName
public void setLocationName(java.lang.String location)
-
getStorageResourcePath
public ResourcePath getStorageResourcePath()
- Specified by:
getStorageResourcePathin interfaceCollectionAgent
-
setStorageResourcePath
public void setStorageResourcePath(ResourcePath storageResourcePath)
-
getSavedSysUpTime
public long getSavedSysUpTime()
Description copied from interface:CollectionAgentgetSavedSysUpTime
- Specified by:
getSavedSysUpTimein interfaceCollectionAgent- Returns:
- a long.
-
setSavedSysUpTime
public void setSavedSysUpTime(long sysUpTime)
Description copied from interface:CollectionAgentsetSavedSysUpTime
- Specified by:
setSavedSysUpTimein interfaceCollectionAgent- Parameters:
sysUpTime- a long.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-