Examples of MonitoredCall


Examples of org.drift.tracker.MonitoredCall

    @Around("monitoredPoint()")
    public Object monitor(ProceedingJoinPoint pjp) throws Throwable {
        String trackerName = getTrackerName(pjp);
        Tracker tracker = TrackerFactory.getTracker(trackerName);

        MonitoredCall call = composeCall(pjp);
        tracker.registerCall(call);

        long start = System.currentTimeMillis();
        try {
            Object ret = pjp.proceed();
            long end = System.currentTimeMillis() - start;

            StringBuilder buf = new StringBuilder();
            buf.append("{monitor} " + call.getCall());
            if (call.logArgs) {
                buf.append(" with args " + Arrays.toString(call.args));
            }
            buf.append(" took " + end + " ms");
            return ret;
View Full Code Here

Examples of org.drift.tracker.MonitoredCall

        }
    }

    private MonitoredCall composeCall(ProceedingJoinPoint pjp) {
        Method method = getMethod(pjp);
        MonitoredCall call;
        if (method != null) {
            String methodName = method.getName();

            call = new MonitoredCall(pjp.getTarget().getClass().getSimpleName(), methodName, pjp.getArgs());

            Monitored annotation = method.getAnnotation(Monitored.class);
            if (annotation != null) {
                call.logArgs = annotation.logArgs();
                call.setMsg(annotation.message());
            }
        } else {
            //todo:Dima need to be refined
            Signature signature = pjp.getSignature();
            call = new MonitoredCall(signature.getDeclaringType().getSimpleName(), signature.getName(), pjp.getArgs());
        }
        return call;
    }
View Full Code Here

Examples of org.drift.tracker.MonitoredCall

    @Override public void destroy() { }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        if (monitoredRequest(request)) {
            MonitoredCall call = new MonitoredCall(getClass().getSimpleName(), "doFilter", composeMonitoredCallArgs(request));
            TrackerFactory.getTracker(getTrackerName()).registerCall(call);
        }

        try {
            chain.doFilter(request, response);
View Full Code Here

Examples of org.onebusaway.siri.model.MonitoredCall

        MonitoredStopVisit.MonitoredVehicleJourney = SiriUtils.getMonitoredVehicleJourney(
            specificTripDetails, new Date(status.getServiceDate()),
            status.getVehicleId());
        MonitoredStopVisit.MonitoredVehicleJourney.VehicleRef = status.getVehicleId();

        MonitoredCall monitoredCall = new MonitoredCall();
        MonitoredStopVisit.MonitoredVehicleJourney.MonitoredCall = monitoredCall;
        monitoredCall.Extensions = new DistanceExtensions();
        monitoredCall.StopPointRef = SiriUtils.getIdWithoutAgency(stopId);

        CoordinatePoint position = status.getLocation();
View Full Code Here

Examples of org.onebusaway.siri.model.MonitoredCall

    StopBean lastStop = stops.get(stops.size() - 1).getStop();
    monitoredVehicleJourney.DestinationRef = getIdWithoutAgency(lastStop.getId());

    StopBean nextStop = trip.getStatus().getNextStop();
    if (nextStop != null) {
      monitoredVehicleJourney.MonitoredCall = new MonitoredCall();
      monitoredVehicleJourney.MonitoredCall.StopPointRef = nextStop.getId();
      monitoredVehicleJourney.MonitoredCall.StopPointName = nextStop.getName();
      monitoredVehicleJourney.MonitoredCall.VisitNumber = 1; // FIXME: this is
                                                             // theoretically
                                                             // wrong but
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.