Package org.jboss.kernel.spi.registry

Examples of org.jboss.kernel.spi.registry.KernelRegistryEntry


         oname = ObjectName.class.cast(name);
         key = oname.getCanonicalName();
      }
      else
         key = name.toString();
      KernelRegistryEntry entry = mbeans.get(key);
      // If
      if(entry == null && oname != null)
      {
         System.out.println("Searching for MBean: "+oname);
         try
View Full Code Here


   }

   public Object getAttribute(ObjectName objectName, String attribute) throws Exception
   {
      String name = objectName.getCanonicalName();
      KernelRegistryEntry entry = kernel.getRegistry().getEntry(name);
      if (entry != null)
      {
         Object target = entry.getTarget();
         Field field = target.getClass().getField(attribute);
         return field.get(target);
      }
      return null;
   }
View Full Code Here

   }

   public Object invoke(ObjectName objectName, String operationName, Object[] params, String[] signature) throws Exception
   {
      String name = objectName.getCanonicalName();
      KernelRegistryEntry entry = kernel.getRegistry().getEntry(name);
      if (entry != null)
      {
         Object target = entry.getTarget();
         Class[] types = new Class[signature.length];
         for (int i = 0; i < signature.length; ++i)
         {
            types[i] = Thread.currentThread().getContextClassLoader().loadClass(signature[i]);
         }
View Full Code Here

    * @param name the name
    * @param object the object
    */
   protected void register(Kernel kernel, Object name, Object object) throws Throwable
   {
      KernelRegistryEntry entry = createKernelRegistryEntry(kernel, object);
      KernelRegistry registry = kernel.getRegistry();
      registry.registerEntry(name, entry);
   }
View Full Code Here

      assertNotNull(object);
     
      assertEquals(object.getClass().getName(), className);
     
      KernelRegistryEntry entry = registry.getEntry(name);
      Object registered = entry.getTarget();
      assertEquals(object, registered);
   }
View Full Code Here

   {
      Kernel kernel = bootstrap();
      KernelRegistry registry = kernel.getRegistry();
      KernelEventManager eventManager = kernel.getEventManager();
      TestEmitter emitter = new TestEmitter();
      KernelRegistryEntry entry = makeEntry(emitter);
      registry.registerEntry("Emitter", entry);
      TestListener listener = new TestListener();
      eventManager.registerListener("Emitter", listener, null, null);
      emitter.testFire("testtype", null);
      ArrayList expected = new ArrayList();
View Full Code Here

   {
      Kernel kernel = bootstrap();
      KernelRegistry registry = kernel.getRegistry();
      KernelEventManager eventManager = kernel.getEventManager();
      TestEmitter emitter = new TestEmitter();
      KernelRegistryEntry entry = makeEntry(emitter);
      registry.registerEntry("Emitter", entry);
      TestListener listener = new TestListener();
      eventManager.registerListener("Emitter", listener, null, null);
      emitter.testFire("testtype", null);
      emitter.testFire("testtype", null);
View Full Code Here

   {
      Kernel kernel = bootstrap();
      KernelRegistry registry = kernel.getRegistry();
      KernelEventManager eventManager = kernel.getEventManager();
      TestEmitter emitter = new TestEmitter();
      KernelRegistryEntry entry = makeEntry(emitter);
      registry.registerEntry("Emitter", entry);
      TestListener listener = new TestListener();
      TestFilter filter = new TestFilter();
      eventManager.registerListener("Emitter", listener, filter, null);
      emitter.testFire("testtype", null);
View Full Code Here

   {
      Kernel kernel = bootstrap();
      KernelRegistry registry = kernel.getRegistry();
      KernelEventManager eventManager = kernel.getEventManager();
      TestEmitter emitter = new TestEmitter();
      KernelRegistryEntry entry = makeEntry(emitter);
      registry.registerEntry("Emitter", entry);
      TestListener listener = new TestListener();
      TestFilter filter = new TestFilter();
      Object handback = new Object();
      eventManager.registerListener("Emitter", listener, filter, handback);
View Full Code Here

   {
      Kernel kernel = bootstrap();
      KernelRegistry registry = kernel.getRegistry();
      KernelEventManager eventManager = kernel.getEventManager();
      Object notAnEmitter = new Object();
      KernelRegistryEntry entry = makeEntry(notAnEmitter);
      registry.registerEntry("notanemitter", entry);
      TestListener listener = new TestListener();
      try
      {
         eventManager.registerListener("notanemitter", listener, null, null);
View Full Code Here

TOP

Related Classes of org.jboss.kernel.spi.registry.KernelRegistryEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.