Class GlueMessageSender

java.lang.Object
com.poscoict.glueframework.biz.activity.GlueActivity<GlueContext>
com.poscoict.glueframework.ucube.activity.GlueMessageSender

public class GlueMessageSender extends GlueActivity<GlueContext>
GlueMessageSender Activity. u-CUBE3 를 이용한 Message Sender.
 Activity Property

 - sender : (필수) Message(TC,File)을 송신 하는 component. application.xml 의 bean id.

 - interface-id : (필수) u-CUBE3 의 interface id.

 - interface-type : (필수) interface type.
       tc 또는 file

 - message : (필수) 보내고자 하는 message를 담고 있는 ctx의 key.
       String, List<String>, Map<String, List< String>> 형태의 data가 ctx에 담겨있음.



 예제
 
 사용 예# 1

     <activity name="Custom" class="...">
         <transition name="success" value="Message Send" />
     </activity>
     <activity name="Message Send" class="com.poscoict.glueframework.ucube.activity.GlueMessageSender">
         <property name="message" value="stringObj"/>
         <property name="interface-type" value="tc"/>
         <property name="interface-id" value="IF_12345"/>
         <property name="sender" value="ucubeManager"/>
         <transition name="success" value="end"/>
     </activity>


 사용 예# 2

     <activity name="Custom" class="...">
         <transition name="success" value="Message Send" />
     </activity>
     <activity name="Message Send" class="com.poscoict.glueframework.ucube.activity.GlueMessageSender">
         <property name="message" value="fileObj"/>
         <property name="interface-type" value="file"/>
         <property name="interface-id" value="IF_12345"/>
         <property name="sender" value="ucubeManager"/>
         <transition name="success" value="end"/>
     </activity>



 참고 : applicationContext.xml

     <bean id="ucubeManager" class="com.poscoict.glueframework.ucube.GlueUCubeManagerImpl">
         <property name="configFile" value="C://SEND.xml"/>
     </bean>


 참고 : Java Code (Custom)

     ctx.put( "stringObj", "MSGFW001........................." );
     List<String> tcList = new ArrayList<String>();
     tcList.add( "MSGFW001........................." );
     tcList.add( "MSGFW001........................." );
     ctx.put( "tcList", tcList );
     Map<String, List<String>> tcListMap = new HashMap<String, List<String>>();
     map.put("MSGFW001", tcList);
     map.put("MSGFW002", tcList2);
     ctx.put( "tcListMap", tcListMap );
     ctx.put( "fileObj", "/APP/CHAIN/MSGFW001.dat");
 
  • Constructor Details

    • GlueMessageSender

      public GlueMessageSender()
  • Method Details

    • runActivity

      public String runActivity(GlueContext ctx)
      Description copied from class: GlueActivity
      Sub Class에서 반드시 구현하여야 하는 Abstract Method 이며 이 Method는 F/W에서 호출한다. 결과 값은 GlueContext에 담아서 다음 Activity 또는 F/W에 전달하게 된다. 필요한 모든 Data는 GlueContext에서 호출하여 사용하게 된다.
      
       예)
       <transition name="success" value="BizLogic"/>
       <transition name="failure" value="ErrorHandle"/>
       ==> return "success"이면 BizLogic Activity 를 실행함.
       
      Specified by:
      runActivity in class GlueActivity<GlueContext>
      Parameters:
      ctx - GlueContext
      Returns:
      String 정상적이면 "success"를 Return 하고 비정상 처리를 원하면 "failure"를 Return 한다.