Package org.opennms.netmgt.provision
Class SnmpAssetProvisioningAdapter
- java.lang.Object
-
- org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter
-
- org.opennms.netmgt.provision.SimplerQueuedProvisioningAdapter
-
- org.opennms.netmgt.provision.SnmpAssetProvisioningAdapter
-
- All Implemented Interfaces:
ProvisioningAdapter
public class SnmpAssetProvisioningAdapter extends SimplerQueuedProvisioningAdapter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter
SimpleQueuedProvisioningAdapter.AdapterOperationQueue, SimpleQueuedProvisioningAdapter.AdapterOperationQueueListener
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME
ConstantNAME="SnmpAssetProvisioningAdapter"
-
Fields inherited from class org.opennms.netmgt.provision.SimplerQueuedProvisioningAdapter
m_delay, m_template, m_timeUnit
-
-
Constructor Summary
Constructors Constructor Description SnmpAssetProvisioningAdapter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doAddNode(int nodeId)
doAddvoid
doNotifyConfigChange(int nodeId)
doNodeConfigChangedvoid
doUpdateNode(int nodeId)
doUpdateprotected static String
formatPropertiesAsString(Properties props)
EventForwarder
getEventForwarder()
getEventForwarderLocationAwareSnmpClient
getLocationAwareSnmpClient()
String
getName()
getNameNodeDao
getNodeDao()
getNodeDaoSnmpAssetAdapterConfig
getSnmpAssetAdapterConfig()
SnmpAgentConfigFactory
getSnmpPeerFactory()
void
handleReloadConfigEvent(IEvent event)
handleReloadConfigEventboolean
isNodeReady(org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter.AdapterOperation op)
Adapters extending this class must implement this method.void
setEventForwarder(EventForwarder eventForwarder)
setEventForwardervoid
setLocationAwareSnmpClient(LocationAwareSnmpClient locationAwareSnmpClient)
void
setNodeDao(NodeDao dao)
setNodeDaovoid
setSnmpAssetAdapterConfig(SnmpAssetAdapterConfig mConfig)
void
setSnmpPeerFactory(SnmpAgentConfigFactory snmpConfigDao)
-
Methods inherited from class org.opennms.netmgt.provision.SimplerQueuedProvisioningAdapter
doDeleteNode, init, processPendingOperationForNode, setDelay, setTemplate, setTimeUnit
-
Methods inherited from class org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter
addNode, deleteNode, getOperationQueue, nodeConfigChanged, updateNode
-
-
-
-
Field Detail
-
NAME
public static final String NAME
ConstantNAME="SnmpAssetProvisioningAdapter"
- See Also:
- Constant Field Values
-
-
Method Detail
-
isNodeReady
public boolean isNodeReady(org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter.AdapterOperation op)
Description copied from class:SimplerQueuedProvisioningAdapter
Adapters extending this class must implement this method. This method is called in the run method of an operation to insure that the adapter is ready for the operation to run for the associated node. The adapter is responsible for setting the schedule, however, something could have altered the state of readiness for the provisioning system in the meantime. If this method returns false, the operation is rescheduled with the and the attempts remaining on the operation are not decremented.- Overrides:
isNodeReady
in classSimplerQueuedProvisioningAdapter
- Parameters:
op
- aSimpleQueuedProvisioningAdapter.AdapterOperation
object.- Returns:
- a boolean representing the state of readiness from the underlying system integrated by the implementing adapter.
-
doAddNode
public void doAddNode(int nodeId) throws ProvisioningAdapterException
doAdd
- Overrides:
doAddNode
in classSimplerQueuedProvisioningAdapter
- Parameters:
nodeId
- a int.retry
- a boolean.- Throws:
ProvisioningAdapterException
- if any.
-
formatPropertiesAsString
protected static String formatPropertiesAsString(Properties props)
-
doUpdateNode
public void doUpdateNode(int nodeId) throws ProvisioningAdapterException
doUpdate
- Overrides:
doUpdateNode
in classSimplerQueuedProvisioningAdapter
- Parameters:
nodeId
- a int.retry
- a boolean.- Throws:
ProvisioningAdapterException
- if any.
-
doNotifyConfigChange
public void doNotifyConfigChange(int nodeId) throws ProvisioningAdapterException
doNodeConfigChanged
- Overrides:
doNotifyConfigChange
in classSimplerQueuedProvisioningAdapter
- Parameters:
nodeId
- a int.retry
- a boolean.- Throws:
ProvisioningAdapterException
- if any.
-
getEventForwarder
public EventForwarder getEventForwarder()
getEventForwarder
- Returns:
- a
EventForwarder
object.
-
setEventForwarder
public void setEventForwarder(EventForwarder eventForwarder)
setEventForwarder
- Parameters:
eventForwarder
- aEventForwarder
object.
-
getSnmpPeerFactory
public SnmpAgentConfigFactory getSnmpPeerFactory()
- Returns:
- the snmpConfigDao
-
setSnmpPeerFactory
public void setSnmpPeerFactory(SnmpAgentConfigFactory snmpConfigDao)
- Parameters:
snmpConfigDao
- the snmpConfigDao to set
-
getSnmpAssetAdapterConfig
public SnmpAssetAdapterConfig getSnmpAssetAdapterConfig()
- Returns:
- the m_config
-
setSnmpAssetAdapterConfig
public void setSnmpAssetAdapterConfig(SnmpAssetAdapterConfig mConfig)
- Parameters:
mConfig
- the m_config to set
-
setLocationAwareSnmpClient
public void setLocationAwareSnmpClient(LocationAwareSnmpClient locationAwareSnmpClient)
-
getLocationAwareSnmpClient
public LocationAwareSnmpClient getLocationAwareSnmpClient()
-
getName
public String getName()
getName
- Specified by:
getName
in interfaceProvisioningAdapter
- Overrides:
getName
in classSimplerQueuedProvisioningAdapter
- Returns:
- a
String
object.
-
-