jp.go.nict.langrid.servicecontainer.executor.axis
クラス AxisAsyncTranslationServiceExecutor

java.lang.Object
  上位を拡張 jp.go.nict.langrid.servicecontainer.service.component.AbstractServiceExecutor
      上位を拡張 jp.go.nict.langrid.servicecontainer.executor.axis.AbstractAxisServiceExecutor
          上位を拡張 jp.go.nict.langrid.servicecontainer.executor.axis.AxisAsyncTranslationServiceExecutor
すべての実装されたインタフェース:
AsyncTranslationService

public class AxisAsyncTranslationServiceExecutor
extends AbstractAxisServiceExecutor
implements AsyncTranslationService

SOAP 用 外部翻訳サービス呼び出しクラス


コンストラクタの概要
AxisAsyncTranslationServiceExecutor(String invocationName, long iid, Endpoint endpoint)
           
 
メソッドの概要
 AsyncTranslationResult getCurrentResult(String token)
          現在翻訳できている文章を取得する。
 String startTranslation(String sourceLang, String targetLang, String[] sources)
          非同期翻訳を行う。
 void terminate(String token)
          実行中の翻訳処理を中断する。
 
クラス jp.go.nict.langrid.servicecontainer.executor.axis.AbstractAxisServiceExecutor から継承されたメソッド
convert, postprocessSoap, preprocessSoap
 
クラス jp.go.nict.langrid.servicecontainer.service.component.AbstractServiceExecutor から継承されたメソッド
getInvocationName, postprocess, preprocess
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

AxisAsyncTranslationServiceExecutor

public AxisAsyncTranslationServiceExecutor(String invocationName,
                                           long iid,
                                           Endpoint endpoint)
メソッドの詳細

startTranslation

public String startTranslation(String sourceLang,
                               String targetLang,
                               String[] sources)
                        throws InvalidParameterException,
                               ProcessFailedException
インタフェース AsyncTranslationService の記述:
非同期翻訳を行う。内部の翻訳スレッドが足りない場合、少なくとも1つが空くまで待機する。

定義:
インタフェース AsyncTranslationService 内の startTranslation
パラメータ:
sourceLang - 翻訳元言語(RFC3066準拠)
targetLang - 翻訳先言語(RFC3066準拠)
sources - 翻訳する文字列の配列
戻り値:
結果取得用トークン
例外:
InvalidParameterException - 不正なパラメータが渡された
ProcessFailedException - 翻訳処理に失敗した

getCurrentResult

public AsyncTranslationResult getCurrentResult(String token)
                                        throws InvalidParameterException,
                                               ProcessFailedException
インタフェース AsyncTranslationService の記述:
現在翻訳できている文章を取得する。 結果が0件の場合は、少なくとも1件が翻訳されるまで待機する。 翻訳が終了している場合、空配列を返す。

定義:
インタフェース AsyncTranslationService 内の getCurrentResult
パラメータ:
token - 結果取得用トークン
戻り値:
翻訳結果
例外:
InvalidParameterException - An invalid parameter was passed
ProcessFailedException - Translation process failed

terminate

public void terminate(String token)
               throws InvalidParameterException,
                      ProcessFailedException
インタフェース AsyncTranslationService の記述:
実行中の翻訳処理を中断する。

定義:
インタフェース AsyncTranslationService 内の terminate
パラメータ:
token - 結果取得用トークン
例外:
InvalidParameterException - An invalid parameter was passed
ProcessFailedException - Translation process failed