Class NodeScan
- java.lang.Object
-
- org.opennms.netmgt.provision.service.NodeScan
-
- All Implemented Interfaces:
RunInBatch
,Scan
public class NodeScan extends Object implements Scan
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
NodeScan.AgentScan
AgentScan TODO: Make this staticclass
NodeScan.BaseAgentScan
TODO: Make this staticclass
NodeScan.NoAgentScan
TODO: Make this static
-
Constructor Summary
Constructors Constructor Description NodeScan(Integer nodeId, String foreignSource, String foreignId, OnmsMonitoringLocation location, ProvisionService provisionService, EventForwarder eventForwarder, SnmpAgentConfigFactory agentConfigFactory, TaskCoordinator taskCoordinator, io.opentracing.Span span, ProvisionMonitor monitor)
Constructor for NodeScan.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort(String reason)
abortNodeScan.AgentScan
createAgentScan(InetAddress agentAddress, String agentType)
createAgentScanTask
createTask()
void
detectAgents(BatchTask currentPhase)
detectAgentsEventForwarder
getEventForwarder()
getEventForwarderString
getForeignId()
getForeignIdString
getForeignSource()
getForeignSourceOnmsMonitoringLocation
getLocation()
OnmsNode
getNode()
getNodeInteger
getNodeId()
getNodeIdProvisionService
getProvisionService()
getProvisionServiceDate
getScanStamp()
getScanStampTaskCoordinator
getTaskCoordinator()
getTaskCoordinatorvoid
handleAgentUndetected(BatchTask currentPhase)
handleAgentUndetectedboolean
isAborted()
isAbortedvoid
loadNode(BatchTask loadNode)
loadNodevoid
run(BatchTask parent)
runvoid
scanCompleted(BatchTask currentPhase)
scanCompletedString
toString()
toString
-
-
-
Constructor Detail
-
NodeScan
public NodeScan(Integer nodeId, String foreignSource, String foreignId, OnmsMonitoringLocation location, ProvisionService provisionService, EventForwarder eventForwarder, SnmpAgentConfigFactory agentConfigFactory, TaskCoordinator taskCoordinator, io.opentracing.Span span, ProvisionMonitor monitor)
Constructor for NodeScan.
- Parameters:
nodeId
- aInteger
object.foreignSource
- aString
object.foreignId
- aString
object.location
- aOnmsMonitoringLocation
object.provisionService
- aProvisionService
object.eventForwarder
- aEventForwarder
object.agentConfigFactory
- aSnmpAgentConfigFactory
object.taskCoordinator
- aTaskCoordinator
object.monitor
- aProvisionMonitor
object. (optional)
-
-
Method Detail
-
getLocation
public OnmsMonitoringLocation getLocation()
-
getProvisionService
public ProvisionService getProvisionService()
getProvisionService
- Returns:
- the provisionService
-
getEventForwarder
public EventForwarder getEventForwarder()
getEventForwarder
- Returns:
- the eventForwarder
-
getTaskCoordinator
public TaskCoordinator getTaskCoordinator()
getTaskCoordinator
- Returns:
- a
TaskCoordinator
object.
-
isAborted
public boolean isAborted()
isAborted
- Returns:
- a boolean.
-
createTask
public Task createTask()
- Specified by:
createTask
in interfaceScan
-
run
public void run(BatchTask parent)
run
- Specified by:
run
in interfaceRunInBatch
- Parameters:
parent
- aBatchTask
object.
-
loadNode
public void loadNode(BatchTask loadNode)
loadNode
- Parameters:
loadNode
- aBatchTask
object.
-
createAgentScan
public NodeScan.AgentScan createAgentScan(InetAddress agentAddress, String agentType)
createAgentScan
- Parameters:
agentAddress
- aInetAddress
object.agentType
- aString
object.- Returns:
- a
NodeScan.AgentScan
object.
-
toString
public String toString()
toString
-
detectAgents
public void detectAgents(BatchTask currentPhase)
detectAgents
- Parameters:
currentPhase
- aBatchTask
object.
-
handleAgentUndetected
public void handleAgentUndetected(BatchTask currentPhase)
handleAgentUndetected
- Parameters:
currentPhase
- aBatchTask
object.
-
-