Package com.sun.appserv.management.monitor

Examples of com.sun.appserv.management.monitor.ServerRootMonitor


        return dateFormat.format(useThis);
    }
   
   
    private static Logging getLoggingBean(String instanceName){
        ServerRootMonitor serverRootMonitor = AMXUtil.getServerRootMonitor(instanceName);
        if (serverRootMonitor == null)
            return null;
        return serverRootMonitor.getLogging();
    }
View Full Code Here


    {
        DomainRoot domainRoot =
                ProxyFactory.getInstance(mbsc).getDomainRoot();
        Map<String,ServerRootMonitor> serverRootMonitorMap =
                domainRoot.getMonitoringRoot().getServerRootMonitorMap();
        ServerRootMonitor serverRootMonitor = serverRootMonitorMap.get(instanceName);
        //IF the instance is not running or when no monitoring on, just return;
        if (serverRootMonitor == null)
            return null;
        CallFlowMonitor cfm = serverRootMonitor.getCallFlowMonitor();
        return cfm;
    }
View Full Code Here

                //use http connector
            MBeanServerConnection mbsc = getMBeanServerConnection(host, port, user, password);
            final DomainRoot domainRoot = ProxyFactory.getInstance(mbsc).getDomainRoot();
       
            verifyTargetInstance(domainRoot, instanceName);
            final ServerRootMonitor srm = getServerRootMonitor(domainRoot, instanceName);
            MonitorTask monitorTask = getTask(monitorType, srm, filterName, timer, verbose, fileName);
            timer.scheduleAtFixedRate(monitorTask, 0, interval);

            boolean done = false;
                // detect if a q or Q key is entered
View Full Code Here

    private ServerRootMonitor getServerRootMonitor(final DomainRoot domainRoot, final String instanceName)
        throws CommandException
    {
        Map<String,ServerRootMonitor> serverRootMonitorMap =
                domainRoot.getMonitoringRoot().getServerRootMonitorMap();
        ServerRootMonitor serverRootMonitor = serverRootMonitorMap.get(instanceName);
        if (serverRootMonitor == null) {
            throw new CommandException(getLocalizedString("UnableToMonitor", new Object[] {instanceName}));
        }
        return serverRootMonitor;
    }
View Full Code Here

    private CallFlowMonitor getCallFlowMonitor() {
        Map<String,ServerRootMonitor> serverRootMonitorMap =
                getDomainRoot().getMonitoringRoot().getServerRootMonitorMap();
        // Get the server name from some MBean. Using the default value for now
        ServerRootMonitor serverRootMonitor = serverRootMonitorMap.get("server");
        return serverRootMonitor.getCallFlowMonitor();
    }
View Full Code Here

     
    final String  name  = getObjectName().getKeyProperty( XTypes.SERVER_ROOT_MONITOR );
    if ( name != null )
    {
        final MonitoringRoot  root  = getDomainRoot().getMonitoringRoot();
        final ServerRootMonitor  mon  =
            (ServerRootMonitor)root.getServerRootMonitorMap().get( name );
   
        objectName  = Util.getObjectName( mon );
    }
   
View Full Code Here

    public static void rotateLogFile(HandlerContext handlerCtx) {
        String instanceName = (String) handlerCtx.getInputValue("instanceName");
        if(GuiUtil.isEmpty(instanceName)){
            return;   //do nothing.
        }
        ServerRootMonitor monitor = AMXUtil.getMonitoringRoot().getServerRootMonitorMap().get(instanceName);
        if (monitor == null){
            //most likely, server is not running, shouldn't get here
            //TODO: log an internal error msg ?
        }else{
            monitor.getLogging().rotateLogFile(LogFileAccess.SERVER_KEY);
        }
    }
View Full Code Here

         return GuiUtil.getMessage(key, new Object[]{percent, convertNanoToMs(ms)});
     }
    
   
    public static CallFlowMonitor getCallFlowMonitor(String instanceName){
        ServerRootMonitor serverRootMonitor = AMXUtil.getServerRootMonitor(instanceName);
        if (serverRootMonitor == null)
            return null;
        CallFlowMonitor cfm = serverRootMonitor.getCallFlowMonitor();
        return cfm;
   }
View Full Code Here

      return dateFormat.format(date);
  }
    }   
   
     public static boolean isServerRunning(String instanceName){
        ServerRootMonitor serverRootMonitor = AMXUtil.getServerRootMonitor(instanceName);
        if (serverRootMonitor == null)
            return false;
        return true;
    }
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.monitor.ServerRootMonitor

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.