|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkr.co.hit.live.config.impl.PropertiesConfiguratorImpl
public class PropertiesConfiguratorImpl
Configurator의 Property로 구성된 파일을 처리하는 구현 클래스이다. Property 형태로 구성 파일을 정의할 때 "${" 와 "}" 로 둘러싸인 형태의 참조변수 정의가 가능하다. 참조 변수는 실제 값으로 치환되어 반환된다.
| Field Summary | |
|---|---|
protected static Properties |
prop
LiveFramework의 구성 파일을 메모리에 적재하기 위한 property 오브젝트. |
| Constructor Summary | |
|---|---|
PropertiesConfiguratorImpl()
|
|
| Method Summary | |
|---|---|
void |
clear()
설정 정보 clear |
void |
doConfigure(InputStream stream)
ConfiguratorFactory로 부터 파라메터로 받은 configuration file의 InputStream을 읽어서 메모리에 적재하는 초기화 로직. |
boolean |
getBoolean(String key)
시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 boolean형(primitive)으로 리턴한다. |
boolean |
getBoolean(String key,
boolean defaultValue)
시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 boolean형(primitive)으로 리턴한다. |
int |
getInt(String key)
<시스템 프로퍼티 또는 strong>Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 int형(primitive)으로 리턴한다. |
int |
getInt(String key,
int defaultValue)
시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 int형(primitive)으로 리턴한다. |
Set<Object> |
getKeySet()
Configuration으로 정의된 항목들의 Key 집합을 리턴한다. |
long |
getLong(String key)
시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 long형(primitive)으로 리턴한다. |
long |
getLong(String key,
long defaultValue)
시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 long형(primitive)으로 리턴한다. |
String |
getPath(String key,
String defaultPath)
시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 파일 경로 문자열로 리턴한다. |
String |
getString(String key)
시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 String형으로 리턴한다. |
String |
getString(String key,
String defaultValue)
시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 String형으로 리턴한다. |
void |
validate(ConfigurationValidator validator)
주어진 ConfigurationValidator 사용하여 구성정보를 검증한다. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static Properties prop
LiveFramework의 구성 파일을 메모리에 적재하기 위한 property 오브젝트.
| Constructor Detail |
|---|
public PropertiesConfiguratorImpl()
| Method Detail |
|---|
public void doConfigure(InputStream stream)
throws ConfiguratorException
Configurator
ConfiguratorFactory로 부터 파라메터로 받은 configuration file의
InputStream을 읽어서 메모리에 적재하는 초기화 로직.
doConfigure in interface Configuratorstream - configuration file의 stream 오브젝트.
ConfiguratorException - 읽혀지는 InputStream의 IOException 발생시.public void clear()
Configurator
clear in interface Configurator
public String getString(String key)
throws ConfiguratorException
Configurator시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 String형으로 리턴한다.
getString in interface Configuratorkey - 원하고자하는 key값
ConfiguratorException - key값이 configuration file에 존재하지 않을 경우 발생
public String getString(String key,
String defaultValue)
Configurator시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 String형으로 리턴한다.
getString in interface Configuratorkey - 원하고자하는 key값defaultValue - 값이 없을 경우 default값
public int getInt(String key)
throws ConfiguratorException
Configurator<시스템 프로퍼티 또는 strong>Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 int형(primitive)으로 리턴한다.
getInt in interface Configuratorkey - 원하고자하는 key값.
ConfiguratorException - value값이 int형으로 가져올 수 없는 데이터 형 일 경우 : NumberFormatExcetion.
public int getInt(String key,
int defaultValue)
Configurator시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 int형(primitive)으로 리턴한다.
getInt in interface Configuratorkey - 원하고자하는 key값.defaultValue - 값이 없을 경우 default값
public boolean getBoolean(String key)
throws ConfiguratorException
Configurator시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 boolean형(primitive)으로 리턴한다.
getBoolean in interface Configuratorkey - 원하고자하는 key값.
ConfiguratorException - value값이 boolean형으로 가져올 수 없는 데이터 형 일 경우.
public boolean getBoolean(String key,
boolean defaultValue)
Configurator시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 boolean형(primitive)으로 리턴한다.
getBoolean in interface Configuratorkey - 원하고자하는 key값.defaultValue - 값이 없을 경우 default값
public long getLong(String key)
throws ConfiguratorException
Configurator시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 long형(primitive)으로 리턴한다.
getLong in interface Configuratorkey - 원하고자하는 key값.
ConfiguratorException - value값이 long형으로 가져올 수 없는 데이터 형 일 경우.
public long getLong(String key,
long defaultValue)
Configurator시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 long형(primitive)으로 리턴한다.
getLong in interface Configuratorkey - 원하고자하는 key값.defaultValue - 값이 없을 경우 default값
public String getPath(String key,
String defaultPath)
Configurator시스템 프로퍼티 또는 Configurator에 의해 메모리에 로드된 configuration file의 원하고자 하는 특정 key를 인자로 하여 해당 Value를 파일 경로 문자열로 리턴한다. 문자열에 포함된 디렉토리 분리 문자를 OS에 맞는 문자로 통일시킨다.
getPath in interface Configuratorkey - 원하고자하는 key값
public Set<Object> getKeySet()
ConfiguratorConfiguration으로 정의된 항목들의 Key 집합을 리턴한다.
getKeySet in interface Configurator
public void validate(ConfigurationValidator validator)
throws ConfiguratorException
Configurator
validate in interface ConfiguratorConfiguratorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||