test_class.declarator: monitorManager
test_class.modifier: private
test_class.original_string: private MockMonitorManager monitorManager;
test_class.type: MockMonitorManager
test_class.var_name: monitorManager
test_class.file: vsm/src/test/java/com/abiquo/vsm/monitor/MonitorManagerTest.java
test_class.identifier: MonitorManagerTest
test_class.superclass: extends TestBase
test_case.body: @Test
      public void test_createMonitor() throws Exception
      {
          AbstractMonitor monitor1 = monitorManager.createMonitor(SingleMachineMonitor.TYPE);
          AbstractMonitor monitor2 = monitorManager.createMonitor(MulipleMachineMonitor.TYPE);
          AbstractMonitor monitor3 = monitorManager.createMonitor(InfiniteMachineMonitor.TYPE);
  
          assertNotNull(monitor1);
          assertNotNull(monitor2);
          assertNotNull(monitor3);
  
          assertEquals(monitor1.getClass(), SingleMachineMonitor.class);
          assertEquals(monitor2.getClass(), MulipleMachineMonitor.class);
          assertEquals(monitor3.getClass(), InfiniteMachineMonitor.class);
      }
test_case.class_method_signature: MonitorManagerTest.test_createMonitor()
test_case.full_signature: @Test public void test_createMonitor()
test_case.identifier: test_createMonitor
test_case.invocations: createMonitor createMonitor createMonitor assertNotNull assertNotNull assertNotNull assertEquals getClass assertEquals getClass assertEquals getClass
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_createMonitor()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(MonitorManager.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(MonitorManager.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: monitorClasses
focal_class.modifier: protected
focal_class.original_string: protected Map<Type, Class< ? extends AbstractMonitor>> monitorClasses;
focal_class.type: Map<Type, Class< ? extends AbstractMonitor>>
focal_class.var_name: monitorClasses
focal_class.declarator: runningMonitors
focal_class.modifier: private
focal_class.original_string: private Map<Type, List<AbstractMonitor>> runningMonitors;
focal_class.type: Map<Type, List<AbstractMonitor>>
focal_class.var_name: runningMonitors
focal_class.declarator: dao
focal_class.modifier: protected
focal_class.original_string: protected RedisDao dao;
focal_class.type: RedisDao
focal_class.var_name: dao
focal_class.file: vsm/src/main/java/com/abiquo/vsm/monitor/MonitorManager.java
focal_class.identifier: MonitorManager
focal_class.class_method_signature: MonitorManager.MonitorManager()
focal_class.full_signature: public  MonitorManager()
focal_class.identifier: MonitorManager
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  MonitorManager()
focal_class.class_method_signature: MonitorManager.monitor(final String physicalMachineAddress, final Type type,
          final String username, final String password)
focal_class.full_signature: public PhysicalMachine monitor(final String physicalMachineAddress, final Type type,
          final String username, final String password)
focal_class.identifier: monitor
focal_class.modifiers: public
focal_class.parameters: (final String physicalMachineAddress, final Type type,
          final String username, final String password)
focal_class.return: PhysicalMachine
focal_class.signature: PhysicalMachine monitor(final String physicalMachineAddress, final Type type,
          final String username, final String password)
focal_class.class_method_signature: MonitorManager.createAndStartMonitor(final String physicalMachineAddress, final Type type,
          final String username, final String password)
focal_class.full_signature: public void createAndStartMonitor(final String physicalMachineAddress, final Type type,
          final String username, final String password)
focal_class.identifier: createAndStartMonitor
focal_class.modifiers: public
focal_class.parameters: (final String physicalMachineAddress, final Type type,
          final String username, final String password)
focal_class.return: void
focal_class.signature: void createAndStartMonitor(final String physicalMachineAddress, final Type type,
          final String username, final String password)
focal_class.class_method_signature: MonitorManager.shutdown(final String physicalMachineAddress, final Type type)
focal_class.full_signature: public void shutdown(final String physicalMachineAddress, final Type type)
focal_class.identifier: shutdown
focal_class.modifiers: public
focal_class.parameters: (final String physicalMachineAddress, final Type type)
focal_class.return: void
focal_class.signature: void shutdown(final String physicalMachineAddress, final Type type)
focal_class.class_method_signature: MonitorManager.stopAllMonitors()
focal_class.full_signature: public void stopAllMonitors()
focal_class.identifier: stopAllMonitors
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stopAllMonitors()
focal_class.class_method_signature: MonitorManager.subscribe(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.full_signature: public VirtualMachine subscribe(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.identifier: subscribe
focal_class.modifiers: public
focal_class.parameters: (final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.return: VirtualMachine
focal_class.signature: VirtualMachine subscribe(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.class_method_signature: MonitorManager.unsubscribe(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.full_signature: public void unsubscribe(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.identifier: unsubscribe
focal_class.modifiers: public
focal_class.parameters: (final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.return: void
focal_class.signature: void unsubscribe(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.class_method_signature: MonitorManager.getState(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.full_signature: public void getState(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.identifier: getState
focal_class.modifiers: public
focal_class.parameters: (final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.return: void
focal_class.signature: void getState(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.class_method_signature: MonitorManager.invalidateLastKnownState(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.full_signature: public void invalidateLastKnownState(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.identifier: invalidateLastKnownState
focal_class.modifiers: public
focal_class.parameters: (final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.return: void
focal_class.signature: void invalidateLastKnownState(final String physicalMachineAddress, final Type type,
          final String virtualMachineName)
focal_class.class_method_signature: MonitorManager.findAvailableMonitor(final Type type)
focal_class.full_signature: protected AbstractMonitor findAvailableMonitor(final Type type)
focal_class.identifier: findAvailableMonitor
focal_class.modifiers: protected
focal_class.parameters: (final Type type)
focal_class.return: AbstractMonitor
focal_class.signature: AbstractMonitor findAvailableMonitor(final Type type)
focal_class.class_method_signature: MonitorManager.findRunningMonitor(final String physicalMachineAddress,
          final Type type)
focal_class.full_signature: protected AbstractMonitor findRunningMonitor(final String physicalMachineAddress,
          final Type type)
focal_class.identifier: findRunningMonitor
focal_class.modifiers: protected
focal_class.parameters: (final String physicalMachineAddress,
          final Type type)
focal_class.return: AbstractMonitor
focal_class.signature: AbstractMonitor findRunningMonitor(final String physicalMachineAddress,
          final Type type)
focal_class.class_method_signature: MonitorManager.createMonitor(final Type type)
focal_class.full_signature: protected AbstractMonitor createMonitor(final Type type)
focal_class.identifier: createMonitor
focal_class.modifiers: protected
focal_class.parameters: (final Type type)
focal_class.return: AbstractMonitor
focal_class.signature: AbstractMonitor createMonitor(final Type type)
focal_class.class_method_signature: MonitorManager.registerMonitor(final Class< ? extends AbstractMonitor> monitorClass)
focal_class.full_signature: protected void registerMonitor(final Class< ? extends AbstractMonitor> monitorClass)
focal_class.identifier: registerMonitor
focal_class.modifiers: protected
focal_class.parameters: (final Class< ? extends AbstractMonitor> monitorClass)
focal_class.return: void
focal_class.signature: void registerMonitor(final Class< ? extends AbstractMonitor> monitorClass)
focal_class.class_method_signature: MonitorManager.addRunningMonitor(final AbstractMonitor monitor, final Type type)
focal_class.full_signature: private void addRunningMonitor(final AbstractMonitor monitor, final Type type)
focal_class.identifier: addRunningMonitor
focal_class.modifiers: private
focal_class.parameters: (final AbstractMonitor monitor, final Type type)
focal_class.return: void
focal_class.signature: void addRunningMonitor(final AbstractMonitor monitor, final Type type)
focal_class.class_method_signature: MonitorManager.removeRunningMonitor(final AbstractMonitor monitor, final Type type)
focal_class.full_signature: private void removeRunningMonitor(final AbstractMonitor monitor, final Type type)
focal_class.identifier: removeRunningMonitor
focal_class.modifiers: private
focal_class.parameters: (final AbstractMonitor monitor, final Type type)
focal_class.return: void
focal_class.signature: void removeRunningMonitor(final AbstractMonitor monitor, final Type type)
focal_class.class_method_signature: MonitorManager.getPhysicalMachine(final String physicalMachineAddress)
focal_class.full_signature: private PhysicalMachine getPhysicalMachine(final String physicalMachineAddress)
focal_class.identifier: getPhysicalMachine
focal_class.modifiers: private
focal_class.parameters: (final String physicalMachineAddress)
focal_class.return: PhysicalMachine
focal_class.signature: PhysicalMachine getPhysicalMachine(final String physicalMachineAddress)
focal_method.body: protected AbstractMonitor createMonitor(final Type type) throws MonitorException
      {
          try
          {
              Class< ? extends AbstractMonitor> monitorClass = monitorClasses.get(type);
              if (monitorClass != null)
              {
                  LOGGER.info("Creating a new monitor of type {}", type.name());
  
                  return monitorClass.newInstance();
              }
  
              throw new MonitorException("There is no monitor defined of type: " + type.name());
          }
          catch (Exception ex)
          {
              throw new MonitorException("There is no monitor defined of type: " + type.name(), ex);
          }
  
      }
focal_method.class_method_signature: MonitorManager.createMonitor(final Type type)
focal_method.full_signature: protected AbstractMonitor createMonitor(final Type type)
focal_method.identifier: createMonitor
focal_method.invocations: get info name newInstance name name
focal_method.modifiers: protected
focal_method.parameters: (final Type type)
focal_method.return: AbstractMonitor
focal_method.signature: AbstractMonitor createMonitor(final Type type)