KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > callback > Callback


1 /*
2  * JBoss, the OpenSource EJB server
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.ejb3.callback;
8
9 import org.jboss.aop.util.MethodHashing;
10
11 import java.lang.reflect.Method JavaDoc;
12
13 /**
14  * @author <a HREF="mailto:kabir.khan@jboss.org">Kabir Khan</a>
15  * @version $Revision: 1.3.6.1 $
16  */

17 public abstract class Callback
18 {
19    protected Method JavaDoc callbackMethod;
20    protected long callbackMethodHash;
21
22    public Callback(Method JavaDoc callbackMethod)
23    {
24       this.callbackMethod = callbackMethod;
25       callbackMethodHash = MethodHashing.calculateHash(callbackMethod);
26    }
27
28    public Method JavaDoc getCallbackMethod()
29    {
30       return callbackMethod;
31    }
32
33    public long getCallbackMethodHash()
34    {
35       return callbackMethodHash;
36    }
37
38    public abstract void invoke(Object JavaDoc bean);
39 }
40
Popular Tags