Jiří Holuša created ISPN-3539:
---------------------------------
Summary: Allow adding multiple custom interceptors without calling
customInterceptors() every time
Key: ISPN-3539
URL:
https://issues.jboss.org/browse/ISPN-3539
Project: Infinispan
Issue Type: Enhancement
Reporter: Jiří Holuša
Assignee: Mircea Markus
Priority: Minor
When adding multiple custom interceptors programmatically via ConfigurationBuilder, you
have to call customInterceptors() every time you want to add a new one.
The code than looks like this:
{code:borderStyle=solid}
Configuration c2 = new ConfigurationBuilder()
.customInterceptors()
.addInterceptor()
.position(InterceptorConfiguration.Position.FIRST).interceptor(new
FirstInterceptor(1))
.customInterceptors()
.addInterceptor()
.after(FirstInterceptor.class).interceptor(new SecondInterceptor(2))
.build();
{code}
I think this is very ugly and it would be nice and even semantically more meaningful to do
it like:
{code:borderStyle=solid}
Configuration c2 = new ConfigurationBuilder()
.customInterceptors()
.addInterceptor()
.position(InterceptorConfiguration.Position.FIRST).interceptor(new
FirstInterceptor(1))
.addInterceptor()
.after(FirstInterceptor.class).interceptor(new SecondInterceptor(2))
.build();
{code}
e.g. calling customInterceptors() only once.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira