jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.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 |
27 |
28 package com.sun.org.glassfish.external.statistics.impl; |
28 package com.sun.org.glassfish.external.statistics.impl; |
|
29 |
29 import com.sun.org.glassfish.external.statistics.BoundedRangeStatistic; |
30 import com.sun.org.glassfish.external.statistics.BoundedRangeStatistic; |
30 import java.util.concurrent.atomic.AtomicLong; |
|
31 import java.util.Map; |
31 import java.util.Map; |
32 import java.lang.reflect.*; |
32 import java.lang.reflect.*; |
33 |
33 |
34 |
34 |
35 /** |
35 /** |
143 sampleTime = -1L; |
143 sampleTime = -1L; |
144 } |
144 } |
145 |
145 |
146 // todo: equals implementation |
146 // todo: equals implementation |
147 public Object invoke(Object proxy, Method m, Object[] args) throws Throwable { |
147 public Object invoke(Object proxy, Method m, Object[] args) throws Throwable { |
|
148 checkMethod(m); |
|
149 |
148 Object result; |
150 Object result; |
149 try { |
151 try { |
150 result = m.invoke(this, args); |
152 result = m.invoke(this, args); |
151 } catch (InvocationTargetException e) { |
153 } catch (InvocationTargetException e) { |
152 throw e.getTargetException(); |
154 throw e.getTargetException(); |
153 } catch (Exception e) { |
155 } catch (Exception e) { |
154 throw new RuntimeException("unexpected invocation exception: " + |
156 throw new RuntimeException("unexpected invocation exception: " + |
155 e.getMessage()); |
157 e.getMessage()); |
156 } finally { |
|
157 } |
158 } |
158 return result; |
159 return result; |
159 } |
160 } |
160 } |
161 } |