1 23 24 package com.sun.enterprise.management.monitor; 25 26 import java.util.Map ; 27 import java.util.HashMap ; 28 import java.util.List ; 29 import java.util.Collections ; 30 31 import com.sun.appserv.management.base.XTypes; 32 import com.sun.appserv.management.monitor.CallFlowMonitor; 33 import com.sun.enterprise.admin.monitor.callflow.Agent; 34 import com.sun.enterprise.Switch; 35 38 public final class CallFlowMonitorImpl extends MonitoringImplBase 39 { 41 private boolean mCallFlowEnabled; 42 43 public CallFlowMonitorImpl() 44 { 45 super( XTypes.CALL_FLOW_MONITOR ); 46 mCallFlowEnabled = false; 47 48 } 49 50 public boolean getEnabled() { 51 return mCallFlowEnabled; 52 } 53 54 public void setEnabled(final boolean enabled) { 55 final Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 56 callflowAgent.setEnable(enabled); 57 mCallFlowEnabled = callflowAgent.isEnabled (); 58 } 59 60 61 public void clearData (){ 62 final Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 63 callflowAgent.clearData(); 64 } 65 66 public boolean deleteRequestIDs (String [] requestId){ 67 final Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 68 return callflowAgent.deleteRequestIds(requestId); 69 } 70 public List <Map <String , String >> queryRequestInformation (){ 71 Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 72 return callflowAgent.getRequestInformation (); 73 } 74 75 public List <Map <String , String >> queryCallStackForRequest(String rid){ 76 Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 77 return callflowAgent.getCallStackForRequest (rid); 78 } 79 80 81 public Map <String , String > queryPieInformation (String rid){ 82 Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 83 return callflowAgent.getPieInformation(rid); 84 } 85 86 public String getCallerIPFilter (){ 87 Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 88 return callflowAgent.getCallerIPFilter(); 89 } 90 91 public void setCallerIPFilter(String filter) { 92 Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 93 callflowAgent.setCallerIPFilter(filter); 94 } 95 public String getCallerPrincipalFilter() { 96 Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 97 return callflowAgent.getCallerPrincipalFilter(); 98 } 99 100 public void setCallerPrincipalFilter(String filter) { 101 Agent callflowAgent = Switch.getSwitch().getCallFlowAgent(); 102 callflowAgent.setCallerPrincipalFilter(filter); 103 } 104 105 public String [] queryRequestTypeKeys (){ 106 String [] requestType = 107 { 108 CallFlowMonitor.REMOTE_ASYNC_MESSAGE, 109 CallFlowMonitor.REMOTE_EJB, 110 CallFlowMonitor.REMOTE_WEB, 111 CallFlowMonitor.REMOTE_WEB_SERVICE, 112 CallFlowMonitor.TIMER_EJB 113 }; 114 115 return requestType; 116 } 117 public String [] queryComponentTypeKeys (){ 118 String [] componentType = 119 { 120 CallFlowMonitor.BEAN_MANAGED_PERSISTENCE, 121 CallFlowMonitor.CONTAINER_MANAGED_PERSISTENCE, 122 CallFlowMonitor.MESSAGE_DRIVEN_BEAN, 123 CallFlowMonitor.SERVLET, 124 CallFlowMonitor.SERVLET_FILTER, 125 CallFlowMonitor.STATEFUL_SESSION_BEAN, 126 CallFlowMonitor.STATELESS_SESSION_BEAN 127 }; 128 return componentType; 129 } 130 public String [] queryContainerTypeOrApplicationTypeKeys (){ 131 String [] containerType = 132 { 133 CallFlowMonitor.WEB_CONTAINER, 134 CallFlowMonitor.EJB_CONTAINER, 135 CallFlowMonitor.ORB, 136 CallFlowMonitor.WEB_APPLICATION, 137 CallFlowMonitor.EJB_APPLICATION, 138 CallFlowMonitor.OTHER 139 }; 140 return containerType; 141 } 142 } 143 144 | Popular Tags |