org.objectweb.joram.mom.util
Class InterceptorsHelper

java.lang.Object
  extended by org.objectweb.joram.mom.util.InterceptorsHelper

public class InterceptorsHelper
extends java.lang.Object

Helper class for interceptors.


Field Summary
static org.objectweb.util.monolog.api.Logger logger
          logger
 
Constructor Summary
InterceptorsHelper()
           
 
Method Summary
static void addInterceptors(java.lang.String listInterceptorClassName, java.util.List interceptors)
          Add the interceptors className list (used by Joram admin).
static java.lang.String getListInterceptors(java.util.List interceptors)
          get the interceptors list.
static void removeInterceptors(java.lang.String listInterceptorClassName, java.util.List interceptors)
          Remove the first occurrence of interceptorClassName.
static boolean replaceInterceptor(java.lang.String newInterceptorClassName, java.lang.String oldInterceptorClassName, java.util.List interceptors)
          Replace the first occurrence of oldInterceptorClassName by the newInterceptorClassName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static org.objectweb.util.monolog.api.Logger logger
logger

Constructor Detail

InterceptorsHelper

public InterceptorsHelper()
Method Detail

addInterceptors

public static void addInterceptors(java.lang.String listInterceptorClassName,
                                   java.util.List interceptors)
                            throws java.lang.Exception
Add the interceptors className list (used by Joram admin).

Parameters:
listInterceptorClassName - list of string className interceptors (separate with INTERCEPTOR_CLASS_NAME_SEPARATOR)
interceptors - the interceptors List.
Throws:
java.lang.Exception

removeInterceptors

public static void removeInterceptors(java.lang.String listInterceptorClassName,
                                      java.util.List interceptors)
                               throws java.lang.Exception
Remove the first occurrence of interceptorClassName.

Parameters:
listInterceptorClassName - list of string className interceptors (separate by INTERCEPTOR_CLASS_NAME_SEPARATOR)
interceptors - the interceptors List.
Throws:
java.lang.Exception

replaceInterceptor

public static boolean replaceInterceptor(java.lang.String newInterceptorClassName,
                                         java.lang.String oldInterceptorClassName,
                                         java.util.List interceptors)
                                  throws java.lang.Exception
Replace the first occurrence of oldInterceptorClassName by the newInterceptorClassName.

Parameters:
newInterceptorClassName - the new className interceptor.
oldInterceptorClassName - the old className interceptor.
interceptors - the interceptors List.
Returns:
true if replaced.
Throws:
java.lang.Exception

getListInterceptors

public static java.lang.String getListInterceptors(java.util.List interceptors)
get the interceptors list.

Parameters:
interceptors - the interceptors List.
Returns:
string representation of interceptors List separate by INTERCEPTOR_CLASS_NAME_SEPARATOR


Copyright © 2011 ScalAgent D.T.. All Rights Reserved.