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

public class CustomInterceptorConfig
extends AbstractNamedCacheConfigurationBean

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

Note that class CustomInterceptorConfig contains JAXB annotations. These annotations determine how XML configuration files are read into instances of configuration class hierarchy as well as they provide meta data for configuration file XML schema generation. Please modify these annotations and Java element types they annotate with utmost understanding and care.

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  boolean isFirst
           
protected  boolean isLast
           
protected  org.infinispan.config.CustomInterceptorConfig.Position position
           
 
Fields inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
cr
 
Fields inherited from class org.infinispan.config.AbstractConfigurationBean
EMPTY_PROPERTIES, log, 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, Class<? extends CommandInterceptor> after, Class<? extends CommandInterceptor> before)
          Builds a custom interceptor configuration.
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 getBefore()
           
 String getClassName()
           
 int getIndex()
           
 CommandInterceptor getInterceptor()
          Returns a the interceptor that we want to add to the chain.
 org.infinispan.config.CustomInterceptorConfig.Position getPosition()
           
 Properties getProperties()
           
 int hashCode()
           
 boolean isFirst()
           
 boolean isLast()
           
 void setAfterInterceptor(Class<? extends CommandInterceptor> interceptorClass)
          Adds the interceptor immediately after the first occurrence of an interceptor having the given class.
 void setAfterInterceptor(String afterClass)
          Adds the interceptor immediately after the first occurrence of an interceptor having the given class.
 void setBeforeInterceptor(Class<? extends CommandInterceptor> interceptorClass)
          Adds the interceptor immediately before the first occurrence of an interceptor having the given class.
 void setBeforeInterceptor(String beforeClass)
          Adds the interceptor immediately before the first occurrence of an interceptor having the given class.
 void setClassName(String className)
           
 void setFirst(boolean first)
          Shall this interceptor be the first one in the chain?
 void setIndex(int index)
          Put this interceptor at the specified index, after the default chain is built.
 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)
           
 void setPosition(String pos)
           
 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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

interceptor

protected CommandInterceptor interceptor

isFirst

protected boolean isFirst

isLast

protected boolean isLast

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,
                               boolean first,
                               boolean last,
                               int index,
                               Class<? extends CommandInterceptor> after,
                               Class<? extends CommandInterceptor> 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()

setPosition

public void setPosition(org.infinispan.config.CustomInterceptorConfig.Position position)

getClassName

public String getClassName()

setClassName

public void setClassName(String 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?


setPosition

public void setPosition(String pos)

setIndex

public void setIndex(int index)
Put this interceptor at the specified index, after the default chain is built. If the index is not valid (negative or grater than the size of the chain) an ConfigurationException is thrown at construction time.


setAfterInterceptor

public void setAfterInterceptor(String afterClass)
Adds the interceptor immediately after the first occurrence of an interceptor having the given class. If the chain does not contain such an interceptor then this interceptor definition is ignored.


setAfterInterceptor

public void setAfterInterceptor(Class<? extends CommandInterceptor> interceptorClass)
Adds the interceptor immediately after the first occurrence of an interceptor having the given class. If the chain does not contain such an interceptor then this interceptor definition is ignored.


setBeforeInterceptor

public void setBeforeInterceptor(String beforeClass)
Adds the interceptor immediately before the first occurrence of an interceptor having the given class. If the chain does not contain such an interceptor then this interceptor definition is ignored.


setBeforeInterceptor

public void setBeforeInterceptor(Class<? extends CommandInterceptor> interceptorClass)
Adds the interceptor immediately before the first occurrence of an interceptor having the given class. If the chain does not contain such an interceptor then this interceptor definition is ignored.


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 int getIndex()
See Also:
getIndex()

getAfter

public String getAfter()
See Also:
getAfter()

getBefore

public String getBefore()
See Also:
getBefore()

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)

Google Analytics

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