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 用 外部翻訳サービス呼び出しクラス
クラス 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