コード例 #1
0
 /**
  * probe NetScaler Target Check if the LoadBalancer Feature is enabled before starting the probe
  * Call syncProbe() to probe
  */
 @Override
 public void probe() {
   if (FeaturesManager.vmtMANAGER.isLoadBalancerEnabled()) {
     synchronized (getTarget().get(0)) {
       try {
         syncProbe();
       } catch (Exception e) {
         logger.error(logPrefix + "An exception occured during NetScaler discovery: ", e);
         // create notification - Discovery, Major
         NotificationsManagerImpl.vmtMANAGER.createException(
             target, e, NotificationCategory.DISCOVERY, VMTSeverity.MAJOR);
       } finally {
         // close NetScaler session
         NetScalerUtil.closeSession(session, target, logPrefix);
       }
     }
   }
 } // end probe()
コード例 #2
0
 @Override
 /**
  * probe NetScaler Target Check if the LoadBalancer Feature is enabled before starting the probe
  * Call syncProbe() to probe
  *
  * @param List of objects
  */
 public void probe(EList<Object> objects) {
   if (FeaturesManager.vmtMANAGER.isLoadBalancerEnabled()) {
     synchronized (getTarget().get(0)) {
       try {
         syncProbe(objects);
       } catch (Exception e) {
         logger.error(logPrefix + "An exception occured during discovery: ", e);
         NotificationsManagerImpl.vmtMANAGER.createException(
             target, e, NotificationCategory.DISCOVERY, VMTSeverity.MAJOR);
       } finally {
         // close NetScaler session
         NetScalerUtil.closeSession(session, target, logPrefix);
       }
     }
   }
 }