jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
24 */ |
24 */ |
25 |
25 |
26 |
26 |
27 package com.sun.org.glassfish.external.statistics.impl; |
27 package com.sun.org.glassfish.external.statistics.impl; |
28 import com.sun.org.glassfish.external.statistics.CountStatistic; |
28 import com.sun.org.glassfish.external.statistics.CountStatistic; |
29 import java.util.concurrent.atomic.AtomicLong; |
|
30 import java.util.Map; |
29 import java.util.Map; |
31 import java.lang.reflect.*; |
30 import java.lang.reflect.*; |
32 |
31 |
33 /** |
32 /** |
34 * @author Sreenivas Munnangi |
33 * @author Sreenivas Munnangi |
101 sampleTime = -1L; |
100 sampleTime = -1L; |
102 } |
101 } |
103 |
102 |
104 // todo: equals implementation |
103 // todo: equals implementation |
105 public Object invoke(Object proxy, Method m, Object[] args) throws Throwable { |
104 public Object invoke(Object proxy, Method m, Object[] args) throws Throwable { |
|
105 checkMethod(m); |
|
106 |
106 Object result; |
107 Object result; |
107 try { |
108 try { |
108 result = m.invoke(this, args); |
109 result = m.invoke(this, args); |
109 } catch (InvocationTargetException e) { |
110 } catch (InvocationTargetException e) { |
110 throw e.getTargetException(); |
111 throw e.getTargetException(); |
111 } catch (Exception e) { |
112 } catch (Exception e) { |
112 throw new RuntimeException("unexpected invocation exception: " + |
113 throw new RuntimeException("unexpected invocation exception: " + |
113 e.getMessage()); |
114 e.getMessage()); |
114 } finally { |
|
115 } |
115 } |
116 return result; |
116 return result; |
117 } |
117 } |
118 } |
118 } |