01: /**
02: *
03: * Licensed to the Apache Software Foundation (ASF) under one or more
04: * contributor license agreements. See the NOTICE file distributed with
05: * this work for additional information regarding copyright ownership.
06: * The ASF licenses this file to You under the Apache License, Version 2.0
07: * (the "License"); you may not use this file except in compliance with
08: * the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */package org.apache.openejb.jee;
18:
19: import javax.xml.bind.annotation.XmlAccessType;
20: import javax.xml.bind.annotation.XmlAccessorType;
21: import javax.xml.bind.annotation.XmlElement;
22: import javax.xml.bind.annotation.XmlType;
23:
24: /**
25: * The around-invoke type specifies a method on a
26: * class to be called during the around invoke portion of an
27: * ejb invocation. Note that each class may have only one
28: * around invoke method and that the method may not be
29: * overloaded.
30: * <p/>
31: * If the around-invoke element is missing then
32: * the class defining the callback is assumed to be the
33: * interceptor class or component class in scope at the
34: * location in the descriptor in which the around invoke
35: * definition appears.
36: */
37: @XmlAccessorType(XmlAccessType.FIELD)
38: @XmlType(name="around-invokeType",propOrder={"clazz","methodName"})
39: public class AroundInvoke implements CallbackMethod {
40:
41: @XmlElement(name="class")
42: protected String clazz;
43: @XmlElement(name="method-name",required=true)
44: protected String methodName;
45:
46: public AroundInvoke() {
47: }
48:
49: public AroundInvoke(java.lang.reflect.Method method) {
50: this (method.getDeclaringClass().getName(), method.getName());
51: }
52:
53: public AroundInvoke(String clazz, String methodName) {
54: this .clazz = clazz;
55: this .methodName = methodName;
56: }
57:
58: public String getClazz() {
59: return clazz;
60: }
61:
62: public void setClazz(String value) {
63: this .clazz = value;
64: }
65:
66: public String getMethodName() {
67: return methodName;
68: }
69:
70: public void setMethodName(String value) {
71: this .methodName = value;
72: }
73:
74: public String getClassName() {
75: return getClazz();
76: }
77: }
|