com.poscoict.glueframework.web
Class GlueHttpReceiverAdapter

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.poscoict.glueframework.web.GlueHttpReceiverAdapter
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class GlueHttpReceiverAdapter
extends HttpServlet

Http Receiver Servlet. ¿ÜºÎ ½Ã½ºÅÛÀ¸·ÎºÎÅÍ HttpRequest ¹æ½ÄÀ¸·Î Data¸¦ ¼ö½Å¹ÞÀº ¸ðµâ. EAI¿¡¼­ Àü¼ÛµÇ´Â Message(Àü¹®)¸¦ ¼ö½ÅÇÏ¿©, Biz Controller·Î Àü¼ÛÇÏ´Â Receiver ClassÀÌ´Ù. POST¹æ½ÄÀÇ Request¸¸ ¼ö½ÅÇϸç, GETÀÇ °æ¿ì´Â Error¸¦ ReturnÇÑ´Ù.(SC_FORBIDDEN)

 web.xml ÆÄÀÏ ³»¿ë
 <servlet>
     <servlet-name>HttpReceiver</servlet-name>
     <servlet-class>com.poscoict.glueframework.web.GlueHttpReceiverAdapter</servlet-class>
     <init-param>
         <param-name>UD_SC_SUCCESS</param-name>
         <param-value>200</param-value>
     </init-param>
 </servlet>
 <servlet-mapping>
     <servlet-name>HttpReceiver</servlet-name>
     <url-pattern>*.tc</url-pattern>
 </servlet-mapping>
 
 url
 http://://HttpReceiver.tc
 
 init-param
 GlueHttpReceiverAdapter servletÀÇ init-paramÀº ´ÙÀ½°ú °°´Ù. 
 - UD_SC_SUCCESS : HttpResponse Á¤»ó »óÅÂÄÚµå Á¤ÀÇ, default 900 
 - UD_SC_RESEND : HttpResponse Àç¼Û½Å »óÅÂÄÚµå Á¤ÀÇ, default 600
 - UD_SC_FAILURE : HttpResponse ¿¡·¯ »óÅÂÄÚµå Á¤ÀÇ, default 700
 - TC_LENGTH : GlueService ½ÇÇà IDÀÇ ±æÀÌ(TC IDÀÇ ±æÀÌ) Á¤ÀÇ, default 8 
 - NAME_IFD : HttpRequestÀÇ parameter Áß InterfaceID, default ifd
 - NAME_MESSAGE : HttpRequestÀÇ parameter Áß tc(message ¶Ç´Â file°æ·Î), default message
 - NAME_TIMESTAMP : HttpRequestÀÇ parameter Áß ½Ã°£Á¤º¸, default timestamp 
 - NAME_SEQUENCE : HttpRequestÀÇ parameter Áß sequence Á¤º¸, default sequence
 - NAME_TYPE : HttpRequestÀÇ parameter Áß type Á¤º¸, default type. ex type=T ¶Ç´Â type=F 
 
 logging ¿É¼Ç
 - debug.httpreceiver : Java ¿É¼ÇÀ¸·Î ¸í½ÃÀû false¸¦ ÁöÁ¤ÇÒ °æ¿ì ¿£Áø·Î±×(System.out.println())¸¦ ³²±âÁö ¾ÊÀ½.
 

See Also:
Serialized Form

Field Summary
static int DEFAULT_MSG_ID_LENGTH
           
protected  Hashtable<String,String> requestMap
          ÇöÀç ó¸®ÁßÀÎ request Á¤º¸¸¦ °ü¸®.
protected  int transactionCodeIdLength
           
static int UD_SC_FAILURE
           
static int UD_SC_OK
           
static int UD_SC_RESEND
           
protected  int userDefinedStatusCodeSuccess
           
protected  int userDefinedStatusCodeSuccessfailure
           
protected  int userDefinedStatusCodeSuccessResend
           
 
Constructor Summary
GlueHttpReceiverAdapter()
           
 
Method Summary
protected  GlueAuditAttributes createGlueAtuditAttribute(HttpServletRequest request, GlueContext ctx)
           
 void doGet(HttpServletRequest request, HttpServletResponse response)
           
 void doPost(HttpServletRequest request, HttpServletResponse response)
           
 void init(ServletConfig config)
           
protected  boolean isValidMsg(String msg)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UD_SC_OK

public static final int UD_SC_OK
See Also:
Constant Field Values

UD_SC_RESEND

public static final int UD_SC_RESEND
See Also:
Constant Field Values

UD_SC_FAILURE

public static final int UD_SC_FAILURE
See Also:
Constant Field Values

DEFAULT_MSG_ID_LENGTH

public static final int DEFAULT_MSG_ID_LENGTH
See Also:
GlueMessageParse, Constant Field Values

requestMap

protected Hashtable<String,String> requestMap
ÇöÀç ó¸®ÁßÀÎ request Á¤º¸¸¦ °ü¸®.


userDefinedStatusCodeSuccess

protected int userDefinedStatusCodeSuccess

userDefinedStatusCodeSuccessResend

protected int userDefinedStatusCodeSuccessResend

userDefinedStatusCodeSuccessfailure

protected int userDefinedStatusCodeSuccessfailure

transactionCodeIdLength

protected int transactionCodeIdLength
Constructor Detail

GlueHttpReceiverAdapter

public GlueHttpReceiverAdapter()
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Throws:
ServletException

doGet

public void doGet(HttpServletRequest request,
                  HttpServletResponse response)
           throws ServletException,
                  IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doPost

public void doPost(HttpServletRequest request,
                   HttpServletResponse response)
            throws ServletException,
                   IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException

isValidMsg

protected boolean isValidMsg(String msg)
Parameters:
msg -
Returns:

createGlueAtuditAttribute

protected GlueAuditAttributes createGlueAtuditAttribute(HttpServletRequest request,
                                                        GlueContext ctx)
Parameters:
request -
ctx -
Returns:


Copyright © 2013–2014 POSCO ICT SWÁ¦Ç°±â¼úÆÀ. All rights reserved.