com.poscoict.glueframework.scheduling.remote
Class GlueHttpJobEventSender

java.lang.Object
  extended by com.poscoict.glueframework.scheduling.remote.GlueHttpJobEventSender
All Implemented Interfaces:
GlueJobEventSender

public class GlueHttpJobEventSender
extends Object
implements GlueJobEventSender

¿ø°Ý¿¡ À§Ä¡ÇÑ ½ºÄÉÁÙ·¯ ¼­¹ö·Î Job ±âµ¿ ¿äûÀ» º¸³»´Â Http Sender Ŭ·¡½º.


Field Summary
protected static String HTTP_PREFIX
           
 
Constructor Summary
GlueHttpJobEventSender()
           
 
Method Summary
 String getAddress()
           
 String getCharset()
           
 int getRetryCount()
           
protected  org.apache.commons.httpclient.NameValuePair[] makeRequestBody(GlueJobDefinition jobDef)
           
 String sendJobEvent(GlueJobDefinition jobDef)
          TargetUrl¿¡ Á¤ÀÇµÈ ¼­¹ö·Î http request¸¦ º¸³½´Ù.
 String sendJobEvent(GlueJobDefinition jobDef, String targetUri)
          targetUrl¿¡ Á¤ÀÇµÈ ¼­¹ö·Î http request¸¦ º¸³½´Ù.
 void setAddress(String address)
           
 void setCharset(String charset)
           
 void setRetryCount(int retryCount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_PREFIX

protected static final String HTTP_PREFIX
See Also:
Constant Field Values
Constructor Detail

GlueHttpJobEventSender

public GlueHttpJobEventSender()
Method Detail

getAddress

public String getAddress()

setAddress

public void setAddress(String address)

getRetryCount

public int getRetryCount()

setRetryCount

public void setRetryCount(int retryCount)

sendJobEvent

public String sendJobEvent(GlueJobDefinition jobDef,
                           String targetUri)
Description copied from interface: GlueJobEventSender
targetUrl¿¡ Á¤ÀÇµÈ ¼­¹ö·Î http request¸¦ º¸³½´Ù. JobDefinition Á¤º¸¸¦ ÃßÃâÇÏ¿© request¸¦ »ý¼ºÇÑ´Ù. ¼­¹ö ½ºÄÉÁÙ·¯¿¡¼­ Á¤»óÀûÀ¸·Î Á¢¼ö°¡ µÇ¸é "success"°¡ ¸®ÅϵȴÙ. (Scheduled JobÀÌ Á¤»óÀûÀ¸·Î ó¸®µÈ °ÍÀ» ÀǹÌÇÏ´Â °ÍÀÌ ¾Æ´Ï´Ù.) /glue-scheduler ¿¡ ´ëÇؼ­´Â °íÁ¤°ªÀÌ´Ù.

Specified by:
sendJobEvent in interface GlueJobEventSender
targetUri - : http://127.0.0.1:8805/glue-scheduler
Returns:
¼º°ø ½Ã "success"

sendJobEvent

public String sendJobEvent(GlueJobDefinition jobDef)
TargetUrl¿¡ Á¤ÀÇµÈ ¼­¹ö·Î http request¸¦ º¸³½´Ù. JobDefinition Á¤º¸¸¦ ÃßÃâÇÏ¿© request¸¦ »ý¼ºÇÑ´Ù. ¼­¹ö ½ºÄÉÁÙ·¯¿¡¼­ Á¤»óÀûÀ¸·Î Á¢¼ö°¡ µÇ¸é "success"°¡ ¸®ÅϵȴÙ. (Scheduled JobÀÌ Á¤»óÀûÀ¸·Î ó¸®µÈ °ÍÀ» ÀǹÌÇÏ´Â °ÍÀÌ ¾Æ´Ï´Ù.)

Specified by:
sendJobEvent in interface GlueJobEventSender
Parameters:
jobDef -
Returns:
¼º°ø ½Ã "success"
Throws:
GlueException - - Request ¼Û½Å ½ÇÆÐ ½Ã

makeRequestBody

protected org.apache.commons.httpclient.NameValuePair[] makeRequestBody(GlueJobDefinition jobDef)

getCharset

public String getCharset()
Returns:
the charset

setCharset

public void setCharset(String charset)
Parameters:
charset - the charset to set


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