kr.co.hit.live.aop.target
Class ThreadLocalTargetProxy

java.lang.Object
  extended by kr.co.hit.live.aop.target.AbstractTargetProxy
      extended by kr.co.hit.live.aop.target.ThreadLocalTargetProxy
All Implemented Interfaces:
InvocationHandler, TargetProxy

public class ThreadLocalTargetProxy
extends AbstractTargetProxy

ThreadLocal 변수를 사용하여 쓰레드 별로 target 객체를 생성하는 TargetProxy의 구현클래스이다.

Since:
5.0
Author:
kimhd

Field Summary
protected  String targetName
           
protected static ThreadLocal<Object> targetObject
           
 
Fields inherited from class kr.co.hit.live.aop.target.AbstractTargetProxy
targetInterface
 
Constructor Summary
ThreadLocalTargetProxy()
           
 
Method Summary
 Object invoke(Method method, Object[] args)
          실제 메소드 호출을 처리하는 로직을 구현한다.
 void setTargetName(String name)
           
 
Methods inherited from class kr.co.hit.live.aop.target.AbstractTargetProxy
getInterface, getServiceContainer, invoke, setInterface, setServiceContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetObject

protected static ThreadLocal<Object> targetObject

targetName

protected String targetName
Constructor Detail

ThreadLocalTargetProxy

public ThreadLocalTargetProxy()
Method Detail

setTargetName

public void setTargetName(String name)

invoke

public Object invoke(Method method,
                     Object[] args)
              throws Throwable
Description copied from class: AbstractTargetProxy
실제 메소드 호출을 처리하는 로직을 구현한다.

Specified by:
invoke in class AbstractTargetProxy
Returns:
메소드 호출 반환 값
Throws:
Throwable


Copyright © 2014. All Rights Reserved.