Package com.sun.appserv.management.monitor

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


            assertTrue (true);                               
    }
     

    public void testClearData () {
            final CallFlowMonitor cfm = getCallFlowMonitor();           
            cfm.clearData();
    }
View Full Code Here


            final CallFlowMonitor cfm = getCallFlowMonitor();           
            cfm.clearData();
    }

    public void testQueryRequestTypeKeys (){
        final CallFlowMonitor cfm = getCallFlowMonitor();
        final String[] rT = cfm.queryRequestTypeKeys();
        if (rT.length == 5)
            assertTrue(true);
        else
            assertTrue (false);
    }
View Full Code Here

            assertTrue(true);
        else
            assertTrue (false);
    }
    public void testQueryComponentTypeKeys (){
        final CallFlowMonitor cfm = getCallFlowMonitor();
        final String[] rT = cfm.queryComponentTypeKeys();
        assert rT.length == 7;
    }
View Full Code Here

        final CallFlowMonitor cfm = getCallFlowMonitor();
        final String[] rT = cfm.queryComponentTypeKeys();
        assert rT.length == 7;
    }
    public void testQueryContainerTypeOrApplicationTypeKeys (){
        final CallFlowMonitor cfm = getCallFlowMonitor();
        final String[] rT = cfm.queryContainerTypeOrApplicationTypeKeys();
        assert rT.length == 6;
    }
View Full Code Here

            @HandlerOutput(name="enabled", type=Boolean.class),
            @HandlerOutput(name="hasMonitor", type=Boolean.class) }
    )
        public static void getCallFlowConfigInfo(HandlerContext handlerCtx) {
      String instanceName = (String) handlerCtx.getInputValue("instanceName");
      CallFlowMonitor cm = getCallFlowMonitor((String) handlerCtx.getInputValue("instanceName"));
            if(cm == null){
                handlerCtx.setOutputValue("hasMonitor", Boolean.FALSE);
                handlerCtx.setOutputValue("host", "");
                handlerCtx.setOutputValue("user", "");
                handlerCtx.setOutputValue("enabled", Boolean.FALSE);
            }else{
                handlerCtx.setOutputValue("hasMonitor", Boolean.TRUE);
                handlerCtx.setOutputValue("host", cm.getCallerIPFilter());
                handlerCtx.setOutputValue("user", cm.getCallerPrincipalFilter());
                handlerCtx.setOutputValue("enabled", cm.getEnabled());
            }
    }
View Full Code Here

            @HandlerInput(name="enabled", type=Boolean.class)}
        )
    public static void saveCallFlowConfigInfo(HandlerContext handlerCtx) {
        String instanceName = (String) handlerCtx.getInputValue("instanceName");
        try{
      CallFlowMonitor cm = getCallFlowMonitor((String) handlerCtx.getInputValue("instanceName"));
           
            cm.setCallerIPFilter((String) handlerCtx.getInputValue("host"));
            cm.setCallerPrincipalFilter ((String) handlerCtx.getInputValue("user"));
            cm.setEnabled((Boolean) handlerCtx.getInputValue("enabled"));
        }catch(Exception ex){
            GuiUtil.handleException(handlerCtx,ex);
        }
    }
View Full Code Here

  input={
      @HandlerInput(name="instanceName", type=String.class)}
    )
    public static void clearCallFlowData(HandlerContext handlerCtx) {
        String instanceName = (String) handlerCtx.getInputValue("instanceName");
        CallFlowMonitor cm = getCallFlowMonitor((String) handlerCtx.getInputValue("instanceName"));
        if (cm == null)
            return;
        try{
            cm.clearData() ;
        }catch (Exception ex){
            GuiUtil.prepareException(handlerCtx, ex);
        }
    }
View Full Code Here

        Boolean demo = (Boolean) handlerCtx.getInputValue("demo");
       
        List<Map> result = new ArrayList();
       
        try {
            CallFlowMonitor cfm = getCallFlowMonitor(instanceName);
           
            if (cfm == null){
                handlerCtx.setOutputValue("result", result);
                return;
            }
           
            List<Map<String,String>> listOfMap = cfm.queryRequestInformation ();
            if (demo != null && demo){
                listOfMap = queryDemoRequestInformation();
            }else{
                if (listOfMap == null || listOfMap.isEmpty()){
                        handlerCtx.setOutputValue("result", result);
View Full Code Here

            int i=0;
            for(Map oneRow : selectedRows){
                String requestId = (String) oneRow.get("requestId");
                requests[i++] = requestId;
            }
            CallFlowMonitor cfm = getCallFlowMonitor(instanceName);
            cfm.deleteRequestIDs(requests);
        }catch(Exception ex){
            GuiUtil.prepareException(handlerCtx, ex);
        }
    }
View Full Code Here

    if (demo == null) demo = false;
   
    Map infoMap = new HashMap();
    List stackList = new ArrayList();
   
    CallFlowMonitor cfm = getCallFlowMonitor(instanceName);
    if (!demo && (cfm == null || requestId==null)){
        handlerCtx.setOutputValue("detailInfo", infoMap);
        handlerCtx.setOutputValue("callFlowStackMap", stackList);
        handlerCtx.setOutputValue("hasCallFlowChart", false);
         return;
    }
    try {
        List listOfMap = null;
        /*
        System.out.println("List returned by queryCallStackForRequest()");
        System.out.println(listOfMap);
        for(int i=0; i<listOfMap.size(); i++){
            System.out.println(" Map # " + i);
            System.out.println(listOfMap.get(i));
        }
         */
        if (demo != null && demo){
            listOfMap = getDemoCallFlowStack(requestId);
        }else{
            listOfMap = cfm.queryCallStackForRequest (requestId);
        }
        infoMap.put("user", handlerCtx.getInputValue("user"));
        infoMap.put("responseTime", handlerCtx.getInputValue("responseTime"));
        Map oneRow = getRow( CallFlowMonitor.CALL_STACK_REQUEST_START, listOfMap);
        if(oneRow == null) return//shouldn't happen
        String ms =(String) oneRow.get(CallFlowMonitor.TIME_STAMP_MILLIS_KEY);
        DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM, GuiUtil.getLocale());
        Date date = new Date (Long.parseLong(ms));
        String formattedTime = dateFormat.format(date);
        infoMap.put("timeStamp", formattedTime);

        infoMap.put("startContainer", oneRow.get(CallFlowMonitor.REQUEST_TYPE_KEY));

        //extract info from METHOD_START
        oneRow = getRow( CallFlowMonitor.CALL_STACK_METHOD_START, listOfMap);
        if (oneRow == null) return//shouldn't happen
        infoMap.put("application", oneRow.get(CallFlowMonitor.APPLICATION_NAME_KEY));
        //handlerCtx.setOutputValue("user", oneRow.get(CallFlowMonitor.USER_KEY));

        oneRow = getLastRow( CallFlowMonitor.CALL_STACK_METHOD_END, listOfMap);
        if(oneRow == null) return;
        String except = (String) oneRow.get(CallFlowMonitor.EXCEPTION_KEY);
        infoMap.put("exception", except);
        if (GuiUtil.isEmpty(except)){
            infoMap.put("response", GuiUtil.getMessage("common.Success") );
            infoMap.put("hasException", false );
        }else{
            infoMap.put("response", GuiUtil.getMessage("common.Failed"));
            infoMap.put("hasException", true );
        }
       
        Map timeSpendMap = null;
        if (demo != null && demo ){
            timeSpendMap = getDemoTimeSpendMap(requestId);
        }else{
            timeSpendMap = (Map<String,String>) cfm.queryPieInformation(requestId);
        }
        //By default, charting info will be generated.
        Boolean doCharting = (Boolean )handlerCtx.getInputValue("doCharting");
        boolean hasChartData = getTimeSpendInfo(infoMap, timeSpendMap, doCharting);
       
View Full Code Here

TOP

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

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.