|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.poscoict.glueframework.message.layout.GlueAbstractFixedLengthMessageLayout
public abstract class GlueAbstractFixedLengthMessageLayout
GlueMessageLayout ÀÇ Ãß»ó Ŭ·¡½º.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
logger |
static String |
MSG_TYPE_BYTE
|
static String |
MSG_TYPE_STRING
|
static String |
RULE_NUMBER_NULL_TO_ZERO
|
static String |
RULE_STRING_ZERO_TO_SPACE
|
| Constructor Summary | |
|---|---|
GlueAbstractFixedLengthMessageLayout()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
abstract GlueMessage |
createMessageObject(String message)
|
void |
destroy()
|
GlueMessageDefinition |
getAttributes(String key)
ÇØ´ç Msg LayoutÀÇ Attribute Á¤º¸¸¦ ÃßÃâÇÏ´Â Method óÀ½ È£Ãâ½Ã AttributeÀÇ Á¤º¸¸¦ Cache¿¡ ÀúÀåÇϰí, Àç È£Ãâ½Ã Cache¸¦ ÅëÇØ Á¤º¸¸¦ ÃßÃâÇÏ¿© Á¦°ø |
abstract List<GlueMessageAttributeDefinition> |
getAttributesDefinition(String id)
|
GlueCacheManager |
getCacheManager()
|
Charset |
getCharset()
|
Set<String> |
getMsgParsingRule()
|
String |
getMsgParsingType()
Message Parsing TypeÀ» °¡Á®¿Â´Ù. |
GlueMessage |
makeMessageParsing(GlueMessageDefinition messageDefinition,
String tc)
Message Layout Ç׸ñ Á¤º¸¿¡ µû Message¸¦ ÆÄ½ÌÇÏ¿© GlueMessage °´Ã¼¿¡ ´ã´Â´Ù. |
String |
makeMessageString(GlueMessageDefinition messageDefinition,
GlueMessage message)
Message Layout¿¡ µû¶ó ÇØ´ç Message¸¦ »ý¼ºÇÑ´Ù. |
void |
setCacheManager(GlueCacheManager cacheManager)
setter method for DI. |
void |
setCharset(Charset charset)
setter method for DI. |
void |
setMsgParsingRule(Set<String> msgParsingRule)
|
void |
setMsgParsingType(String msgParsingType)
setter method for DI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MSG_TYPE_BYTE
public static final String MSG_TYPE_STRING
public static final String RULE_NUMBER_NULL_TO_ZERO
public static final String RULE_STRING_ZERO_TO_SPACE
protected org.slf4j.Logger logger
| Constructor Detail |
|---|
public GlueAbstractFixedLengthMessageLayout()
| Method Detail |
|---|
public GlueCacheManager getCacheManager()
public void setCacheManager(GlueCacheManager cacheManager)
cacheManager - public String getMsgParsingType()
public void setMsgParsingType(String msgParsingType)
msgParsingType - message Parsing Type, byte or Stringpublic Set<String> getMsgParsingRule()
public void setMsgParsingRule(Set<String> msgParsingRule)
public Charset getCharset()
public void setCharset(Charset charset)
charset -
public String makeMessageString(GlueMessageDefinition messageDefinition,
GlueMessage message)
GlueMessageLayout
[Message Byte »ý¼º ±ÔÄ¢]
1. Data Type : String
DataType : STRING, CHAR, VARCHAR2 ¸ðµÎ µ¿ÀÏÇÏ°Ô StringÀ¸·Î °£ÁÖ
String Data°¡ LayoutÀÇ Lengthº¸´Ù ÀÛÀ»¶§ : Length¸¸Å ¿À¸¥ÂÊ °ø¹é Ãß°¡
String Data°¡ LayoutÀÇ Lengthº¸´Ù Ŭ¶§ : Length¸¸Å ¿ÞÂÊ ±âÁØÀ¸·Î ÀÚ¸§
´Ü, StringÀÌ Null, ""(zero Length) ÀÏ °æ¿ì : Length¸¸Å °ø¹é »ý¼º
´Ü, StringÀ» Byte Length »ý¼º½Ã String Áß°£Àý»èÀÏ °æ¿ì ±úÁø String ±×´ë·Î ó¸®ÇÔ.
¿¹) 123ÇÑ(Length:4) : 123?
2. Data Type : Number
1) Truncateó¸®
2) ¿À¸¥ÂÊ Shift
3) Cut
Number Data°¡ LayoutÀÇ Lengthº¸´Ù ÀÛÀ»¶§ : Length¸¸Å ¿ÞÂÊÀ¸·Î '0' Ãß°¡
¿¹) -123(Length:5) : -0123
Number Data°¡ LayoutÀÇ Lengthº¸´Ù Ŭ¶§ : Length¸¸Å ¿ÞÂÊ ±âÁØÀ¸·Î ÀÚ¸§
´Ü, '-', '.'µµ 1 Byte·Î °£ÁÖÇÑ´Ù.
´Ü, Number°¡ Null, ""(zero Length) ÀÏ °æ¿ì : Length¸¸Å °ø¹é »ý¼º
3. Data Type : Date
Date°´Ã¼¿¡¼ ÇØ´ç Length¿¡ ¸ÂÃç °ªÀ» °¡Á®¿È.
[Áö¿øÇÏ´Â Date Type]
Length(14) : yyyyMMddHHmmss
Length(12) : yyyyMMddHHmm
Length(10) : yyyyMMddHH
Length(8) : yyyyMMdd
Length(6) : yyyyMM
Length(4) : yyyy
´Ü, Date°¡ Null, ""(zero Length) ÀÏ °æ¿ì : Length¸¸Å °ø¹é »ý¼º
makeMessageString in interface GlueMessageLayoutmessageDefinition - Message LayoutÀÇ AttributeÇ׸ñ Listmessage - GlueMessage °´Ã¼
public GlueMessage makeMessageParsing(GlueMessageDefinition messageDefinition,
String tc)
throws GlueMessageParserException
GlueMessageLayout
[Message Byte ÆÄ½Ì ±ÔÄ¢]
1. Data Type : String
-DataType : STRING, CHAR, VARCHAR2 ¸ðµÎ µ¿ÀÏÇÏ°Ô StringÀ¸·Î °£ÁÖ
-String Data¸¦ ÀÚ¸¥ÈÄ Rigth Trimó¸®ÇÏ¿© Message °´Ã¼¿¡ ÀúÀå
´Ü, String ÆÄ½Ì½Ã String Áß°£ Àý»èÀÌ µÉ °æ¿ì ±úÁø»óÅ·Π»ý¼º.
¿¹) 123ÇѱÛ1 : ¾Õ String(Length:4) -> 123?
µÚ String(Length:4) -> ?±Û1
´Ü, Message °ø¹é½Ã -> ""(Empty String)
2. Data Type : Number
1) Cut
´Ü, '-', '.'µµ 1 Byte·Î °£ÁÖÇÑ´Ù.
2) Right Trim
3) ¿ÞÂÊÀ¸·Î Shift
4) Number »ý¼ºÈÄ Message °´Ã¼¿¡ ÀúÀå
´Ü, NumberÀ϶§ À߸øµÈ ÆÄ½ÌÀ¸·Î String Áß°£ Àý»è½Ã Exceptionó¸®
´Ü, Message °ø¹é½Ã -> null(Default)
Number Message °ø¹é½Ã ó¸® Option
1) Message °ªÀÌ Zero -> null
2) Message °ªÀÌ Space -> Zero
3) 1,2 µ¿½Ã
Message °ªÀÌ Zero -> null
Message °ªÀÌ Space -> Zero
3. Data Type : Date
1) Length¸¸Å Cut
2) Date Type¿¡ ¸ÂÃç Date °´Ã¼ »ý¼ºÈÄ Message °´Ã¼¿¡ ÀúÀå
[Áö¿øÇÏ´Â Date Type]
Length(14) : yyyyMMddHHmmss
Length(12) : yyyyMMddHHmm
Length(10) : yyyyMMddHH
Length(8) : yyyyMMdd
Length(6) : yyyyMM
Length(4) : yyyy
´Ü, DateÀ϶§ À߸øµÈ ÆÄ½ÌÀ¸·Î String Áß°£ Àý»è½Ã Exceptionó¸®
´Ü, Message °ø¹é½Ã -> null
makeMessageParsing in interface GlueMessageLayoutmessageDefinition - Objecttc - Message ¹®ÀÚ¿
GlueMessageParserExceptionpublic abstract GlueMessage createMessageObject(String message)
public GlueMessageDefinition getAttributes(String key)
throws GlueMessageDefinitionException
GlueMessageLayout
getAttributes in interface GlueMessageLayoutkey - Message ID
GlueMessageDefinitionExceptionpublic abstract List<GlueMessageAttributeDefinition> getAttributesDefinition(String id)
id -
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
public void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||