[Design of JBoss Portal] - Re: Portlet Container 1.2 changes
by julien@jboss.com
I simplified the interceptor/invocation of the portlet container in order to simplify and unify the framework.
The PortletInvocation base class does not extend anymore the o.j.p.common.invocation.Invocation class.
The PortletInterceptor class has been removed and replace by a PortletInvokerInterceptor class that is code such as:
public class PortletInvokerInterceptor implements PortletInvoker {
|
| ..
|
| private PortletInvoker next;
|
| public void setNext(PortletInvoker next)
| {
| this.next = next;
| }
|
| public Set<Portlet> getPortlets()
| {
| if (next == null)
| {
| throw new IllegalStateException();
| }
| return next.getPortlets();
| }
|
| ...
|
| }
The different interceptors of the portlet module have been updated to extend that class.
The classes ProducerPortletInvoker / ConsumerPortletInvoker / ContainerPortletInvoker now also extend that class.
The benefit for interceptors is that now they can intercept all methods and not only the portlet life cycle method which extend the range of what an interceptor can do (such as a security interceptor can intercept all methods).
I was considering also the ProducerPortletInvoker and such as interceptor anyway, so it's a good thing to remove the now obsolete dependency on the o.j.p.common.invocation.* package and unify these interceptors.
Beside the minor API changes, I think the most important update is the wiring since the InterceptorStack and InterceptorStackFactory are not used anymore in favor of a direct wiring with the getNext/setNext field on each interceptor.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144356#4144356
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144356
16 years, 5 months