KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > ejb > 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.hibernate.ejb.callback;
8
9 import java.lang.reflect.Method JavaDoc;
10
11 /**
12  * @author <a HREF="mailto:kabir.khan@jboss.org">Kabir Khan</a>
13  * @version $Revision: 1.3 $
14  */

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