Package org.jboss.mx.remoting

Examples of org.jboss.mx.remoting.MBeanServerLocator


      if(networkRegistry == null)
      {
         throw new Exception("NetworkRegistryMBean not found - MBeanTracker has a dependency on this MBean");
      }

      foundMBeanServer(new MBeanServerLocator(Identity.get(myserver)));

      if(this.localOnly == false)
      {
         // add ourself as a listener for network changes
         myserver.addNotificationListener(networkRegistry, this, null, null);

         // find any instances we already have registered
         NetworkInstance instances[] = (NetworkInstance[]) myserver.getAttribute(networkRegistry, "Servers");

         if(instances != null)
         {
            for(int c = 0; c < instances.length; c++)
            {
               foundMBeanServer(new MBeanServerLocator(instances[c].getIdentity()));
            }
         }
      }
   }
View Full Code Here


            String type = nn.getType();
            if(type.equals(NetworkNotification.SERVER_ADDED))
            {
               // found a server
               Identity ident = nn.getIdentity();
               MBeanServerLocator l = new MBeanServerLocator(ident);
               foundMBeanServer(l);
            }
            else if(type.equals(NetworkNotification.SERVER_REMOVED))
            {
               // lost a server
               Identity ident = nn.getIdentity();
               MBeanServerLocator l = new MBeanServerLocator(ident);
               lostMBeanServer(l);
            }
            return;
         }
         else if(notification instanceof AttributeChangeNotification)
         {
            AttributeChangeNotification ch = (AttributeChangeNotification) notification;
            if(ch.getAttributeName().equals("State") && hasActions())
            {
               MBeanServerLocator server = (MBeanServerLocator) o;
               Object src = ch.getSource();
               if(src instanceof ObjectName)
               {
                  ObjectName obj = (ObjectName) src;
                  // indicate the state changed
                  fireStateChange(new MBeanLocator(server, obj), ((Integer) ch.getOldValue()).intValue(), ((Integer) ch.getNewValue()).intValue());
                  return;
               }
               else if(src instanceof MBeanLocator)
               {
                  fireNotification((MBeanLocator) src, notification, o);
                  return;
               }
            }
         }
         if(wantNotifications && hasActions())
         {
            // fire notification to listener
            MBeanServerLocator server = (MBeanServerLocator) o;
            if(server != null)
            {
               Object src = notification.getSource();
               if(src instanceof ObjectName)
               {
View Full Code Here

TOP

Related Classes of org.jboss.mx.remoting.MBeanServerLocator

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.