com.infoteria.asteria.flowengine2.execute
Class ExecuteContext

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

public abstract class ExecuteContext
extends Logger
implements java.lang.Cloneable, com.infoteria.asteria.connection.ConnectionContext

フローの実行コンテキストを表すクラスです。
このクラスからセッションや変数などの実行時情報を取得することができます。


Field Summary
protected  java.util.Map _connectionMap
           
 
Constructor Summary
protected ExecuteContext(com.infoteria.asteria.flowengine2.framework.FlowWorkInfo info)
           
protected ExecuteContext(com.infoteria.asteria.flowengine2.framework.FlowWorkInfo info, boolean doInheritConnection)
           
protected ExecuteContext(java.lang.String catName, MessageFormat mf)
           
 
Method Summary
 void addTransaction(Transaction t)
          トランザクションを追加します。
 boolean canOtherServerRetry()
           
 void commitConnection(Connection con)
          Deprecated.  
 void debug(java.lang.String m)
          デバッグのログ出力。
 void debugInfo(int code)
          デバッグ情報のログ出力。
 void debugInfo(int code, java.lang.Object o1)
          デバッグ情報のログ出力。
 void debugInfo(int code, java.lang.Object o1, java.lang.Object o2)
          デバッグ情報のログ出力。
 void debugInfo(int code, java.lang.Object o1, java.lang.Object o2, java.lang.Object o3)
          デバッグ情報のログ出力。
 void debugInfo(int code, java.lang.Object o, java.lang.Throwable t)
          デバッグ情報のログ出力。
 void debugInfo(int code, java.lang.Throwable t)
          デバッグ情報のログ出力。
 void debugInfo(java.lang.String m)
          デバッグ情報のログ出力。
 void debugInfo(java.lang.String m, java.lang.Throwable t)
          デバッグ情報のログ出力。
 void debugInfo(java.lang.Throwable t)
          デバッグ情報のログ出力。
 void error(java.lang.String m)
          エラーのログ出力。
 void fatal(java.lang.String m)
          致命的エラーのログ出力。
protected  void flowExternalVariablesSetting(Flow flow)
           
protected  void flowLogSetting(Flow flow)
           
 java.lang.String getBaseDirectory()
          実行中のプロジェクトのベースディレクトリを返します。
 java.io.File getCheckPointDataFileDir()
           
 com.infoteria.asteria.flowengine2.checkpoint.CheckPointManager getCheckPointManager()
           
 java.util.Date getCheckPointStart()
           
 java.lang.String getCheckPointStatus()
           
 Connection getConnection(ConnectionProperty property)
          ConnectionPropertyの設定値に対応するConnectionを取得します。
リクエストの実行中に同じConnectionが複数回参照された場合は同一のConnectionインスタンスを返します。
対応するConnectionがない場合はExceptionとなります。
 Connection getConnection(java.lang.String conType, java.lang.String conName)
          Connection種別とConnection名を指定してConnectionを取得します。
リクエストの実行中に同じConnectionが複数回参照された場合は同一のConnectionインスタンスを返します。
対応するConnectionがない場合はExceptionとなります。
 ConnectionEntry getConnectionEntry(java.lang.String conType, java.lang.String conName)
          Connection種別とConnection名を指定してConnectionEntryを取得します。
対応するConnectionEntryがない場合はnullとなります。
 ConnectionTransaction getConnectionTransaction(ConnectionProperty property)
          ConnectionPropertyの設定値に対応するConnectionのTransactionを取得します。
リクエストの実行中に同じコネクションが複数回参照された場合は同一のTransactionインスタンスを返します。
対応するConnectionがリクエストで一度も使用されていない場合はnullを返します。
 ConnectionTransaction getConnectionTransaction(java.lang.String conType, java.lang.String conName)
          Connection種別とコConnection名を指定してConnectionを取得します。
リクエストの実行中に同じコネクションが複数回参照された場合は同一のTransactionインスタンスを返します。
対応するConnectionがリクエストで一度も使用されていない場合はnullを返します。
 FlowException getCurrentException()
          このフローで最後に発生したExceptionを取得します。
 ExternalVariables getExternalVariables(java.lang.String name)
          名前を指定して外部変数を取得します。
 java.util.Map getExternalVariablesMap()
          外部変数のマップを取得します。
 java.lang.String getFlowName()
          実行中のフローのフロー名を返します。
 VariableList getFlowVariables()
          フロー変数を取得します。
 java.util.Map getIndependentMap()
          リクエスト実行中保持されるMapを返します。
 int getMaxRetryCount()
           
 ExecuteContext getParentContext()
          フローがサブフロー、またはExceptionフローとして実行されている場合に親フローのExecuteContextを返します。
それ以外の場合はnullを返します。
 FlowException getParentException()
          フローがExceptionフローとして実行されている場合に親フローで発生したExceptionを取得します。
それ以外の場合はnullが返ります。
 java.lang.String getProjectName()
          実行中のフローのプロジェクト名を返します。
 User getProjectOwner()
          実行中のフローのプロジェクトオーナーを返します。
 VariableList getProjectVariables()
          プロジェクト変数を取得します。
 int getRetryCount()
           
 int getRetryInterval()
           
 FlowSession getSession()
          このフローのSessionを取得します。
 VariableList getSessionVariables()
          セッション変数を取得します。
 long getStartTime()
           
 Value getStatusValue()
          マッパーによって設定されたStatus文字列を保持するValueを返します。
 SystemVariables getSystemVariables()
          システム変数を取得します。
 User getUser()
          実行ユーザを返します。
実行ユーザが設定されていない場合はnullを返します。
 void info(java.lang.String m)
          情報のログ出力。
 boolean isAutoRetry()
           
 boolean isDebugInfoEnabled()
          デバッグ情報の出力が有効な場合にtrueを返します。
このメソッドがfalseを返す場合はdebugInfoメソッドで出力された情報はログ出力されません。
 boolean isOriginalContext()
          フローがサブフローまたはExceptionフローとして実行されている場合、falseを返します。
 boolean isReRunContext()
           
 boolean isTransaction()
          このフローがトランザクション化されている場合はtrueを返します。
 void notifyRunning()
          処理が実行中であることを通知します。
外部からリクエストの強制終了が実行されている場合はこのメソッドの実行によりエラーが発生します。
 void rollbackConnection(Connection con)
          Deprecated.  
 void setAutoRetry(boolean value)
           
 void setCheckPointDataFileDir(java.io.File dir)
           
 void setMaxRetryCount(int value)
           
 void setOtherServerRetry(boolean value)
           
 void setRetryCount(int value)
           
 void setRetryInterval(int value)
           
 void setStartTime(long time)
           
 boolean useHighCapacityStreams()
          大容量ストリームを使用するかどうかを返します。
 void warn(java.lang.String m)
          警告のログ出力。
 
Methods inherited from class com.infoteria.asteria.flowengine2.log.Logger
debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, fatal, fatal, fatal, fatal, fatal, fatal, fatal, fatal, info, info, info, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isFatalEnabled, isInfoEnabled, isWarnEnabled, warn, warn, warn, warn, warn, warn, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.infoteria.asteria.log.ILogger
debug, debug, debug, debug, debug, error, error, error, error, error, fatal, fatal, fatal, fatal, fatal, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isFatalEnabled, isInfoEnabled, isWarnEnabled, warn, warn, warn, warn, warn
 

Field Detail

_connectionMap

protected java.util.Map _connectionMap
Constructor Detail

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(java.lang.String catName,
                         MessageFormat mf)
Method Detail

debugInfo

public void debugInfo(java.lang.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,
                      java.lang.Object o1)
デバッグ情報のログ出力。
Specified by:
debugInfo in interface com.infoteria.asteria.connection.ConnectionContext

debugInfo

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

debugInfo

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

debugInfo

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

debugInfo

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

debugInfo

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

debugInfo

public void debugInfo(int code,
                      java.lang.Object o,
                      java.lang.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(java.lang.String m)
情報のログ出力。
Specified by:
info in interface com.infoteria.asteria.log.ILogger
Overrides:
info in class Logger

warn

public void warn(java.lang.String m)
警告のログ出力。
Specified by:
warn in interface com.infoteria.asteria.log.ILogger
Overrides:
warn in class Logger

error

public void error(java.lang.String m)
エラーのログ出力。
Specified by:
error in interface com.infoteria.asteria.log.ILogger
Overrides:
error in class Logger

debug

public void debug(java.lang.String m)
デバッグのログ出力。
Specified by:
debug in interface com.infoteria.asteria.log.ILogger
Overrides:
debug in class Logger

fatal

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

getSession

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

isTransaction

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

getProjectName

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

getBaseDirectory

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

getProjectOwner

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

getUser

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

getFlowName

public java.lang.String getFlowName()
実行中のフローのフロー名を返します。

useHighCapacityStreams

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

flowExternalVariablesSetting

protected void flowExternalVariablesSetting(Flow flow)

flowLogSetting

protected void flowLogSetting(Flow flow)

getParentContext

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

getConnectionEntry

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

getConnection

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

getConnection

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

getConnectionTransaction

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

getConnectionTransaction

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

commitConnection

public void commitConnection(Connection con)
                      throws FlowException
Deprecated.  

フローがトランザクション化されていない場合に引数のConnectionをcommitします。
フローがトランザクション化されている場合は何もしません。

rollbackConnection

public void rollbackConnection(Connection con)
                        throws FlowException
Deprecated.  

フローがトランザクション化されていない場合に引数のConnectionをrollbackします。
フローがトランザクション化されている場合は何もしません。

getProjectVariables

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

getFlowVariables

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

getSessionVariables

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

getExternalVariablesMap

public java.util.Map getExternalVariablesMap()
外部変数のマップを取得します。

getExternalVariables

public ExternalVariables getExternalVariables(java.lang.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 java.util.Map getIndependentMap()
リクエスト実行中保持されるMapを返します。

notifyRunning

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

addTransaction

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

getStatusValue

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

getCheckPointManager

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

isReRunContext

public boolean isReRunContext()

getCheckPointStatus

public java.lang.String getCheckPointStatus()

getCheckPointStart

public java.util.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(java.io.File dir)

getCheckPointDataFileDir

public java.io.File getCheckPointDataFileDir()