コード例 #1
0
ファイル: NodeScan.java プロジェクト: antonyjohnsont/opennms
 @Override
 public void run(final ContainerTask<?> parent) {
   parent
       .getBuilder()
       .addSequence(
           new RunInBatch() {
             @Override
             public void run(final BatchTask phase) {
               applyNodePolicies(phase);
             }
           },
           new RunInBatch() {
             @Override
             public void run(final BatchTask phase) {
               stampProvisionedInterfaces(phase);
             }
           },
           new RunInBatch() {
             @Override
             public void run(final BatchTask phase) {
               deleteObsoleteResources(phase);
             }
           },
           new RunInBatch() {
             @Override
             public void run(final BatchTask phase) {
               doPersistNodeInfo(phase);
             }
           });
 }
コード例 #2
0
ファイル: NodeScan.java プロジェクト: antonyjohnsont/opennms
 @Override
 public void run(final ContainerTask<?> parent) {
   parent
       .getBuilder()
       .addSequence(
           new NodeInfoScan(
               getNode(),
               getAgentAddress(),
               getForeignSource(),
               this,
               getAgentConfigFactory(),
               getProvisionService(),
               getNodeId()),
           new RunInBatch() {
             @Override
             public void run(final BatchTask phase) {
               detectPhysicalInterfaces(phase);
             }
           },
           new RunInBatch() {
             @Override
             public void run(final BatchTask phase) {
               detectIpAddressTable(phase);
             }
           },
           new RunInBatch() {
             @Override
             public void run(final BatchTask phase) {
               detectIpInterfaceTable(phase);
             }
           },
           new RunInBatch() {
             @Override
             public void run(final BatchTask phase) {
               deleteObsoleteResources();
             }
           },
           new RunInBatch() {
             @Override
             public void run(final BatchTask phase) {
               completed();
             }
           });
 }
コード例 #3
0
ファイル: NodeScan.java プロジェクト: antonyjohnsont/opennms
 private void onAgentFound(
     final ContainerTask<?> currentPhase, final OnmsIpInterface primaryIface) {
   // Make AgentScan a NeedContainer class and have that call run
   currentPhase.add(createAgentScan(primaryIface.getIpAddress(), "SNMP"));
   setAgentFound(true);
 }