use of org.eclipse.scout.rt.server.admin.inspector.CallInspector in project scout.rt by eclipse.
the class CallsView method renderCallTable.
private void renderCallTable(HtmlComponent p, SessionInspector session) {
TreeMap<CompositeObject, CallInspector> timeToCalls = new TreeMap<CompositeObject, CallInspector>();
CallInspector[] callInspectors = session.getCallInspectors();
for (int i = 0; i < callInspectors.length; i++) {
long startTime = callInspectors[i].getInfo().getStartTime();
timeToCalls.put(new CompositeObject(startTime, i), callInspectors[i]);
}
CallInspector[] sorted = timeToCalls.values().toArray(new CallInspector[timeToCalls.size()]);
p.bold("Calls");
p.startTable(1, 0, 3);
p.startTableRow();
p.tableHeaderCell("#");
p.tableHeaderCell("Operation");
p.tableHeaderCell("Started");
p.tableHeaderCell("Duration");
p.tableHeaderCell("Status");
p.endTableRow();
CallInspector validSelection = null;
for (int i = sorted.length - 1; i >= 0; i--) {
if (sorted[i] == m_selectedCall) {
validSelection = m_selectedCall;
}
renderCallRow(p, i + 1, sorted[i]);
}
m_selectedCall = validSelection;
p.endTable();
}
use of org.eclipse.scout.rt.server.admin.inspector.CallInspector in project scout.rt by eclipse.
the class ServiceOperationInvoker method invokeInternal.
protected ServiceTunnelResponse invokeInternal(ServiceTunnelRequest serviceReq) throws ClassNotFoundException {
IServerSession serverSession = ServerSessionProvider.currentSession();
if (LOG.isDebugEnabled()) {
String userId = serverSession != null ? serverSession.getUserId() : "";
LOG.debug("started {}.{} by {} at {}", serviceReq.getServiceInterfaceClassName(), serviceReq.getOperation(), userId, new Date());
}
CallInspector callInspector = getCallInspector(serviceReq, serverSession);
ServiceTunnelResponse serviceRes = null;
try {
ServiceUtility serviceUtility = BEANS.get(ServiceUtility.class);
Class<?> serviceInterfaceClass = SerializationUtility.getClassLoader().loadClass(serviceReq.getServiceInterfaceClassName());
Method serviceOp = serviceUtility.getServiceOperation(serviceInterfaceClass, serviceReq.getOperation(), serviceReq.getParameterTypes());
Object[] args = serviceReq.getArgs();
Object service = getValidatedServiceAccess(serviceInterfaceClass, serviceOp, args);
Object data = serviceUtility.invoke(service, serviceOp, args);
Object[] outParameters = serviceUtility.extractHolderArguments(args);
serviceRes = new ServiceTunnelResponse(data, outParameters);
return serviceRes;
} finally {
updateInspector(callInspector, serviceRes);
}
}
Aggregations