public class MockCollectionAgent extends Object implements CollectionAgent
TYPE_INET, TYPE_UNKNOWN
Constructor and Description |
---|
MockCollectionAgent(int nodeId,
String nodeLabel,
InetAddress ipAddress) |
MockCollectionAgent(int nodeId,
String nodeLabel,
String foreignSource,
String foreignId,
InetAddress ipAddress)
Instantiates a new mock collection agent.
|
Modifier and Type | Method and Description |
---|---|
InetAddress |
getAddress()
Returns the address information for the interface.
|
<V> V |
getAttribute(String property)
This method is used to return the object that is associated with the
property name.
|
Set<String> |
getAttributeNames()
Retrieves the names of all available attributes.
|
String |
getForeignId()
getForeignId
|
String |
getForeignSource()
getForeignSource
|
String |
getHostAddress()
getHostAddress
|
String |
getLocationName()
getLocationName
|
int |
getNodeId()
getNodeId
|
String |
getNodeLabel()
getNodeLabel
|
long |
getSavedSysUpTime()
getSavedSysUpTime
|
ResourcePath |
getStorageResourcePath() |
String |
getSysObjectId()
getSysObjectId
|
int |
getType()
Returns the interface type for the network interface.
|
Boolean |
isStoreByForeignSource()
isStoreByForeignSource
|
Object |
setAttribute(String property,
Object value)
This method is used to associate an object value with a textual key.
|
void |
setSavedIfCount(int ifCount)
setSavedIfCount
|
void |
setSavedSysUpTime(long sysUpTime)
setSavedSysUpTime
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public MockCollectionAgent(int nodeId, String nodeLabel, String foreignSource, String foreignId, InetAddress ipAddress)
nodeId
- the node idnodeLabel
- the node labelforeignSource
- the foreign sourceforeignId
- the foreign idipAddress
- the ip addresspublic MockCollectionAgent(int nodeId, String nodeLabel, InetAddress ipAddress)
public int getType()
NetworkInterface
Returns the interface type for the network interface.
getType
in interface NetworkInterface<InetAddress>
public InetAddress getAddress()
NetworkInterface
Returns the address information for the interface. If the interface then this should be either an InetAddress or an object for specialized address types.
getAddress
in interface NetworkInterface<InetAddress>
Object
object.public Set<String> getAttributeNames()
NetworkInterface
getAttributeNames
in interface NetworkInterface<InetAddress>
Set
that contains the name of all configured attributespublic <V> V getAttribute(String property)
NetworkInterface
This 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.
getAttribute
in interface NetworkInterface<InetAddress>
property
- The key for the lookup.Map.get(java.lang.Object)
public Object setAttribute(String property, Object value)
NetworkInterface
This 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.
setAttribute
in interface NetworkInterface<InetAddress>
property
- The keyvalue
- The value to associate with the keyMap.put(java.lang.Object, java.lang.Object)
public Boolean isStoreByForeignSource()
CollectionAgent
isStoreByForeignSource
isStoreByForeignSource
in interface CollectionAgent
Boolean
object.public String getHostAddress()
CollectionAgent
getHostAddress
getHostAddress
in interface CollectionAgent
String
object.public void setSavedIfCount(int ifCount)
CollectionAgent
setSavedIfCount
setSavedIfCount
in interface CollectionAgent
ifCount
- a int.public int getNodeId()
CollectionAgent
getNodeId
getNodeId
in interface CollectionAgent
public String getNodeLabel()
CollectionAgent
getNodeLabel
getNodeLabel
in interface CollectionAgent
String
object.public String getForeignSource()
CollectionAgent
getForeignSource
getForeignSource
in interface CollectionAgent
String
object.public String getForeignId()
CollectionAgent
getForeignId
getForeignId
in interface CollectionAgent
String
object.public String getLocationName()
CollectionAgent
getLocationName
getLocationName
in interface CollectionAgent
String
object.public ResourcePath getStorageResourcePath()
getStorageResourcePath
in interface CollectionAgent
public String getSysObjectId()
CollectionAgent
getSysObjectId
getSysObjectId
in interface CollectionAgent
String
object.public long getSavedSysUpTime()
CollectionAgent
getSavedSysUpTime
getSavedSysUpTime
in interface CollectionAgent
public void setSavedSysUpTime(long sysUpTime)
CollectionAgent
setSavedSysUpTime
setSavedSysUpTime
in interface CollectionAgent
sysUpTime
- a long.Copyright © 2017. All rights reserved.