Package com.sun.jmx.remote.generic

Examples of com.sun.jmx.remote.generic.ProfileServer


                serverVersion + "]");
        }
    } else if (msg instanceof ProfileMessage) {
        ProfileMessage pm = (ProfileMessage) msg;
        String pn = pm.getProfileName();
        ProfileServer p = (ProfileServer) getProfile(mc, pn);
        if (p == null) {
      p = ProfileServerFactory.createProfile(pn, env);
      if (logger.traceOn()) {
          logger.trace("connectionOpen",
           ">>>>> Profile " +
           p.getClass().getName() +
           " <<<<<");
      }
      p.initialize(mc, subject);
      putProfile(mc, p);
        }
        p.consumeMessage(pm);
        pm = p.produceMessage();
        mc.writeMessage(pm);
        if (p.isComplete()) {
      subject = p.activate();
        }
    } else {
        throw new IOException("Unexpected message: " +
            msg.getClass().getName());
    }
View Full Code Here


      ArrayList list = (ArrayList) profilesTable.get(mc);
      if (list == null) {
    return null;
      }
      for (Iterator i = list.iterator(); i.hasNext(); ) {
    ProfileServer p = (ProfileServer) i.next();
    if (p.getName().equals(pn)) {
        return p;
    }
      }
      return null;
  }
View Full Code Here

  ArrayList profiles = getProfiles(mc);
  if (profiles == null)
      return null;
  ArrayList profileNames = new ArrayList(profiles.size());
  for (Iterator i = profiles.iterator(); i.hasNext(); ) {
      ProfileServer p = (ProfileServer) i.next();
      profileNames.add(p.getName());
  }
  return profileNames;
    }
View Full Code Here

    private synchronized void removeProfiles(MessageConnection mc) {
  synchronized (profilesTable) {
      ArrayList list = (ArrayList) profilesTable.get(mc);
      if (list != null) {
    for (Iterator i = list.iterator(); i.hasNext(); ) {
        ProfileServer p = (ProfileServer) i.next();
        try {
      p.terminate();
        } catch (Exception e) {
      if (logger.debugOn()) {
          logger.debug("removeProfiles",
            "Got an exception to terminate a ProfileServer: "+p.getName(), e);
      }
        }
    }
    list.clear();
      }
View Full Code Here

TOP

Related Classes of com.sun.jmx.remote.generic.ProfileServer

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.