com.poscoict.glueframework.biz.control
Class GlueServiceLoader

java.lang.Object
  extended by com.poscoict.glueframework.biz.control.GlueServiceLoader
All Implemented Interfaces:
GlueCacheLoader, org.springframework.beans.factory.InitializingBean

public class GlueServiceLoader
extends Object
implements GlueCacheLoader, org.springframework.beans.factory.InitializingBean

CacheLoader 구현체. GlueServiceLoader는 Cache에서 해당 Service객체(GlueService)를 찾고 없으면 Service.xml을 읽어서 Cache에 저장한다.

 Bean Property
 
 - rootPath : (필수) default는 'service'
 
 - extraServiceFiles : (선택) 
 
 
 
 예제
 사용 예# 1
 
     <bean id="serviceLoader" class="com.poscoict.glueframework.biz.control.GlueServiceLoader"/>
 
 
 사용 예# 2
 
     <bean id="serviceLoader" class="com.poscoict.glueframework.biz.control.GlueServiceLoader">
         <property name="rootPath" value="service"/>
     </bean>
 
 
 사용 예# 3
 
     <bean id="serviceLoader" class="com.poscoict.glueframework.biz.control.GlueServiceLoader">
         <property name="extraServiceFiles">
             <list>
                 <value>extra/security-serivce.xml</value>
             </list>
         </property>
     </bean>
 


Constructor Summary
GlueServiceLoader()
          생성자(constructor).
 
Method Summary
 void afterPropertiesSet()
           
 String getRootPath()
          getter method.
 Object loadCacheObject(Object cacheKey, String regionName)
          주어진 캐쉬 영역명에 해당하는 캐쉬영역에서 캐쉬 키를 사용하여 오브젝트를 로딩함
 void setExtraServiceFiles(List<String> extraServiceFiles)
          setter method for DI.
 void setRootPath(String serviceRootPath)
          setter method for DI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueServiceLoader

public GlueServiceLoader()
생성자(constructor).

Method Detail

getRootPath

public String getRootPath()
getter method.

Returns:
Service Root Path, it depends on Thread.currentThread().getContextClassLoader()

setRootPath

public void setRootPath(String serviceRootPath)
setter method for DI.

Parameters:
serviceRootPath -
 2가지 type이 가능하며, 경로와 property name임 
 첫번째는 경로일 경우로 상대경로이며, 디렉토리 구분은 슬래시(/)나 역슬래시 (\)로 해야함. 
 두번째는 property name일 경우로 glue.properties에 들어가는 key를 사용함.
 serviceRootPath it depends on Thread.currentThread().getContextClassLoader()
 
 <bean id="serviceLoader" class="com.poscoict.glueframework.biz.control.GlueServiceLoader">
     <property name="rootPath" value="service"/>
 </bean>
 

setExtraServiceFiles

public void setExtraServiceFiles(List<String> extraServiceFiles)
setter method for DI.


loadCacheObject

public Object loadCacheObject(Object cacheKey,
                              String regionName)
                       throws GlueException
Description copied from interface: GlueCacheLoader
주어진 캐쉬 영역명에 해당하는 캐쉬영역에서 캐쉬 키를 사용하여 오브젝트를 로딩함

Specified by:
loadCacheObject in interface GlueCacheLoader
Parameters:
cacheKey - 캐쉬 키
regionName - 캐쉬 영역명
Returns:
캐쉬된 오브젝트
Throws:
GlueException - - 캐쉬관련 에러발생 시

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception


Copyright © 2013–2017 POSCO ICT. All rights reserved.