com.poscoict.glueframework.biz.activity
Class GlueMessageParse

java.lang.Object
  extended by com.poscoict.glueframework.biz.activity.GlueActivity<GlueContext>
      extended by com.poscoict.glueframework.biz.activity.GlueMessageParse

public class GlueMessageParse
extends GlueActivity<GlueContext>

MessageParse Activity. GlueMessageParse Activity´Â TC(String) ¶Ç´Â File¿¡ ´ã±ä TC(String) ¸¦ LayoutÀ¸·Î ParseÇÏ¿© GlueMessage Instance¸¦ »ý¼ºÇÏ´Â ±â´ÉÀ» ¼öÇàÇÑ´Ù.
byte parsing ½Ã Encoding ¿ì¼±¼øÀ§´Â ´ÙÀ½°ú °°´Ù.
1. charset-name property
2. charset property
3. jvm default

 Activity Property
 - layout : (Çʼö) applicationContext.xmlÀÇ GlueLayoutManager bean id.
 
 - message-id : (¼±ÅÃ) msg key. layout/{message-id}-msg.xml Âü°í ±Ù°Å. 
      [ default ] ctx.get("ReceiveTC")ÀÇ °ª¿¡¼­ ÃßÃâÇÔ.
      String s = (String)ctx.get("ReceiveTC"); 
      String msg_id = s.substring(0, id_length);
  
 - id-length : (¼±ÅÃ) "ReceiveTC"¿¡ ÇØ´çÇÏ´Â StringÀÇ substring ±âÁØ. message-id°¡ Á¤ÀǵǾî ÀÖ´Â °æ¿ì, id-length´Â »ç¿ëµÇÁö ¾ÊÀ½. 
          [ default ] : 8
 
 - charset : (¼±ÅÃ) ParseTypeÀÌ byte ÀÏ °æ¿ì »ç¿ëµÊ. °íÁ¤°ª. 
 
 - charset-name : (¼±ÅÃ) ParseTypeÀÌ byte ÀÏ °æ¿ì »ç¿ëµÊ. µ¿Àû°ª.
 
 
 
 ¿¹Á¦
 »ç¿ë ¿¹# 1
 - ÃÖ¼Ò»ç¿ë
 
     <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
         <property name="layout" value="layoutInXml" />
         <transition name="success" value="BizLogic" />
     </activity>
 
 
 »ç¿ë ¿¹# 2
 - message-id °¡ ¼ö½ÅData["ReceiveTC"] ¿¡¼­ ÃßÃâÇÏ´Â °Í°ú ´Ù¸¦ °æ¿ì
 
     <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
         <property name="layout" value="layoutInXml" />
         <property name="message-id" value="MSGFW001" />
         <transition name="success" value="BizLogic" />
     </activity>
 
 
 »ç¿ë ¿¹# 3
 - message-id °¡ ÁÖ¾îÁöÁö ¾Ê¾Æ ¼ö½ÅData["ReceiveTC"] ¿¡¼­ ÃßÃâÇؾßÇÏ´Â °æ¿ì.
 
     <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
         <property name="layout" value="layout" />
         <property name="id-length" value="8" />
         <transition name="success" value="BizLogic" />
     </activity>
 
 
 »ç¿ë ¿¹# 4
 - charset-name »ç¿ë½Ã.. ctx.get(this.getProperty("charset-name")) ÀÇ °ªÀÌ »ç¿ëµÊ.
 
     <activity name="Custom" class="...">
         <transition name="success" value="Parse" />
     </activity>
     <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
         <property name="layout" value="layout" />
         <property name="charset-name" value="encoding" />
         <transition name="success" value="BizLogic" />
     </activity>
 
 
 »ç¿ë ¿¹# 5
 - charset »ç¿ë½Ã activity property value°¡ »ç¿ëµÊ.
 
     <activity name="Parse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
         <transition name="success" value="SetMessageKey" />
         <property name="layout" value="layout" />
         <property name="charset" value="UTF-8" />
     </activity>
 
 
 
 Âü°í : applicationContext.xml
 
     <bean id="layoutInXml" class="com.poscoict.glueframework.message.layout.GlueXmlMessageLayout">
         <property name="cacheManager" ref="cacheManager"/>
     </bean>
     <bean id="layoutInDB" class="com.poscoict.glueframework.message.layout.GlueDBMessageLayout">
         <property name="dao" ref="layout-dao"/>
         <property name="cacheManager" ref="cacheManager"/>
     </bean>
     <bean id="cacheManager" class="..."/>
     <bean id="layout-dao" class="..."/>
 
 
 Âü°í : Java Code (Custom)
 
     ctx.put("encoding", "UTF-8");
 
 
 Âü°í : glue.properties
 
     msg.parsing.type=byte
 
 
 Âü°í : GlueConText ±¸¼º - ReceiveTC, ReceiveTCTypeÀº Çʼö.
 
     ctx.put("ReceiveTC", "MSGFW001R10aaa           seoul        ");
     ctx.put("ReceiveTCMsg", "MSGFW001R10aaa           seoul        ");
     ctx.put("ReceiveTCType", "T")
     //ctx.put("ReceiveTC", new File("/APP/CHAIN/MSGFW002_20130201.dat"));
     //ctx.put("ReceiveTCMsg", "MSGFW002/APP/CHAIN/MSGFW002_20130201.dat"); 
     //ctx.put("ReceiveTCType", "F")
 


Field Summary
static int DEFAULT_MSG_ID_LENGTH
           
 
Fields inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
dynamicProperties, logger
 
Constructor Summary
GlueMessageParse()
           
 
Method Summary
 String runActivity(GlueContext ctx)
          Sub Class¿¡¼­ ¹Ýµå½Ã ±¸ÇöÇÏ¿©¾ß ÇÏ´Â Abstract Method À̸ç ÀÌ Method´Â F/W¿¡¼­ È£ÃâÇÑ´Ù.
 
Methods inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
commitTransaction, commitTransaction, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, rollbackTransaction, rollbackTransaction, setEventList, setName, setProperty, setTransition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MSG_ID_LENGTH

public static final int DEFAULT_MSG_ID_LENGTH
See Also:
GlueHttpReceiverAdapter, Constant Field Values
Constructor Detail

GlueMessageParse

public GlueMessageParse()
Method Detail

runActivity

public String runActivity(GlueContext ctx)
Description copied from class: GlueActivity
Sub Class¿¡¼­ ¹Ýµå½Ã ±¸ÇöÇÏ¿©¾ß ÇÏ´Â Abstract Method À̸ç ÀÌ Method´Â F/W¿¡¼­ È£ÃâÇÑ´Ù. °á°ú °ªÀº GlueContext¿¡ ´ã¾Æ¼­ ´ÙÀ½ Activity ¶Ç´Â F/W¿¡ Àü´ÞÇÏ°Ô µÈ´Ù. ÇÊ¿äÇÑ ¸ðµç Data´Â GlueContext¿¡¼­ È£ÃâÇÏ¿© »ç¿ëÇÏ°Ô µÈ´Ù.

Specified by:
runActivity in class GlueActivity<GlueContext>
Parameters:
ctx - GlueContext
Returns:
String Á¤»óÀûÀ̸é "success"¸¦ Return ÇÏ°í ºñÁ¤»ó 󸮸¦ ¿øÇϸé "failure"¸¦ Return ÇÑ´Ù.
 ¿¹) 
 <transition name="success" value="BizLogic"/>
 <transition name="failure" value="ErrorHandle"/>
 ==> return "success"À̸é BizLogic Activity ¸¦ ½ÇÇàÇÔ.
 


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