Package org.glassfish.flashlight.provider

Examples of org.glassfish.flashlight.provider.FlashlightProbe$ProbeInvokeState


        return childNode;
    }

    public boolean hasListeners(String probeStr) {
        boolean hasListeners = false;
        FlashlightProbe probe = probeRegistry.getProbe(probeStr);
        if (probe != null)
            return probe.isEnabled();
        return hasListeners;
    }
View Full Code Here


       }
       return visibleProbes;
    }

   public static void invokeProbe(int id, Object[] args) {
      FlashlightProbe probe = probeMap.get(id);
      if (probe != null) {
        probe.fireProbe(args);
      }
    }
View Full Code Here

        probe.fireProbe(args);
      }
    }

   public static Object invokeProbeBefore(int id, Object[] args) {
       FlashlightProbe probe = probeMap.get(id);
       if (probe != null) {
           return probe.fireProbeBefore(args);
       }
       return null;
   }
View Full Code Here

       return null;
   }

   public static void invokeProbeAfter(Object returnValue, int id,
                        Object states) {
       FlashlightProbe probe = probeMap.get(id);
       if (probe != null) {
           try {
               probe.fireProbeAfter(returnValue, (ArrayList<FlashlightProbe.ProbeInvokeState>)states);
           } catch (ClassCastException e) {
               // Make sure the state we got was really ok, internal error if that happens
           }
       }
   }
View Full Code Here

       }
   }

   public static void invokeProbeOnException(Object exceptionValue, int id,
                        Object states) {
       FlashlightProbe probe = probeMap.get(id);
       if (probe != null) {
           try {
               probe.fireProbeOnException(exceptionValue, (ArrayList<FlashlightProbe.ProbeInvokeState>)states);
           } catch (ClassCastException e) {
               // Make sure the state we got was really ok, internal error if that happens
           }
       }
   }
View Full Code Here

        if (methodProbePairs.isEmpty()) {
            return;
        }

        for (MethodProbe mp : methodProbePairs) {
            FlashlightProbe probe = mp.probe;
            ProbeClientInvoker invoker = ProbeClientInvokerFactory.createInvoker(listener, mp.method, probe);
            ProbeClientMethodHandleImpl hi = new ProbeClientMethodHandleImpl(invoker.getId(), invoker, probe);
            pcms.add(hi);

            if (probe.addInvoker(invoker))
                probesRequiringClassTransformation.add(probe);
        }
    }
View Full Code Here

                        + strArr[1] + ":"
                        + strArr[2] + invokerId + ":"
                        + strArr[3];
            }

            FlashlightProbe probe = probeRegistry.getProbe(probeString);
            if (probe == null) {
                String errStr = localStrings.getLocalString("probeNotRegistered",
                        "Probe is not registered: {0}", probeString);
                throw new RuntimeException(errStr);
            }
View Full Code Here

        @Override
        public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
            MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions);

            FlashlightProbe probe = probes.get(makeKey(name, desc));
            if (probe != null) {
                mv = new ProbeProviderMethodVisitor(mv, access, name, desc, probe);
            }

            return mv;
View Full Code Here

          String probeProviderName, String probeName, String[] paramNames,
          Class[] paramTypes, boolean self, boolean hidden,
          boolean stateful, boolean statefulReturn, boolean statefulException,
          String [] profileNames) {
      int id = counter.incrementAndGet();
      FlashlightProbe probe = new FlashlightProbe(id, providerClazz,
              moduleProviderName, moduleName, probeProviderName, probeName,
              paramNames, paramTypes, self, hidden, stateful, statefulReturn,
              statefulException, profileNames);

      probeRegistry.registerProbe(probe);
View Full Code Here

       }
       return visibleProbes;
    }

   public static void invokeProbe(int id, Object[] args) {
      FlashlightProbe probe = probeMap.get(id);
      if (probe != null) {
        probe.fireProbe(args);
      }
    }
View Full Code Here

TOP

Related Classes of org.glassfish.flashlight.provider.FlashlightProbe$ProbeInvokeState

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.