Methods Summary |
---|
public void | addAroundInvokeDescriptor(LifecycleCallbackDescriptor aroundInvokeDesc)
Set<LifecycleCallbackDescriptor> aroundInvokeDescs =
getAroundInvokeDescriptors();
boolean found = false;
for (LifecycleCallbackDescriptor ai : aroundInvokeDescs) {
if ((aroundInvokeDesc.getLifecycleCallbackClass() != null) &&
aroundInvokeDesc.getLifecycleCallbackClass().equals(
ai.getLifecycleCallbackClass())) {
found = true;
}
}
if (!found) {
aroundInvokeDescs.add(aroundInvokeDesc);
}
|
public void | addAroundInvokeDescriptors(java.util.Set aroundInvokes)
for (LifecycleCallbackDescriptor ai : aroundInvokes) {
addAroundInvokeDescriptor(ai);
}
|
public void | addPostActivateDescriptor(LifecycleCallbackDescriptor lcDesc)
addCallbackDescriptor(CallbackType.POST_ACTIVATE, lcDesc);
|
public void | addPrePassivateDescriptor(LifecycleCallbackDescriptor lcDesc)
addCallbackDescriptor(CallbackType.PRE_PASSIVATE, lcDesc);
|
public java.util.Set | getAroundInvokeDescriptors()
if (aroundInvokeDescriptors == null) {
aroundInvokeDescriptors =
new HashSet<LifecycleCallbackDescriptor>();
}
return aroundInvokeDescriptors;
|
public boolean | getFromBeanClass()
return fromBeanClass;
|
public java.lang.String | getInterceptorClassName()
return interceptorClassName;
|
public java.util.List | getOrderedAroundInvokeDescriptors(java.lang.ClassLoader loader)Some clients need the AroundInvoke methods for this inheritance
hierarchy in the spec-defined "least derived --> most derived" order.
return orderDescriptors(getAroundInvokeDescriptors(), loader);
|
public java.util.List | getOrderedCallbackDescriptors(com.sun.enterprise.deployment.LifecycleCallbackDescriptor.CallbackType type, java.lang.ClassLoader loader)Some clients need the Callback methods for this inheritance
hierarchy in the spec-defined "least derived --> most derived" order.
return orderDescriptors(getCallbackDescriptors(type), loader);
|
public boolean | hasAroundInvokeDescriptor()
return (getAroundInvokeDescriptors().size() > 0);
|
private java.util.List | orderDescriptors(java.util.Set lcds, java.lang.ClassLoader loader)Order a set of lifecycle method descriptors for a particular
inheritance hierarchy with highest precedence assigned to the
least derived class.
LinkedList<LifecycleCallbackDescriptor> orderedDescs =
new LinkedList<LifecycleCallbackDescriptor>();
Map<String, LifecycleCallbackDescriptor> map =
new HashMap<String, LifecycleCallbackDescriptor>();
for(LifecycleCallbackDescriptor next : lcds) {
map.put(next.getLifecycleCallbackClass(), next);
}
Class nextClass = loader.loadClass(getInterceptorClassName());
while((nextClass != Object.class) && (nextClass != null)) {
String nextClassName = nextClass.getName();
if( map.containsKey(nextClassName) ) {
LifecycleCallbackDescriptor lcd = map.get(nextClassName);
orderedDescs.addFirst(lcd);
}
nextClass = nextClass.getSuperclass();
}
return orderedDescs;
|
public void | setFromBeanClass(boolean flag)
fromBeanClass = flag;
|
public void | setInterceptorClassName(java.lang.String className)
interceptorClassName = className;
|
public java.lang.String | toString()
return "EjbInterceptor class = " + getInterceptorClassName();
|