01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * published by the Free Software Foundation; either version 2.1 of
10: * the License, or (at your option) any later version.
11: *
12: * This software is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: *
17: * You should have received a copy of the GNU Lesser General Public
18: * License along with this software; if not, write to the Free
19: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21: */
22: package org.jboss.mx.util;
23:
24: import java.lang.reflect.Method;
25:
26: import javax.management.InstanceNotFoundException;
27: import javax.management.AttributeNotFoundException;
28: import javax.management.InvalidAttributeValueException;
29: import javax.management.MBeanException;
30: import javax.management.ReflectionException;
31: import javax.management.RuntimeOperationsException;
32: import javax.management.RuntimeMBeanException;
33: import javax.management.RuntimeErrorException;
34:
35: /**
36: *
37: * @author <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
38: * @version $Revision: 57200 $
39: */
40: public interface ProxyExceptionHandler {
41: public Object handleInstanceNotFound(ProxyContext ctx,
42: InstanceNotFoundException e, Method m, Object[] args)
43: throws Exception;
44:
45: public Object handleAttributeNotFound(ProxyContext ctx,
46: AttributeNotFoundException e, Method m, Object[] args)
47: throws Exception;
48:
49: public Object handleInvalidAttributeValue(ProxyContext ctx,
50: InvalidAttributeValueException e, Method m, Object[] args)
51: throws Exception;
52:
53: public Object handleMBeanException(ProxyContext ctx,
54: MBeanException e, Method m, Object[] args) throws Exception;
55:
56: public Object handleReflectionException(ProxyContext ctx,
57: ReflectionException e, Method m, Object[] args)
58: throws Exception;
59:
60: public Object handleRuntimeOperationsException(ProxyContext ctx,
61: RuntimeOperationsException e, Method m, Object[] args)
62: throws Exception;
63:
64: public Object handleRuntimeMBeanException(ProxyContext ctx,
65: RuntimeMBeanException e, Method m, Object[] args)
66: throws Exception;
67:
68: public Object handleRuntimeError(ProxyContext ctx,
69: RuntimeErrorException e, Method m, Object[] args)
70: throws Exception;
71: }
|