tle.framework.component.impl.rp
Class DefaultRequestProcessor

java.lang.Object
  extended bytle.framework.component.impl.ComponentBase
      extended bytle.framework.component.impl.rp.DefaultRequestProcessor
All Implemented Interfaces:
Component, ComponentMBean, DefaultRequestProcessorMBean, RequestProcessor

public class DefaultRequestProcessor
extends ComponentBase
implements RequestProcessor, DefaultRequestProcessorMBean

RequestProcessorÀÇ ±âº» ±¸Çöü.

TLEFrameworkÀÇ Ãʱ⠼³Á¤ ÆÄÀÏÀÇ "configFile" ÃʱâÈ­ ÆÄ¶ó¹ÌÅÍ·Î ¸í½ÃÇÑ ÆÄÀϷκÎÅÍ Ãʱ⠼³Á¤ Á¤º¸¸¦ Àоî¿Â´Ù. ¸¸¾à "configFile" ÃʱâÈ­ ÇÁ·ÎÆÛƼ¸¦ ¸í½ÃÇÏÁö ¾Ê¾ÒÀ» °æ¿ì¿¡´Â »ç¿ëÀÚ È¨ µð·ºÅ丮ÀÇ "DefaultRequestProcessor.xml" ÆÄÀÏÀ» »ç¿ëÇÑ´Ù.

Since:
2.0
Author:
ÃÖ¹ü±Õ

Field Summary
 
Fields inherited from class tle.framework.component.impl.ComponentBase
componentState, config
 
Constructor Summary
DefaultRequestProcessor()
           
 
Method Summary
 java.lang.String getConfigFilePath()
          ¼³Á¤ ÆÄÀÏÀÇ °æ·Î¸¦ ¸®ÅÏÇÑ´Ù.
 java.lang.String getHandlerFullName(java.lang.String handlerID)
          Çڵ鷯 ID¿¡ ÇØ´çÇÏ´Â Çڵ鷯ÀÇ ¿ÏÀüÇÑ À̸§À» ±¸ÇÑ´Ù.
 java.lang.String getHandlerIDForCommandID(java.lang.String commandID)
          ÁöÁ¤ÇÑ Ä¿¸Çµå ID¸¦ ó¸®ÇÏ´Â Çڵ鷯 ID¸¦ ¸®ÅÏÇÑ´Ù.
 java.lang.String[] getHandlerIndependentClassPath()
          µ¶¸³ÀûÀΠŬ·¡½º ÆÐ½º¸¦ »ç¿ëÇØ¼­ Çڵ鷯 Ŭ·¡½º¸¦ Àоî¿Ã °æ¿ì »ç¿ëÇϴ Ŭ·¡½º ÆÐ½º¸¦ ¸®ÅÏÇÑ´Ù.
protected  void initing(ComponentConfig config)
          ¼³Á¤ ÆÄÀϷκÎÅÍ Á¤º¸¸¦ Àоî¿Í CommandHandlerFactory¸¦ »ý¼ºÇÑ´Ù.
 boolean isUseDefaultOnInvalidMapping()
          ¼³Á¤ ÆÄÀÏÀÇ command-handler-mapping ű×ÀÇ useDefaultOnInvalidMapping ¼Ó¼º°ªÀ» ±¸ÇÑ´Ù.
 boolean isUsingHandlerIndependentClassPath()
          Å¬¶óÀ̾ðÆ®ÀÇ ¿äûÀ» ó¸®ÇÏ´Â Çڵ鷯 Ŭ·¡½º°¡ µ¶¸³ÀûÀΠŬ·¡½º ÆÐ½º¿¡ Á¸ÀçÇÒ °æ¿ì true¸¦ ¸®ÅÏÇÑ´Ù.
 Result process(RequestInfo ri)
          ¸í·É¾î¸¦ ó¸®ÇÏ´Â CommandHandler¸¦ »ç¿ëÇÏ¿© Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀ» ó¸®ÇÑ µÚ ±× °á°úÀÎ DefaultResult¸¦ ¸®ÅÏÇÑ´Ù.
 void reloadConfiguration()
          ¼³Á¤ ÆÄÀÏÀ» ¸®·ÎµùÇÑ´Ù.
 void reloadHandlerClasses()
          Çڵ鷯 Ŭ·¡½º¸¦ À§ÇÑ µ¶¸³ÀûÀΠŬ·¡½º ÆÐ½º¸¦ »ç¿ëÇÏ´Â °æ¿ì, CommandHandlerFactory.reloadHandlerClasses() ¸Þ¼Òµå¸¦ È£ÃâÇÑ´Ù.
 
Methods inherited from class tle.framework.component.impl.ComponentBase
close, closing, getDescription, getID, getState, init, isClosed, isClosing, isCreated, isErrorOccured, isInited, isIniting, isResuming, isRunning, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, resuming, start, starting, stop, stopping, suspend, suspending
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface tle.framework.component.Component
close, getID, init, isClosed, isClosing, isCreated, isErrorOccured, isInited, isIniting, isResuming, isRunning, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, start, stop, suspend
 
Methods inherited from interface tle.framework.component.ComponentMBean
getDescription, getID, getState
 

Constructor Detail

DefaultRequestProcessor

public DefaultRequestProcessor()
Method Detail

getConfigFilePath

public java.lang.String getConfigFilePath()
Description copied from interface: DefaultRequestProcessorMBean
¼³Á¤ ÆÄÀÏÀÇ °æ·Î¸¦ ¸®ÅÏÇÑ´Ù.

Specified by:
getConfigFilePath in interface DefaultRequestProcessorMBean
Returns:
¼³Á¤ ÆÄÀÏ °æ·Î
See Also:
DefaultRequestProcessorMBean.getConfigFilePath()

isUsingHandlerIndependentClassPath

public boolean isUsingHandlerIndependentClassPath()
Description copied from interface: DefaultRequestProcessorMBean
Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀ» ó¸®ÇÏ´Â Çڵ鷯 Ŭ·¡½º°¡ µ¶¸³ÀûÀΠŬ·¡½º ÆÐ½º¿¡ Á¸ÀçÇÒ °æ¿ì true¸¦ ¸®ÅÏÇÑ´Ù.

Specified by:
isUsingHandlerIndependentClassPath in interface DefaultRequestProcessorMBean
Returns:
µ¶¸³ÀûÀΠŬ·¡½º ÆÐ½º¸¦ »ç¿ëÇÒ °æ¿ì true
See Also:
DefaultRequestProcessorMBean.isUsingHandlerIndependentClassPath()

getHandlerIndependentClassPath

public java.lang.String[] getHandlerIndependentClassPath()
Description copied from interface: DefaultRequestProcessorMBean
µ¶¸³ÀûÀΠŬ·¡½º ÆÐ½º¸¦ »ç¿ëÇØ¼­ Çڵ鷯 Ŭ·¡½º¸¦ Àоî¿Ã °æ¿ì »ç¿ëÇϴ Ŭ·¡½º ÆÐ½º¸¦ ¸®ÅÏÇÑ´Ù.

Specified by:
getHandlerIndependentClassPath in interface DefaultRequestProcessorMBean
Returns:
µ¶¸³ÀûÀ¸·Î »ç¿ëÇÏ´Â Çڵ鷯 Ŭ·¡½ºµéÀÇ Å¬·¡½º ÆÐ½º
See Also:
DefaultRequestProcessorMBean.getHandlerIndependentClassPath()

reloadHandlerClasses

public void reloadHandlerClasses()
                          throws ComponentException
Çڵ鷯 Ŭ·¡½º¸¦ À§ÇÑ µ¶¸³ÀûÀΠŬ·¡½º ÆÐ½º¸¦ »ç¿ëÇÏ´Â °æ¿ì, CommandHandlerFactory.reloadHandlerClasses() ¸Þ¼Òµå¸¦ È£ÃâÇÑ´Ù.

Specified by:
reloadHandlerClasses in interface DefaultRequestProcessorMBean
Throws:
ComponentException
java.lang.UnsupportedOperationException - µ¶¸³ÀûÀΠŬ·¡½º ÆÐ½º¸¦ »ç¿ëÇÏÁö ¾Ê´Â °É·Î ¼³Á¤µÇ¾î ÀÖ´Â °æ¿ì ¹ß»ýÇÑ´Ù.
See Also:
DefaultRequestProcessorMBean.reloadHandlerClasses()

reloadConfiguration

public void reloadConfiguration()
                         throws ComponentException
¼³Á¤ ÆÄÀÏÀ» ¸®·ÎµùÇÑ´Ù.

Çڵ鷯 Ŭ·¡½º ¸ñ·ÏÀ» ´Ù½Ã »ý¼ºÇÏ°í ¸í·É¾î¿Í Çڵ鷯 »çÀÌÀÇ ¸ÅÇÎ Á¤º¸µµ ´Ù½Ã »ý¼ºÇÑ´Ù.

Specified by:
reloadConfiguration in interface DefaultRequestProcessorMBean
Throws:
ComponentException
See Also:
DefaultRequestProcessorMBean.reloadConfiguration()

initing

protected void initing(ComponentConfig config)
                throws ComponentException
¼³Á¤ ÆÄÀϷκÎÅÍ Á¤º¸¸¦ Àоî¿Í CommandHandlerFactory¸¦ »ý¼ºÇÑ´Ù.

¼³Á¤ ÆÄÀÏÀÇ °æ·Î´Â configFile ÃʱâÈ­ ÆÄ¶ó¹ÌÅͷκÎÅÍ °¡Á®¿Â´Ù.

Overrides:
initing in class ComponentBase
Parameters:
config - ÄÄÆ÷³ÍÆ® ÃʱâÈ­ ¼³Á¤ Á¤º¸¸¦ ´ã°í ÀÖ´Â °´Ã¼
Throws:
ComponentException
See Also:
ComponentBase.initing(tle.framework.component.ComponentConfig)

process

public Result process(RequestInfo ri)
               throws ComponentException
¸í·É¾î¸¦ ó¸®ÇÏ´Â CommandHandler¸¦ »ç¿ëÇÏ¿© Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀ» ó¸®ÇÑ µÚ ±× °á°úÀÎ DefaultResult¸¦ ¸®ÅÏÇÑ´Ù.

CommandHandler´Â °¡±ÞÀûÀ̸é process() ¸Þ¼Òµå¿¡¼­ Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀ» ó¸®ÇÏ´Â °úÁ¤¿¡¼­ ¹ß»ýÇÑ ¿¹¿ÜÀÇ °æ¿ì ¸®ÅÏÇÏ´Â Result¿¡ ¸í½ÃÇØÁÖ¾î¾ß ÇÏ¸ç ¿¹¿Ü¸¦ ¹ß»ý½ÃŰ¸é ¾È µÈ´Ù.

Specified by:
process in interface RequestProcessor
Parameters:
ri - ¿äû ºÐ¼® Á¤º¸
Returns:
ó¸® °á°ú
Throws:
ComponentException - ¸í·É¾î ID¿¡ ÇØ´çÇÏ´Â CommandHandler°¡ NoHandlerCommandHandlerÀÎ °æ¿ì¿¡ ¹ß»ýÇÑ´Ù.
See Also:
RequestProcessor.process(tle.framework.component.spi.ra.RequestInfo)

getHandlerIDForCommandID

public java.lang.String getHandlerIDForCommandID(java.lang.String commandID)
Description copied from interface: DefaultRequestProcessorMBean
ÁöÁ¤ÇÑ Ä¿¸Çµå ID¸¦ ó¸®ÇÏ´Â Çڵ鷯 ID¸¦ ¸®ÅÏÇÑ´Ù. ±âº» Çڵ鷯¿Í ¸ÅÇÎµÈ °æ¿ì ±âº» Çڵ鷯ÀÇ Å¬·¡½º À̸§À» ¸®ÅÏÇÑ´Ù.

Specified by:
getHandlerIDForCommandID in interface DefaultRequestProcessorMBean
Parameters:
commandID -
Returns:
See Also:
DefaultRequestProcessorMBean.getHandlerIDForCommandID(java.lang.String)

getHandlerFullName

public java.lang.String getHandlerFullName(java.lang.String handlerID)
Description copied from interface: DefaultRequestProcessorMBean
Çڵ鷯 ID¿¡ ÇØ´çÇÏ´Â Çڵ鷯ÀÇ ¿ÏÀüÇÑ À̸§À» ±¸ÇÑ´Ù. Çڵ鷯°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì nullÀ» ¸®ÅÏÇÑ´Ù.

Specified by:
getHandlerFullName in interface DefaultRequestProcessorMBean
Parameters:
handlerID -
Returns:
See Also:
DefaultRequestProcessorMBean.getHandlerFullName(java.lang.String)

isUseDefaultOnInvalidMapping

public boolean isUseDefaultOnInvalidMapping()
Description copied from interface: DefaultRequestProcessorMBean
¼³Á¤ ÆÄÀÏÀÇ command-handler-mapping ű×ÀÇ useDefaultOnInvalidMapping ¼Ó¼º°ªÀ» ±¸ÇÑ´Ù.

Specified by:
isUseDefaultOnInvalidMapping in interface DefaultRequestProcessorMBean
Returns:
See Also:
DefaultRequestProcessorMBean.isUseDefaultOnInvalidMapping()