Package org.opennms.netmgt.provision
Class DnsProvisioningAdapter
- java.lang.Object
-
- org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter
-
- org.opennms.netmgt.provision.DnsProvisioningAdapter
-
- All Implemented Interfaces:
ProvisioningAdapter,org.springframework.beans.factory.InitializingBean
public class DnsProvisioningAdapter extends SimpleQueuedProvisioningAdapter implements org.springframework.beans.factory.InitializingBean
A Dynamic DNS provisioning adapter for integration with OpenNMS Provisioning daemon API.- Version:
- $Id: $
- Author:
- David Hustace
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter
SimpleQueuedProvisioningAdapter.AdapterOperationQueue, SimpleQueuedProvisioningAdapter.AdapterOperationQueueListener
-
-
Constructor Summary
Constructors Constructor Description DnsProvisioningAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()afterPropertiesSetEventForwardergetEventForwarder()getEventForwarderStringgetName()getNameNodeDaogetNodeDao()getNodeDaobooleanisNodeReady(org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter.AdapterOperation op)Adapters extending this class must implement this method.voidprocessPendingOperationForNode(org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter.AdapterOperation op)The class implements the API and therefore the concrete class implements this method to handle dequeued operations.voidsetEventForwarder(EventForwarder eventForwarder)setEventForwardervoidsetNodeDao(NodeDao dao)setNodeDaovoidsetTemplate(org.springframework.transaction.support.TransactionTemplate template)setTemplate-
Methods inherited from class org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter
addNode, deleteNode, getOperationQueue, init, nodeConfigChanged, updateNode
-
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet() throws ExceptionafterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception- if any.
-
setEventForwarder
public void setEventForwarder(EventForwarder eventForwarder)
setEventForwarder
- Parameters:
eventForwarder- aEventForwarderobject.
-
getEventForwarder
public EventForwarder getEventForwarder()
getEventForwarder
- Returns:
- a
EventForwarderobject.
-
getName
public String getName()
getName
- Specified by:
getNamein interfaceProvisioningAdapter- Specified by:
getNamein classSimpleQueuedProvisioningAdapter- Returns:
- a
Stringobject.
-
isNodeReady
public boolean isNodeReady(org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter.AdapterOperation op)
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.- Specified by:
isNodeReadyin classSimpleQueuedProvisioningAdapter- Parameters:
op- aSimpleQueuedProvisioningAdapter.AdapterOperationobject.- Returns:
- a boolean representing the state of readiness from the underlying system integrated by the implementing adapter.
-
processPendingOperationForNode
public void processPendingOperationForNode(org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter.AdapterOperation op) throws ProvisioningAdapterExceptionThe class implements the API and therefore the concrete class implements this method to handle dequeued operations. The concrete implementation should check the operation type to derive the its behavior.- Specified by:
processPendingOperationForNodein classSimpleQueuedProvisioningAdapter- Parameters:
op- aSimpleQueuedProvisioningAdapter.AdapterOperationobject.- Throws:
ProvisioningAdapterException- if any.
-
setTemplate
public void setTemplate(org.springframework.transaction.support.TransactionTemplate template)
setTemplate
- Parameters:
template- aTransactionTemplateobject.
-
-