jp.go.nict.langrid.client.ws_1_2.error
クラス ExceptionConverter

java.lang.Object
  上位を拡張 jp.go.nict.langrid.client.ws_1_2.error.ExceptionConverter

public class ExceptionConverter
extends Object

サービス呼び出し時に発生した例外を変換する。

バージョン:
$Revision: 12099 $
作成者:
$Author: Takao Nakaguchi $

フィールドの概要
protected static Map<Class<? extends LangridException>,LangridError> errors
           
 
コンストラクタの概要
ExceptionConverter()
           
 
メソッドの概要
static void addErrorMapping(Class<? extends LangridException> clazz, LangridError error)
           
static LangridException convert(InvocationTargetException exception, URL serviceUrl, String operationName, Object... parameters)
          例外をLangridで定義されているものに変換する。
static LangridException convertToE000(String message, URL serviceUrl, String operationName, Object... parameters)
          E000例外を作成する。
static LangridException convertToE000(Throwable exception, URL serviceUrl, String operationName, Object... parameters)
          E000例外を作成する。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

errors

protected static Map<Class<? extends LangridException>,LangridError> errors
コンストラクタの詳細

ExceptionConverter

public ExceptionConverter()
メソッドの詳細

convert

public static LangridException convert(InvocationTargetException exception,
                                       URL serviceUrl,
                                       String operationName,
                                       Object... parameters)
例外をLangridで定義されているものに変換する。

パラメータ:
exception - 発生した例外
serviceUrl - サービスURL
operationName - 操作名
parameters - パラメータ
戻り値:
Langridで定義されている例外

convertToE000

public static LangridException convertToE000(Throwable exception,
                                             URL serviceUrl,
                                             String operationName,
                                             Object... parameters)
E000例外を作成する。

パラメータ:
exception - 発生した例外
serviceUrl - サービスURL
operationName - 操作名
parameters - パラメータ
戻り値:
Langridで定義されている例外

convertToE000

public static LangridException convertToE000(String message,
                                             URL serviceUrl,
                                             String operationName,
                                             Object... parameters)
E000例外を作成する。

パラメータ:
message - 例外メッセージ
serviceUrl - サービスURL
operationName - 操作名
parameters - パラメータ
戻り値:
Langridで定義されている例外

addErrorMapping

public static void addErrorMapping(Class<? extends LangridException> clazz,
                                   LangridError error)