クラス GroovyScriptExecutingMessageProcessor
java.lang.ObjectSE
org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor<ObjectSE>
org.springframework.integration.groovy.GroovyScriptExecutingMessageProcessor
- 実装されているすべてのインターフェース:
Aware、BeanClassLoaderAware、BeanFactoryAware、InitializingBean、MessageProcessor<ObjectSE>
public class GroovyScriptExecutingMessageProcessor extends AbstractScriptExecutingMessageProcessor<ObjectSE> implements InitializingBean
Groovy スクリプトを評価するための
MessageProcessor 実装。- 導入:
- 2.0
- 作成者:
- Dave Syer, Mark Fisher, Oleg Zhurakousky, Stefan Reuter, Artem Bilan, Gary Russell
コンストラクターの概要
コンストラクター コンストラクター 説明 GroovyScriptExecutingMessageProcessor(ScriptSource scriptSource)DefaultScriptVariableGenerator を使用する特定のScriptSource用のプロセッサーを作成します。GroovyScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptVariableGenerator scriptVariableGenerator)提供された ScriptVariableGenerator を使用する特定のScriptSource用のプロセッサーを作成します。メソッドのサマリー
修飾子と型 メソッド 説明 voidafterPropertiesSet()protected ObjectSEexecuteScript(ScriptSource scriptSource, MapSE<StringSE,ObjectSE> variables)サブクラスはこのメソッドを実装する必要があります。protected ScriptSourcegetScriptSource(Message<?> message)サブクラスは、このメソッドを実装してスクリプトソースを作成する必要があります。オプションで、メッセージを使用してスクリプトを検索または作成します。voidsetCompilerConfiguration(org.codehaus.groovy.control.CompilerConfiguration compilerConfiguration)CompilerConfigurationオプションを指定して、Groovy スクリプトのコンパイルをカスタマイズします。voidsetCompileStatic(boolean compileStatic)booleanフラグを指定して、GroovyClassLoaderのコンパイラーを、提供されたスクリプトのCompileStaticヒント用にカスタマイズする必要があるかどうかを示します。voidsetCustomizer(GroovyObjectCustomizer customizer)このプロセッサーにGroovyObjectCustomizerを設定します。クラス org.springframework.integration.scripting.AbstractScriptExecutingMessageProcessor から継承されたメソッド
getBeanClassLoader, getBeanFactory, getScriptVariableGenerator, processMessage, setBeanClassLoader, setBeanFactory
コンストラクターの詳細
GroovyScriptExecutingMessageProcessor
DefaultScriptVariableGenerator を使用する特定のScriptSource用のプロセッサーを作成します。- パラメーター:
scriptSource- スクリプトソース。
GroovyScriptExecutingMessageProcessor
public GroovyScriptExecutingMessageProcessor(ScriptSource scriptSource, ScriptVariableGenerator scriptVariableGenerator)提供された ScriptVariableGenerator を使用する特定のScriptSource用のプロセッサーを作成します。- パラメーター:
scriptSource- スクリプトソース。scriptVariableGenerator- 変数ジェネレーター。
メソッドの詳細
setCustomizer
このプロセッサーにGroovyObjectCustomizerを設定します。- パラメーター:
customizer- カスタマイザー。
setCompileStatic
public void setCompileStatic(boolean compileStatic)booleanフラグを指定して、GroovyClassLoaderのコンパイラーを、提供されたスクリプトのCompileStaticヒント用にカスタマイズする必要があるかどうかを示します。このフラグをオーバーライドする
setCompilerConfiguration(CompilerConfiguration)を介して、より多くのコンパイラーオプションを提供できます。- パラメーター:
compileStatic- コンパイル静的booleanフラグ。- 導入:
- 4.3
- 関連事項:
CompileStatic
setCompilerConfiguration
public void setCompilerConfiguration(org.codehaus.groovy.control.CompilerConfiguration compilerConfiguration)CompilerConfigurationオプションを指定して、Groovy スクリプトのコンパイルをカスタマイズします。たとえば、CompileStaticとImportCustomizerが最も人気のあるオプションです。- パラメーター:
compilerConfiguration- 使用する Groovy スクリプトコンパイラーオプション。- 導入:
- 4.3
- 関連事項:
CompileStatic,GroovyClassLoader
getScriptSource
クラスからコピーされた説明:AbstractScriptExecutingMessageProcessorサブクラスは、このメソッドを実装してスクリプトソースを作成する必要があります。オプションで、メッセージを使用してスクリプトを検索または作成します。- 次で指定:
- クラス
AbstractScriptExecutingMessageProcessor<ObjectSE>のgetScriptSource - パラメーター:
message- 処理中のメッセージ- 戻り値:
- スクリプトの作成に使用する ScriptSource
afterPropertiesSet
public void afterPropertiesSet()- 次で指定:
- インターフェース
InitializingBeanのafterPropertiesSet
executeScript
クラスからコピーされた説明:AbstractScriptExecutingMessageProcessorサブクラスはこのメソッドを実装する必要があります。その際、スクリプトの実行コンテキストには、提供されたスクリプト変数を入力する必要があります。- 次で指定:
- クラス
AbstractScriptExecutingMessageProcessor<ObjectSE>のexecuteScript - パラメーター:
scriptSource- スクリプトソース。variables- 変数。- 戻り値:
- 実行の結果。