kr.co.hit.live.aop.auto
Class RegexpPatternAutoProxy
java.lang.Object
kr.co.hit.live.aop.AbstractInterceptorProxy
kr.co.hit.live.aop.MethodInterceptorProxy
kr.co.hit.live.aop.auto.AbstractAutoProxy
kr.co.hit.live.aop.auto.RegexpPatternAutoProxy
- All Implemented Interfaces:
- InvocationHandler, AutoProxy, InterceptorProxy
public class RegexpPatternAutoProxy
- extends AbstractAutoProxy
서비스의 구현 클래스 패키지 명과 서비스의 명칭을 Regexp 패턴 기반으로 매칭하여
auto-proxy를 적용여부를 결정하는 AutoProxy의 구현 클래스이다.
아래와 같이 서비스 설정 파일에 등록하면 자동으로 auto-proxy로 등록되어 적용된다.
<service name="autoproxy"
class="kr.co.hit.live.aop.auto.RegexpPatternAutoProxy"
activate="true"
pre-init="true"
singleton="true">
<property name="interceptor" ref="logInterceptor"/>
<property name="packagePattern" value="phis\..*"/>
</service>
- Author:
- 김형도
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPERATOR_AND
public static final int OPERATOR_AND
- See Also:
- Constant Field Values
OPERATOR_OR
public static final int OPERATOR_OR
- See Also:
- Constant Field Values
RegexpPatternAutoProxy
public RegexpPatternAutoProxy()
setPackagePattern
public void setPackagePattern(String pkgPattern)
- auto-proxy를 적용할 구현 클래스의 패키지 패턴을 regexp 문자열로 지정한다.
지정하지 않으면 모든 패키지에대하여 매칭되는 것으로 처리된다.
- Parameters:
pkgPattern -
setNamePattern
public void setNamePattern(String nmPattern)
- auto-proxy를 적용할 서비스 명칭의 패턴을 regexp 문자열로 지정한다.
지정하지 않으면 모든 패키지에대하여 매칭되는 것으로 처리된다.
- Parameters:
pkgPattern -
setOperator
public void setOperator(String opName)
- 패키지 패턴과 서비스 명칭의 패턴 조건을 OR 또는 AND 로 지정한다.
지정하지 않으면 AND 조건으로 적용된다.
- Parameters:
opName -
isMatch
protected boolean isMatch(ServiceDefinition svcDef)
- Description copied from class:
AbstractAutoProxy
- 적용될 서비스 여부를 반환함.
- Specified by:
isMatch in class AbstractAutoProxy
- Returns:
Copyright © 2014. All Rights Reserved.