Package com.brienwheeler.lib.monitor.work

Examples of com.brienwheeler.lib.monitor.work.MonitoredWork


    ValidationUtils.assertTrue(joinPoint.getSignature() instanceof MethodSignature,
        "@MonitoredWork signature must be a method");
   
        final WorkMonitor workMonitor = ((IWorkMonitorProvider) joinPoint.getTarget()).getWorkMonitor();
    MethodSignature signature = (MethodSignature) joinPoint.getSignature();
    MonitoredWork annotation = signature.getMethod().getAnnotation(MonitoredWork.class);
   
    final String workName = annotation != null && !annotation.value().isEmpty() ? annotation.value() : signature.getName();

        long start = System.currentTimeMillis();
        try {
            Object ret = joinPoint.proceed();
            workMonitor.recordWorkOk(workName, System.currentTimeMillis() - start);
View Full Code Here

TOP

Related Classes of com.brienwheeler.lib.monitor.work.MonitoredWork

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.