kr.co.hit.live.batch
Interface BatchLogger

All Known Implementing Classes:
AbstractBatchLogger

public interface BatchLogger

배치 프로그램 수행 중 로그를 남기기 위하여 사용되는 Interface 클래스이다. 배치 로그는 구현되는 시스템에 따라서 달라기지 때문에 실제 구현은 해당 시스템에 맞도록 구현한다.

Author:
kimhd

Method Summary
 void closeOutFiles()
          배치 실행 중 생성된 결과 파일에 대한 종료 처리를 수행한다.
 void closeOutFileStream(String outFileName, boolean repositoryFlag)
          getOutFileStream()를 통하여 얻어진 OutputStream 객체에 대한 종료 처리를 수행한다.
 void closeOutFileWriter(String outFileName, boolean repositoryFlag)
          getOutFileWriter()를 통하여 얻어진 Writer 객체에 대한 종료 처리를 수행한다.
 ServiceContext getContext()
          설정된 ServiceContext 객체를 반환한다.
 OutputStream getOutFileStream(String outFileName)
          배치 실행 중 이진 결과 파일을 출력을 위한 OutputStream 객체를 반환한다.
 Writer getOutFileWriter(String outFileName)
          배치 실행 중 결과 파일을 출력을 위한 Writer 객체를 반환한다.
 Object getStatus(String key)
          배치 프로그램의 현재 수행 상태 값을 가져온다.
 Object getStatus(String key, Object defValue)
          배치 프로그램의 현재 수행 상태 값을 가져온다.
 void logEnd(boolean succ)
          배치 프로그램애 종요할 때 로그를 남긴다.
 void logEnd(boolean succ, String message)
          배치 프로그램애 종요할 때 로그를 남긴다.
 void logMessage(String message)
          배치 프로그램 수행중 로그 메시지를 남긴다.
 void logStart(String batchTarget, String[] args)
          배치 프로그램이 시작할때 로그를 남긴다.
 void logStatus()
          배치 프로그램의 현재 수행 상태로 설정된 값들을 로그로 남긴다.
 void setContext(ServiceContext ctx)
          배치 로그를 남기기 위하여 필요한 ServiceContext 객체를 설정한다.
 void setStatus(String key, Object status)
          배치 프로그램 현재 수행 상태를 설정한다.
 

Method Detail

setContext

void setContext(ServiceContext ctx)
배치 로그를 남기기 위하여 필요한 ServiceContext 객체를 설정한다.

Parameters:
ctx -

getContext

ServiceContext getContext()
설정된 ServiceContext 객체를 반환한다.

Returns:
설정된 ServiceContext 객체

logStart

void logStart(String batchTarget,
              String[] args)
              throws LiveException
배치 프로그램이 시작할때 로그를 남긴다.

Parameters:
batchTarget - 실행할 배치 클래스명 또는 배치 서비스 명
Throws:
LiveException

logEnd

void logEnd(boolean succ,
            String message)
            throws LiveException
배치 프로그램애 종요할 때 로그를 남긴다. 정상 처리여부와 처리 결과 메시지를 파라메터를 받는다.

Parameters:
succ -
message -
Throws:
LiveException

logEnd

void logEnd(boolean succ)
            throws LiveException
배치 프로그램애 종요할 때 로그를 남긴다. 정상 처리여부를 파라메터로 받는다.

Parameters:
succ -
Throws:
LiveException

logMessage

void logMessage(String message)
                throws LiveException
배치 프로그램 수행중 로그 메시지를 남긴다.

Parameters:
message -
Throws:
LiveException

setStatus

void setStatus(String key,
               Object status)
배치 프로그램 현재 수행 상태를 설정한다.

Parameters:
key - 상태 명
status - 상태 값

getStatus

Object getStatus(String key)
배치 프로그램의 현재 수행 상태 값을 가져온다.

Parameters:
key -
Returns:
key에 대한 상태 값

getStatus

Object getStatus(String key,
                 Object defValue)
배치 프로그램의 현재 수행 상태 값을 가져온다.

Parameters:
key -
defValue -
Returns:
key에 대한 상태 값(없으면 defValue)

logStatus

void logStatus()
               throws LiveException
배치 프로그램의 현재 수행 상태로 설정된 값들을 로그로 남긴다.

Throws:
LiveException

getOutFileWriter

Writer getOutFileWriter(String outFileName)
                        throws LiveException
배치 실행 중 결과 파일을 출력을 위한 Writer 객체를 반환한다.

Parameters:
outFileName -
Returns:
Writer
Throws:
LiveException

getOutFileStream

OutputStream getOutFileStream(String outFileName)
                              throws LiveException
배치 실행 중 이진 결과 파일을 출력을 위한 OutputStream 객체를 반환한다.

Parameters:
outFileName -
Returns:
Writer
Throws:
LiveException

closeOutFileWriter

void closeOutFileWriter(String outFileName,
                        boolean repositoryFlag)
getOutFileWriter()를 통하여 얻어진 Writer 객체에 대한 종료 처리를 수행한다.

Parameters:
outFileName -
repositoryFlag - 종료 처리시 별도 저장소에 저장여부

closeOutFileStream

void closeOutFileStream(String outFileName,
                        boolean repositoryFlag)
getOutFileStream()를 통하여 얻어진 OutputStream 객체에 대한 종료 처리를 수행한다.

Parameters:
outFileName -
repositoryFlag - 종료 처리시 별도 저장소에 저장여부

closeOutFiles

void closeOutFiles()
배치 실행 중 생성된 결과 파일에 대한 종료 처리를 수행한다.



Copyright © 2014. All Rights Reserved.