kr.co.hit.live.container.support
Class ServiceDefinition

java.lang.Object
  extended by kr.co.hit.live.container.support.ServiceDefinition

public class ServiceDefinition
extends Object

서비스의 정의 내용을 가진다. 서비스 설정파일로부터 서비스 설정 내용을 가져와서 이를 ServiceRegistry에 등록하기 위하여 사용된다.

Since:
4.0
Author:
김형도

Constructor Summary
ServiceDefinition(String sname, String infName, String className)
          생성자.
ServiceDefinition(String sname, String infName, String className, boolean isSingleton)
          생성자.
ServiceDefinition(String sname, String infName, String className, String interceptor, String init, String destroy, boolean isSingleton, boolean activated, boolean pre, int priority)
          생성자.
 
Method Summary
 void addArgument(ArgumentHolder ah)
          생성자 또는 Factory의 Argument 목록에 argument를 추가한다.
 void addProperty(PropertyHolder ph)
          Property 목록에 하나의 property를 추가한다.
 List<ArgumentHolder> getArguments()
          Constructor Injection 또는 Factory Instantiation을 위한 인수 목록을 리턴한다.
 String getDestroyMethod()
          서비스의 소멸 메소드 명을 리턴한다.
 String getFactoryClass()
          설정된 Factory의 클래스 명을 리턴한다.
 String getFactoryMethod()
          설정된 Factory 클래스의 메소드 명을 리턴한다.
 String getFactoryRef()
          설정된 Factory Object의 서비스명을 리턴한다.
 String getFromInfo()
           
 String getInitMethod()
          서비스의 초기화 메소드 명을 리턴한다.
 int getLoadPriority()
          적용 우선 순위 값을 리턴한다.
 List<PropertyHolder> getProperties()
          Setter Injection 을 위한 Property 목록을 리턴한다.
 PropertyHolder getProperty(int idx)
          idx 번째의 Property 항목을 리턴한다.
 int getPropertyCount()
          Property 목록 내의 개수를 리턴한다.
 String getServiceClass()
          서비스의 구현 클래스 명을 리턴한다.
 String getServiceInterceptor()
          Interceptor Proxy로 wrapping된 서비스의 경우에는 Interceptor 서비스 명을 리턴한다.
 String getServiceInterface()
          서비스의 인터페이스 명을 리턴한다.
 String getServiceName()
          서비스 명을 리턴한다.
 boolean hasConstructor()
          Constructor 가 설정되어 있는지 여부를 리턴한다.
 boolean hasFactory()
          Factory가 설정되어 있는지 여부를 리턴한다.
 boolean isActivated()
          서비스 활성화 여부를 리턴한다.
 boolean isPreInit()
          사전에 미리 생성할 지 여부를 리턴한다.
 boolean isSingleton()
          서비스가 singleton 인지 여부를 리턴한다.
 void setConstructor()
          컨스트럭터를 설정한다.
 void setFactory(String className, String refName, String methodName)
          Factory의 클래스와 메소드 명을 설정한다.
 void setFromInfo(String from)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceDefinition

public ServiceDefinition(String sname,
                         String infName,
                         String className)
생성자.

Parameters:
sname - 서비스 명
infName - 인터페이스 명
className - 클래스 명

ServiceDefinition

public ServiceDefinition(String sname,
                         String infName,
                         String className,
                         boolean isSingleton)
생성자.

Parameters:
sname - 서비스 명
infName - 인퍼페이스 명
className - 클래스 명
isSingleton - singleton 여부. true이면 singleton 객체로 생성

ServiceDefinition

public ServiceDefinition(String sname,
                         String infName,
                         String className,
                         String interceptor,
                         String init,
                         String destroy,
                         boolean isSingleton,
                         boolean activated,
                         boolean pre,
                         int priority)
생성자.

Parameters:
sname - 서비스 명
infName - 인퍼페이스 명
className - 클래스 명
interceptor - Proxy 서비스 객체명
init - 초기화 메소드 명
destroy - 소멸 메소드 명
isSingleton - singleton 여부. true이면 singleton 객체로 생성
Method Detail

setFromInfo

public void setFromInfo(String from)

getFromInfo

public String getFromInfo()

getInitMethod

public String getInitMethod()
서비스의 초기화 메소드 명을 리턴한다.

Returns:

getDestroyMethod

public String getDestroyMethod()
서비스의 소멸 메소드 명을 리턴한다.

Returns:

hasConstructor

public boolean hasConstructor()
Constructor 가 설정되어 있는지 여부를 리턴한다.

Returns:

hasFactory

public boolean hasFactory()
Factory가 설정되어 있는지 여부를 리턴한다.

Returns:

getFactoryClass

public String getFactoryClass()
설정된 Factory의 클래스 명을 리턴한다.

Returns:

getFactoryMethod

public String getFactoryMethod()
설정된 Factory 클래스의 메소드 명을 리턴한다.

Returns:

getFactoryRef

public String getFactoryRef()
설정된 Factory Object의 서비스명을 리턴한다.

Returns:

setConstructor

public void setConstructor()
컨스트럭터를 설정한다.


setFactory

public void setFactory(String className,
                       String refName,
                       String methodName)
Factory의 클래스와 메소드 명을 설정한다.

Parameters:
className -
methodName -

getServiceName

public String getServiceName()
서비스 명을 리턴한다.

Returns:

getServiceClass

public String getServiceClass()
서비스의 구현 클래스 명을 리턴한다.

Returns:

getServiceInterface

public String getServiceInterface()
서비스의 인터페이스 명을 리턴한다.

Returns:

getServiceInterceptor

public String getServiceInterceptor()
Interceptor Proxy로 wrapping된 서비스의 경우에는 Interceptor 서비스 명을 리턴한다.

Returns:

isActivated

public boolean isActivated()
서비스 활성화 여부를 리턴한다.

Returns:

isPreInit

public boolean isPreInit()
사전에 미리 생성할 지 여부를 리턴한다.

Returns:

getLoadPriority

public int getLoadPriority()
적용 우선 순위 값을 리턴한다.

Returns:

getProperties

public List<PropertyHolder> getProperties()
Setter Injection 을 위한 Property 목록을 리턴한다.

Returns:

getArguments

public List<ArgumentHolder> getArguments()
Constructor Injection 또는 Factory Instantiation을 위한 인수 목록을 리턴한다.

Returns:

getProperty

public PropertyHolder getProperty(int idx)
idx 번째의 Property 항목을 리턴한다.

Parameters:
idx -
Returns:

getPropertyCount

public int getPropertyCount()
Property 목록 내의 개수를 리턴한다.

Returns:

isSingleton

public boolean isSingleton()
서비스가 singleton 인지 여부를 리턴한다.

Returns:

addProperty

public void addProperty(PropertyHolder ph)
Property 목록에 하나의 property를 추가한다.

Parameters:
ph - 추가할 property

addArgument

public void addArgument(ArgumentHolder ah)
생성자 또는 Factory의 Argument 목록에 argument를 추가한다.

Parameters:
ah - 추가할 argument

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2014. All Rights Reserved.