org.infinispan.config
Class CustomInterceptorConfig

java.lang.Object
  extended by org.infinispan.config.AbstractConfigurationBean
      extended by org.infinispan.config.AbstractNamedCacheConfigurationBean
          extended by org.infinispan.config.CustomInterceptorConfig
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, JAXBUnmarshallable

public class CustomInterceptorConfig
extends AbstractNamedCacheConfigurationBean

Holds information about the custom interceptors defined in the configuration file.

Since:
4.0
Author:
Mircea.Markus@jboss.com, Vladimir Blagojevic
See Also:
Serialized Form

Field Summary
protected  String after
           
protected  String before
           
protected  String className
           
protected  Integer index
           
protected  CommandInterceptor interceptor
           
protected  org.infinispan.config.CustomInterceptorConfig.Position position
           
 
Fields inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
cr
 
Fields inherited from class org.infinispan.config.AbstractConfigurationBean
overriddenConfigurationElements
 
Constructor Summary
CustomInterceptorConfig()
           
CustomInterceptorConfig(CommandInterceptor interceptor)
          Constructs an interceptor config based on the supplied interceptor instance.
CustomInterceptorConfig(CommandInterceptor interceptor, boolean first, boolean last, int index, String after, String before)
          Builds a custom interceptor configuration.
 
Method Summary
 void accept(ConfigurationBeanVisitor v)
           
 CustomInterceptorConfig clone()
           
 boolean equals(Object o)
           
 String getAfter()
           
 String getAfterInterceptor()
           
 String getBefore()
           
 String getBeforeInterceptor()
           
 String getClassName()
           
 Integer getIndex()
           
 CommandInterceptor getInterceptor()
          Returns a the interceptor that we want to add to the chain.
 org.infinispan.config.CustomInterceptorConfig.Position getPosition()
           
 String getPositionAsString()
           
 Properties getProperties()
           
 int hashCode()
           
 boolean isFirst()
           
 boolean isLast()
           
 void setAfterInterceptor(Class<? extends CommandInterceptor> interceptorClass)
          Places the new interceptor directly after the instance of the named interceptor which is specified via its fully qualified class name.
 void setAfterInterceptor(String afterClass)
          Places the new interceptor directly after the instance of the named interceptor which is specified via its fully qualified class name.
 void setBeforeInterceptor(Class<? extends CommandInterceptor> interceptorClass)
          Places the new interceptor directly before the instance of the named interceptor which is specified via its fully qualified class name..
 void setBeforeInterceptor(String beforeClass)
          Places the new interceptor directly before the instance of the named interceptor which is specified via its fully qualified class name..
 void setClassName(String className)
          Fully qualified interceptor class name which must extend org.infinispan.interceptors.base.CommandInterceptor.
 void setFirst(boolean first)
          Shall this interceptor be the first one in the chain?
 void setIndex(Integer index)
          A position at which to place this interceptor in the chain, with 0 being the first position.
 void setInterceptor(CommandInterceptor interceptor)
          Returns a the interceptor that we want to add to the chain.
 void setLast(boolean last)
          Shall this interceptor be the last one in the chain?
 void setPosition(org.infinispan.config.CustomInterceptorConfig.Position position)
          A position at which to place this interceptor in the chain.
 void setPositionAsString(String pos)
          A position at which to place this interceptor in the chain.
 void setProperties(Properties properties)
           
 String toString()
           
protected  String uc(String s)
          Safely converts a String to upper case.
 
Methods inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
hasComponentStarted, inject
 
Methods inherited from class org.infinispan.config.AbstractConfigurationBean
testImmutability, toTypedProperties, toTypedProperties, willUnmarshall
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

interceptor

protected CommandInterceptor interceptor

index

protected Integer index

after

protected String after

before

protected String before

position

protected org.infinispan.config.CustomInterceptorConfig.Position position

className

protected String className
Constructor Detail

CustomInterceptorConfig

public CustomInterceptorConfig()

CustomInterceptorConfig

public CustomInterceptorConfig(CommandInterceptor interceptor,
                               boolean first,
                               boolean last,
                               int index,
                               String after,
                               String before)
Builds a custom interceptor configuration.

Parameters:
interceptor - interceptor instance, already initialized with all attributes specified in the configuration
first - true if you wan this to be the first interceptor in the chain
last - true if you wan this to be the last interceptor in the chain
index - an absolute position within the interceptor chain
after - if you want this interceptor immediately after the specified class in the chain
before - immediately before the specified class in the chain

CustomInterceptorConfig

public CustomInterceptorConfig(CommandInterceptor interceptor)
Constructs an interceptor config based on the supplied interceptor instance.

Parameters:
interceptor -
Method Detail

getProperties

public Properties getProperties()

setProperties

public void setProperties(Properties properties)

getPosition

public org.infinispan.config.CustomInterceptorConfig.Position getPosition()

getPositionAsString

public String getPositionAsString()

setPosition

public void setPosition(org.infinispan.config.CustomInterceptorConfig.Position position)
A position at which to place this interceptor in the chain. FIRST is the first interceptor encountered when an invocation is made on the cache, LAST is the last interceptor before the call is passed on to the data structure. Note that this attribute is mutually exclusive with 'before', 'after' and 'index'.

Parameters:
position -

getClassName

public String getClassName()

setClassName

public void setClassName(String className)
Fully qualified interceptor class name which must extend org.infinispan.interceptors.base.CommandInterceptor.

Parameters:
className -

setFirst

public void setFirst(boolean first)
Shall this interceptor be the first one in the chain?


setLast

public void setLast(boolean last)
Shall this interceptor be the last one in the chain?


setPositionAsString

public void setPositionAsString(String pos)
A position at which to place this interceptor in the chain. FIRST is the first interceptor encountered when an invocation is made on the cache, LAST is the last interceptor before the call is passed on to the data structure. Note that this attribute is mutually exclusive with 'before', 'after' and 'index'.

Parameters:
pos -

setIndex

public void setIndex(Integer index)
A position at which to place this interceptor in the chain, with 0 being the first position. Note that this attribute is mutually exclusive with 'position', 'before' and 'after'."

Parameters:
index -

setAfterInterceptor

public void setAfterInterceptor(String afterClass)
Places the new interceptor directly after the instance of the named interceptor which is specified via its fully qualified class name. Note that this attribute is mutually exclusive with 'position', 'before' and 'index'.

Parameters:
afterClass -

setAfterInterceptor

public void setAfterInterceptor(Class<? extends CommandInterceptor> interceptorClass)
Places the new interceptor directly after the instance of the named interceptor which is specified via its fully qualified class name. Note that this attribute is mutually exclusive with 'position', 'before' and 'index'.

Parameters:
interceptorClass -

setBeforeInterceptor

public void setBeforeInterceptor(String beforeClass)
Places the new interceptor directly before the instance of the named interceptor which is specified via its fully qualified class name.. Note that this attribute is mutually exclusive with 'position', 'after' and 'index'."

Parameters:
beforeClass -

setBeforeInterceptor

public void setBeforeInterceptor(Class<? extends CommandInterceptor> interceptorClass)
Places the new interceptor directly before the instance of the named interceptor which is specified via its fully qualified class name.. Note that this attribute is mutually exclusive with 'position', 'after' and 'index'."

Parameters:
interceptorClass -

getInterceptor

public CommandInterceptor getInterceptor()
Returns a the interceptor that we want to add to the chain.


setInterceptor

public void setInterceptor(CommandInterceptor interceptor)
Returns a the interceptor that we want to add to the chain.


isFirst

public boolean isFirst()
See Also:
setFirst(boolean)

isLast

public boolean isLast()
See Also:
setLast(boolean)

getIndex

public Integer getIndex()
See Also:
getIndex()

getAfter

public String getAfter()
See Also:
getAfter()

getAfterInterceptor

public String getAfterInterceptor()
See Also:
getAfter()

getBefore

public String getBefore()
See Also:
getBefore()

getBeforeInterceptor

public String getBeforeInterceptor()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public CustomInterceptorConfig clone()
                              throws CloneNotSupportedException
Specified by:
clone in interface CloneableConfigurationComponent
Overrides:
clone in class AbstractNamedCacheConfigurationBean
Throws:
CloneNotSupportedException

uc

protected String uc(String s)
Description copied from class: AbstractConfigurationBean
Safely converts a String to upper case.

Overrides:
uc in class AbstractConfigurationBean
Parameters:
s - string to convert
Returns:
the string in upper case, or null if s is null.

accept

public void accept(ConfigurationBeanVisitor v)

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.