Class NodeScan
- java.lang.Object
-
- org.opennms.netmgt.provision.service.NodeScan
-
- All Implemented Interfaces:
RunInBatch
,Scan
public class NodeScan extends java.lang.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(java.lang.Integer nodeId, java.lang.String foreignSource, java.lang.String foreignId, OnmsMonitoringLocation location, ProvisionService provisionService, EventForwarder eventForwarder, SnmpAgentConfigFactory agentConfigFactory, TaskCoordinator taskCoordinator, io.opentracing.Span span)
Constructor for NodeScan.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort(java.lang.String reason)
abortNodeScan.AgentScan
createAgentScan(java.net.InetAddress agentAddress, java.lang.String agentType)
createAgentScanTask
createTask()
void
detectAgents(BatchTask currentPhase)
detectAgentsEventForwarder
getEventForwarder()
getEventForwarderjava.lang.String
getForeignId()
getForeignIdjava.lang.String
getForeignSource()
getForeignSourceOnmsMonitoringLocation
getLocation()
OnmsNode
getNode()
getNodejava.lang.Integer
getNodeId()
getNodeIdProvisionService
getProvisionService()
getProvisionServicejava.util.Date
getScanStamp()
getScanStampTaskCoordinator
getTaskCoordinator()
getTaskCoordinatorvoid
handleAgentUndetected(BatchTask currentPhase)
handleAgentUndetectedboolean
isAborted()
isAbortedvoid
loadNode(BatchTask loadNode)
loadNodevoid
run(BatchTask parent)
runvoid
scanCompleted(BatchTask currentPhase)
scanCompletedjava.lang.String
toString()
toString
-
-
-
Constructor Detail
-
NodeScan
public NodeScan(java.lang.Integer nodeId, java.lang.String foreignSource, java.lang.String foreignId, OnmsMonitoringLocation location, ProvisionService provisionService, EventForwarder eventForwarder, SnmpAgentConfigFactory agentConfigFactory, TaskCoordinator taskCoordinator, io.opentracing.Span span)
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.
-
-
Method Detail
-
getForeignSource
public java.lang.String getForeignSource()
getForeignSource
- Returns:
- a
String
object.
-
getForeignId
public java.lang.String getForeignId()
getForeignId
- Returns:
- a
String
object.
-
getNodeId
public java.lang.Integer getNodeId()
getNodeId
- Returns:
- a
Integer
object.
-
getLocation
public OnmsMonitoringLocation getLocation()
-
getScanStamp
public java.util.Date getScanStamp()
getScanStamp
- Returns:
- a
Date
object.
-
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.
-
abort
public void abort(java.lang.String reason)
abort
- Parameters:
reason
- aString
object.
-
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(java.net.InetAddress agentAddress, java.lang.String agentType)
createAgentScan
- Parameters:
agentAddress
- aInetAddress
object.agentType
- aString
object.- Returns:
- a
NodeScan.AgentScan
object.
-
toString
public java.lang.String toString()
toString
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
object.
-
detectAgents
public void detectAgents(BatchTask currentPhase)
detectAgents
- Parameters:
currentPhase
- aBatchTask
object.
-
handleAgentUndetected
public void handleAgentUndetected(BatchTask currentPhase)
handleAgentUndetected
- Parameters:
currentPhase
- aBatchTask
object.
-
-