Package org.apache.openjpa.event
Class BeanLifecycleCallbacks
- java.lang.Object
-
- org.apache.openjpa.event.MethodLifecycleCallbacks
-
- org.apache.openjpa.event.BeanLifecycleCallbacks
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,LifecycleCallbacks
public class BeanLifecycleCallbacks extends MethodLifecycleCallbacks
Performs a callback method on a cached bean instance.- Author:
- Steve Kim
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BeanLifecycleCallbacks(java.lang.Class<?> cls, java.lang.reflect.Method method, boolean arg)
Constructor.BeanLifecycleCallbacks(java.lang.Class<?> cls, java.lang.String method, boolean arg, java.lang.Class<?> type)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
makeCallback(java.lang.Object obj, java.lang.Object rel, int eventType)
Invoke the callback for the given event type on the given instance.void
readExternal(java.io.ObjectInput in)
void
writeExternal(java.io.ObjectOutput out)
-
Methods inherited from class org.apache.openjpa.event.MethodLifecycleCallbacks
getCallbackMethod, getMethod, hasCallback, requiresArgument, toString
-
-
-
-
Constructor Detail
-
BeanLifecycleCallbacks
public BeanLifecycleCallbacks(java.lang.Class<?> cls, java.lang.String method, boolean arg, java.lang.Class<?> type)
Constructor. Make the callback on an instance of the given type.- Parameters:
arg
- whether another argument is expected such as AfterDetach
-
BeanLifecycleCallbacks
public BeanLifecycleCallbacks(java.lang.Class<?> cls, java.lang.reflect.Method method, boolean arg)
Constructor. Make the callback on an instance of the given type.
-
-
Method Detail
-
makeCallback
public void makeCallback(java.lang.Object obj, java.lang.Object rel, int eventType) throws java.lang.Exception
Description copied from interface:LifecycleCallbacks
Invoke the callback for the given event type on the given instance.- Specified by:
makeCallback
in interfaceLifecycleCallbacks
- Overrides:
makeCallback
in classMethodLifecycleCallbacks
- Throws:
java.lang.Exception
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Overrides:
readExternal
in classMethodLifecycleCallbacks
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Overrides:
writeExternal
in classMethodLifecycleCallbacks
- Throws:
java.io.IOException
-
-