@Published(tag="architect") public class JaxbBodyConverter extends BodyConverterSupport
BodyConverter実装クラス。| Modifier and Type | Method and Description |
|---|---|
protected void |
configure(javax.xml.bind.Marshaller marshaller)
Marshallerに対するオプション設定を行う。
このクラスではデフォルトで以下の設定でXMLの生成を行う。
設定を変更したい場合はサブクラス側で行う必要がある。
改行、インデントを使用した形式にフォーマットする。
文字コードはリソースメソッドのProducesに設定された文字コードを使用する。文字コードが設定されていない場合はデフォルトエンコーディングを使用する。 |
protected void |
configure(javax.xml.bind.Unmarshaller unmarshaller)
Unmarshallerに対するオプション設定を行う。
このクラスでは特に何も行わないので、オプション設定はサブクラス側で行う必要がある。 |
protected java.lang.Object |
convertRequest(HttpRequest request,
ExecutionContext context)
リクエストを変換する。
|
protected HttpResponse |
convertResponse(java.lang.Object response,
ExecutionContext context)
レスポンスを変換する。
|
boolean |
isConvertible(java.lang.String mediaType) |
getContentType, read, setDefaultEncoding, writeprotected java.lang.Object convertRequest(HttpRequest request, ExecutionContext context)
BodyConverterSupportconvertRequest in class BodyConverterSupportrequest - リクエストcontext - 実行コンテキストprotected HttpResponse convertResponse(java.lang.Object response, ExecutionContext context)
BodyConverterSupportconvertResponse in class BodyConverterSupportresponse - レスポンスオブジェクトcontext - 実行コンテキストpublic boolean isConvertible(java.lang.String mediaType)
protected void configure(javax.xml.bind.Marshaller marshaller)
Marshallerに対するオプション設定を行う。
このクラスではデフォルトで以下の設定でXMLの生成を行う。
設定を変更したい場合はサブクラス側で行う必要がある。
Producesに設定された文字コードを使用する。marshaller - Marshallerjavax.xml.bind.JAXBException - オプション設定に失敗した場合protected void configure(javax.xml.bind.Unmarshaller unmarshaller)
Unmarshallerに対するオプション設定を行う。
このクラスでは特に何も行わないので、オプション設定はサブクラス側で行う必要がある。unmarshaller - Unmarshallerjavax.xml.bind.JAXBException - オプション設定に失敗した場合