Ok,

But let's suppose that I want to invoke, inside an invoker, a different
operation from a component.

For this invocation chain:

1) add -> Interceptor for the add -> Interceptor for the addMethod ->
addMethod

Suppose that I want to invoke the addMethod2 instead of addMetdhod, and both
operation belong to the same component. In this way, I cannot use the
getNext().invoke(msg);

I am trying to create a different invoker:

            RuntimeComponent component = msg.getTo().getComponent();
            ImplementationProvider implProvider =
component.getImplementationProvider();
implProvider.createInvoker(*RuntimeComponentService arg1*, *Operation arg2*
);

However, I am having some problems to create a RuntimeComponentService and a
Operation for the addMethod2. Is it possible? Am I doing the right thing, or
there is another way to do it?

Thanks


On Mon, Oct 19, 2009 at 7:00 PM, Luciano Resende <[email protected]>wrote:

> On Mon, Oct 19, 2009 at 11:51 AM, Raymond Feng <[email protected]>
> wrote:
> > Sure. The Inteceptor is called on the "setNext()" method to receive the
> next
> > interceptor in the chain. But the interceptor has freedom to decide if it
> > should delegates to the next one.
> >
> > For example, in the invoke(Message msg) implementation:
> >
> >     // do something
> >     return getNext().invoke(msg);
> >
> > or
> >     // do something
> >     return myMsg;
> >
>
>
> Although the interceptors have this flexibility, I'd like to better
> understand Douglas's motivations on this scenario. BTW, if the
> interceptor kind just ignore the invocation chain somewhat
> unconditionally, can't this lead to unexpected runtime behaviors ?
> AFAIK, most of our policy interceptors either perform some additional
> transformations before reaching the implementation invoker, or shields
> the invocation from reaching the implementation invoker when things
> are not satisfied (e.g no authorization headers, no authorization,
> etc), which is what I'd expect of policy interceptors.
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>



-- 
Douglas Siqueira Leite
Graduate student at University of Campinas (Unicamp), Brazil

Reply via email to