Class ExecuteContext

java.lang.Object
com.infoteria.asteria.flowengine2.log.Logger
com.infoteria.asteria.flowengine2.execute.ExecuteContext
All Implemented Interfaces:
com.infoteria.asteria.connection.ConnectionContext, com.infoteria.asteria.log.ILogger, Cloneable
Direct Known Subclasses:
MappingSimulatorContext, RecoveryContext, TestContext

public abstract class ExecuteContext extends Logger implements Cloneable, com.infoteria.asteria.connection.ConnectionContext
フローの実行コンテキストを表すクラスです。
このクラスからセッションや変数などの実行時情報を取得することができます。
  • Field Details

  • Constructor Details

    • ExecuteContext

      protected ExecuteContext(com.infoteria.asteria.flowengine2.framework.FlowWorkInfo info)
    • ExecuteContext

      protected ExecuteContext(com.infoteria.asteria.flowengine2.framework.FlowWorkInfo info, boolean doInheritConnection)
    • ExecuteContext

      protected ExecuteContext(String catName, com.infoteria.asteria.util.resource.MessageFormat mf)
  • Method Details

    • debugInfo

      public void debugInfo(String m)
      デバッグ情報のログ出力。
      Specified by:
      debugInfo in interface com.infoteria.asteria.connection.ConnectionContext
    • debugInfo

      public void debugInfo(int code)
      デバッグ情報のログ出力。
      Specified by:
      debugInfo in interface com.infoteria.asteria.connection.ConnectionContext
    • debugInfo

      public void debugInfo(int code, Object o1)
      デバッグ情報のログ出力。
      Specified by:
      debugInfo in interface com.infoteria.asteria.connection.ConnectionContext
    • debugInfo

      public void debugInfo(int code, Object o1, Object o2)
      デバッグ情報のログ出力。
    • debugInfo

      public void debugInfo(int code, Object o1, Object o2, Object o3)
      デバッグ情報のログ出力。
    • debugInfo

      public void debugInfo(Throwable t)
      デバッグ情報のログ出力。
    • debugInfo

      public void debugInfo(String m, Throwable t)
      デバッグ情報のログ出力。
      Specified by:
      debugInfo in interface com.infoteria.asteria.connection.ConnectionContext
    • debugInfo

      public void debugInfo(int code, Throwable t)
      デバッグ情報のログ出力。
      Specified by:
      debugInfo in interface com.infoteria.asteria.connection.ConnectionContext
    • debugInfo

      public void debugInfo(int code, Object o, Throwable t)
      デバッグ情報のログ出力。
      Specified by:
      debugInfo in interface com.infoteria.asteria.connection.ConnectionContext
    • isDebugInfoEnabled

      public boolean isDebugInfoEnabled()
      デバッグ情報の出力が有効な場合にtrueを返します。
      このメソッドがfalseを返す場合はdebugInfoメソッドで出力された情報はログ出力されません。
      Specified by:
      isDebugInfoEnabled in interface com.infoteria.asteria.connection.ConnectionContext
    • info

      public void info(String m)
      情報のログ出力。
      Specified by:
      info in interface com.infoteria.asteria.log.ILogger
    • warn

      public void warn(String m)
      警告のログ出力。
      Specified by:
      warn in interface com.infoteria.asteria.log.ILogger
    • error

      public void error(String m)
      エラーのログ出力。
      Specified by:
      error in interface com.infoteria.asteria.log.ILogger
    • debug

      public void debug(String m)
      デバッグのログ出力。
      Specified by:
      debug in interface com.infoteria.asteria.log.ILogger
    • fatal

      public void fatal(String m)
      致命的エラーのログ出力。
      Specified by:
      fatal in interface com.infoteria.asteria.log.ILogger
    • getSession

      public FlowSession getSession()
      このフローのSessionを取得します。
    • isTransaction

      public boolean isTransaction()
      このフローがトランザクション化されている場合はtrueを返します。
    • getProjectName

      public String getProjectName()
      実行中のフローのプロジェクト名を返します。
    • getBaseDirectory

      public String getBaseDirectory()
      実行中のプロジェクトのベースディレクトリを返します。
    • getProjectOwner

      public User getProjectOwner()
      実行中のフローのプロジェクトオーナーを返します。
    • getUser

      public User getUser()
      実行ユーザを返します。
      実行ユーザが設定されていない場合はnullを返します。
    • getFlowName

      public String getFlowName()
      実行中のフローのフロー名を返します。
    • useHighCapacityStreams

      public boolean useHighCapacityStreams()
      大容量ストリームを使用するかどうかを返します。
    • flowExternalVariablesSetting

      protected void flowExternalVariablesSetting(com.infoteria.asteria.flowengine2.flow.Flow flow)
    • flowLogSetting

      protected void flowLogSetting(com.infoteria.asteria.flowengine2.flow.Flow flow)
    • getParentContext

      public ExecuteContext getParentContext()
      フローがサブフロー、またはExceptionフローとして実行されている場合に親フローのExecuteContextを返します。
      それ以外の場合はnullを返します。
    • getConnectionEntry

      public ConnectionEntry getConnectionEntry(String conType, String conName) throws FlowException
      Connection種別とConnection名を指定してConnectionEntryを取得します。
      対応するConnectionEntryがない場合はnullとなります。
      Throws:
      FlowException
    • getConnection

      public Connection getConnection(String conType, String conName) throws FlowException
      Connection種別とConnection名を指定してConnectionを取得します。
      リクエストの実行中に同じConnectionが複数回参照された場合は同一のConnectionインスタンスを返します。
      対応するConnectionがない場合はExceptionとなります。
      Throws:
      FlowException
    • getConnection

      public Connection getConnection(ConnectionProperty property) throws FlowException
      ConnectionPropertyの設定値に対応するConnectionを取得します。
      リクエストの実行中に同じConnectionが複数回参照された場合は同一のConnectionインスタンスを返します。
      対応するConnectionがない場合はExceptionとなります。
      Throws:
      FlowException
    • getConnectionTransaction

      public ConnectionTransaction getConnectionTransaction(String conType, String conName)
      Connection種別とコConnection名を指定してConnectionを取得します。
      リクエストの実行中に同じコネクションが複数回参照された場合は同一のTransactionインスタンスを返します。
      対応するConnectionがリクエストで一度も使用されていない場合はnullを返します。
    • getConnectionTransaction

      public ConnectionTransaction getConnectionTransaction(ConnectionProperty property)
      ConnectionPropertyの設定値に対応するConnectionのTransactionを取得します。
      リクエストの実行中に同じコネクションが複数回参照された場合は同一のTransactionインスタンスを返します。
      対応するConnectionがリクエストで一度も使用されていない場合はnullを返します。
    • commitConnection

      @Deprecated public void commitConnection(Connection con) throws FlowException
      Deprecated.
      フローがトランザクション化されていない場合に引数のConnectionをcommitします。
      フローがトランザクション化されている場合は何もしません。
      Throws:
      FlowException
    • rollbackConnection

      @Deprecated public void rollbackConnection(Connection con) throws FlowException
      Deprecated.
      フローがトランザクション化されていない場合に引数のConnectionをrollbackします。
      フローがトランザクション化されている場合は何もしません。
      Throws:
      FlowException
    • getProjectVariables

      public VariableList getProjectVariables()
      プロジェクト変数を取得します。
    • getFlowVariables

      public VariableList getFlowVariables()
      フロー変数を取得します。
    • getSessionVariables

      public VariableList getSessionVariables()
      セッション変数を取得します。
    • getExternalVariablesMap

      public Map<String,ExternalVariables> getExternalVariablesMap()
      外部変数のマップを取得します。
    • getExternalVariables

      public ExternalVariables getExternalVariables(String name)
      名前を指定して外部変数を取得します。
    • isOriginalContext

      public boolean isOriginalContext()
      フローがサブフローまたはExceptionフローとして実行されている場合、falseを返します。
    • getSystemVariables

      public SystemVariables getSystemVariables()
      システム変数を取得します。
    • getParentException

      public FlowException getParentException()
      フローがExceptionフローとして実行されている場合に親フローで発生したExceptionを取得します。
      それ以外の場合はnullが返ります。
    • getCurrentException

      public FlowException getCurrentException()
      このフローで最後に発生したExceptionを取得します。
    • getIndependentMap

      public Map<String,Object> getIndependentMap()
      リクエスト実行中保持されるMapを返します。
    • notifyRunning

      public void notifyRunning() throws FlowException
      処理が実行中であることを通知します。
      外部からリクエストの強制終了が実行されている場合はこのメソッドの実行によりエラーが発生します。
      Throws:
      FlowException
    • addTransaction

      public void addTransaction(Transaction t) throws FlowException
      トランザクションを追加します。
      Throws:
      FlowException
    • getStatusValue

      public Value getStatusValue()
      マッパーによって設定されたStatus文字列を保持するValueを返します。
    • getCheckPointManager

      public com.infoteria.asteria.flowengine2.checkpoint.CheckPointManager getCheckPointManager()
    • isReRunContext

      public boolean isReRunContext()
    • getCheckPointStatus

      public String getCheckPointStatus()
    • getCheckPointStart

      public Date getCheckPointStart()
    • setStartTime

      public void setStartTime(long time)
    • getStartTime

      public long getStartTime()
    • getMaxRetryCount

      public int getMaxRetryCount()
    • setMaxRetryCount

      public void setMaxRetryCount(int value)
    • getRetryInterval

      public int getRetryInterval()
    • setRetryInterval

      public void setRetryInterval(int value)
    • canOtherServerRetry

      public boolean canOtherServerRetry()
    • setOtherServerRetry

      public void setOtherServerRetry(boolean value)
    • setAutoRetry

      public void setAutoRetry(boolean value)
    • isAutoRetry

      public boolean isAutoRetry()
    • getRetryCount

      public int getRetryCount()
    • setRetryCount

      public void setRetryCount(int value)
    • setCheckPointDataFileDir

      public void setCheckPointDataFileDir(File dir)
    • getCheckPointDataFileDir

      public File getCheckPointDataFileDir()
    • getFlowMetrics

      public com.infoteria.asteria.flowmetrics.model.FlowMetrics getFlowMetrics()
    • info

      public void info(int code)
      情報ログの出力
      Specified by:
      info in interface com.infoteria.asteria.log.ILogger
    • info

      public void info(int code, Object o1)
      情報ログの出力
      Specified by:
      info in interface com.infoteria.asteria.log.ILogger
    • info

      public void info(int code, Object o1, Object o2)
      情報ログの出力
      Specified by:
      info in interface com.infoteria.asteria.log.ILogger
    • info

      public void info(int code, Object o1, Object o2, Object o3)
      情報ログの出力
      Specified by:
      info in interface com.infoteria.asteria.log.ILogger
    • info

      public void info(Throwable t)
      情報ログの出力
      Specified by:
      info in interface com.infoteria.asteria.log.ILogger
    • info

      public void info(String m, Throwable t)
      情報ログの出力
      Specified by:
      info in interface com.infoteria.asteria.log.ILogger
    • info

      public void info(int code, Throwable t)
      情報ログの出力
      Specified by:
      info in interface com.infoteria.asteria.log.ILogger
    • info

      public void info(int code, Object o, Throwable t)
      情報ログの出力
      Specified by:
      info in interface com.infoteria.asteria.log.ILogger
    • warn

      public void warn(int code)
      警告ログの出力
      Specified by:
      warn in interface com.infoteria.asteria.log.ILogger
    • warn

      public void warn(int code, Object o1)
      警告ログの出力
      Specified by:
      warn in interface com.infoteria.asteria.log.ILogger
    • warn

      public void warn(int code, Object o1, Object o2)
      警告ログの出力
      Specified by:
      warn in interface com.infoteria.asteria.log.ILogger
    • warn

      public void warn(int code, Object o1, Object o2, Object o3)
      警告ログの出力
      Specified by:
      warn in interface com.infoteria.asteria.log.ILogger
    • warn

      public void warn(Throwable t)
      警告ログの出力
      Specified by:
      warn in interface com.infoteria.asteria.log.ILogger
    • warn

      public void warn(String m, Throwable t)
      警告ログの出力
      Specified by:
      warn in interface com.infoteria.asteria.log.ILogger
    • warn

      public void warn(int code, Throwable t)
      警告ログの出力
      Specified by:
      warn in interface com.infoteria.asteria.log.ILogger
    • warn

      public void warn(int code, Object o, Throwable t)
      警告ログの出力
      Specified by:
      warn in interface com.infoteria.asteria.log.ILogger
    • error

      public void error(int code)
      エラーログの出力
      Specified by:
      error in interface com.infoteria.asteria.log.ILogger
    • error

      public void error(int code, Object o1)
      エラーログの出力
      Specified by:
      error in interface com.infoteria.asteria.log.ILogger
    • error

      public void error(int code, Object o1, Object o2)
      エラーログの出力
      Specified by:
      error in interface com.infoteria.asteria.log.ILogger
    • error

      public void error(int code, Object o1, Object o2, Object o3)
      エラーログの出力
      Specified by:
      error in interface com.infoteria.asteria.log.ILogger
    • error

      public void error(Throwable t)
      エラーログの出力
      Specified by:
      error in interface com.infoteria.asteria.log.ILogger
    • error

      public void error(String m, Throwable t)
      エラーログの出力
      Specified by:
      error in interface com.infoteria.asteria.log.ILogger
    • error

      public void error(int code, Throwable t)
      エラーログの出力
      Specified by:
      error in interface com.infoteria.asteria.log.ILogger
    • error

      public void error(int code, Object o, Throwable t)
      エラーログの出力
      Specified by:
      error in interface com.infoteria.asteria.log.ILogger
    • fatal

      public void fatal(int code)
      致命的エラーログの出力
      Specified by:
      fatal in interface com.infoteria.asteria.log.ILogger
    • fatal

      public void fatal(int code, Object o1)
      致命的エラーログの出力
      Specified by:
      fatal in interface com.infoteria.asteria.log.ILogger
    • fatal

      public void fatal(int code, Object o1, Object o2)
      致命的エラーログの出力
      Specified by:
      fatal in interface com.infoteria.asteria.log.ILogger
    • fatal

      public void fatal(int code, Object o1, Object o2, Object o3)
      致命的エラーログの出力
      Specified by:
      fatal in interface com.infoteria.asteria.log.ILogger
    • fatal

      public void fatal(Throwable t)
      致命的エラーログの出力
      Specified by:
      fatal in interface com.infoteria.asteria.log.ILogger
    • fatal

      public void fatal(String m, Throwable t)
      致命的エラーログの出力
      Specified by:
      fatal in interface com.infoteria.asteria.log.ILogger
    • fatal

      public void fatal(int code, Throwable t)
      致命的エラーログの出力
      Specified by:
      fatal in interface com.infoteria.asteria.log.ILogger
    • fatal

      public void fatal(int code, Object o, Throwable t)
      致命的エラーログの出力
      Specified by:
      fatal in interface com.infoteria.asteria.log.ILogger
    • debug

      public void debug(int code)
      デバッグログの出力
      Specified by:
      debug in interface com.infoteria.asteria.log.ILogger
    • debug

      public void debug(int code, Object o1)
      デバッグログの出力
      Specified by:
      debug in interface com.infoteria.asteria.log.ILogger
    • debug

      public void debug(int code, Object o1, Object o2)
      デバッグログの出力
      Specified by:
      debug in interface com.infoteria.asteria.log.ILogger
    • debug

      public void debug(int code, Object o1, Object o2, Object o3)
      デバッグログの出力
      Specified by:
      debug in interface com.infoteria.asteria.log.ILogger
    • debug

      public void debug(Throwable t)
      デバッグログの出力
      Specified by:
      debug in interface com.infoteria.asteria.log.ILogger
    • debug

      public void debug(String m, Throwable t)
      デバッグログの出力
      Specified by:
      debug in interface com.infoteria.asteria.log.ILogger
    • debug

      public void debug(int code, Throwable t)
      デバッグログの出力
      Specified by:
      debug in interface com.infoteria.asteria.log.ILogger
    • debug

      public void debug(int code, Object o, Throwable t)
      デバッグログの出力
      Specified by:
      debug in interface com.infoteria.asteria.log.ILogger
    • isInfoEnabled

      public boolean isInfoEnabled()
      情報ログの出力が可能かどうかを返します。
      Specified by:
      isInfoEnabled in interface com.infoteria.asteria.log.ILogger
    • isWarnEnabled

      public boolean isWarnEnabled()
      警告ログの出力が可能かどうかを返します。
      Specified by:
      isWarnEnabled in interface com.infoteria.asteria.log.ILogger
    • isErrorEnabled

      public boolean isErrorEnabled()
      エラーログの出力が可能かどうかを返します。
      Specified by:
      isErrorEnabled in interface com.infoteria.asteria.log.ILogger
    • isFatalEnabled

      public boolean isFatalEnabled()
      致命的エラーログの出力が可能かどうかを返します。
      Specified by:
      isFatalEnabled in interface com.infoteria.asteria.log.ILogger
    • isDebugEnabled

      public boolean isDebugEnabled()
      デバッグログの出力が可能かどうかを返します。
      Specified by:
      isDebugEnabled in interface com.infoteria.asteria.log.ILogger