public abstract class AbstractWorkerModule<V,C extends ResourceApiWrapperBase> extends Object
Constructor and Description |
---|
AbstractWorkerModule(C resourceWrapper,
V[] resultType,
String strLogName,
AbstractWorkerModuleBase workerBase)
コンストラクタ
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
callResourceApi(C wrapper,
ResourceApiWrapperReceiver<V> receiver)
低レベルレイヤーのサービスを呼び出す
抽象メソッドである、AbstractWorkerModuleを使用するクラスで実装を行う。 |
V[] |
getResult()
サービス検索呼び出し
ワーカーサービスは、本メソッドを呼び出して、検索結果を取得する。 |
void |
printLog(String msg)
任意ログ出力
|
protected void |
pushResourceWrapper(C ac)
ResourceWrapperを保存
|
public AbstractWorkerModule(C resourceWrapper, V[] resultType, String strLogName, AbstractWorkerModuleBase workerBase)
resourceWrapper
- ResourceWrapperresultType
- サービスの結果型strLogName
- ログ表示名workerBase
- ワーカーベースクラスpublic V[] getResult() throws ProcessFailedException
ProcessFailedException
protected void pushResourceWrapper(C ac)
ac
- ResourceWrapperprotected abstract void callResourceApi(C wrapper, ResourceApiWrapperReceiver<V> receiver) throws ProcessFailedException
wrapper
- ResourceWrapperreceiver
- 結果通知用レシーバProcessFailedException
public void printLog(String msg)
msg
- メッセージCopyright (C) 2014 Information Analysis Laboratory, NICT
RaSC is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.
RaSC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see (http://www.gnu.org/licenses/) .