@Published(tag="architect") public abstract class BodyConverterSupport extends java.lang.Object implements BodyConverter
BodyConverterの実装クラスをサポートするクラス。| Modifier and Type | Class and Description | 
|---|---|
| static class  | BodyConverterSupport.ContentTypeContentTypeを表すクラス。 | 
| Constructor and Description | 
|---|
| BodyConverterSupport() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract java.lang.Object | convertRequest(HttpRequest request,
              ExecutionContext context)リクエストを変換する。 | 
| protected abstract HttpResponse | convertResponse(java.lang.Object response,
               ExecutionContext context)レスポンスを変換する。 | 
| protected BodyConverterSupport.ContentType | getContentType(java.lang.String mediaType)メディアタイプからContent-Typeを取得する。
 
 メディアタイプにcharsetが含まれている場合は、エンコーディング名の正当性を確認し、
 問題がなければ、指定されたメディアタイプをそのままContent-Typeの値とする。
 エンコーディング名が不正な場合は実行時例外を送出する。
 
 メディアタイプにcharsetが含まれていない場合は、デフォルトのエンコーディングを
 メディアタイプに付けたものをContent-Typeの値とする。 | 
| java.lang.Object | read(HttpRequest request,
    ExecutionContext executionContext)メディアタイプに応じてリクエストボディ部を読み込み、Beanオブジェクトに変換する。 | 
| void | setDefaultEncoding(java.lang.String name)デフォルトエンコーディングを設定する。 | 
| HttpResponse | write(java.lang.Object response,
     ExecutionContext executionContext)Beanオブジェクトをメディアタイプに応じて変換し、レスポンスボディ部へ書き込む。 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisConvertiblepublic void setDefaultEncoding(java.lang.String name)
name - エンコーディング名public java.lang.Object read(HttpRequest request, ExecutionContext executionContext)
BodyConverterread in interface BodyConverterrequest - HTTPリクエストexecutionContext - 実行コンテキストprotected abstract java.lang.Object convertRequest(HttpRequest request, ExecutionContext context)
request - リクエストcontext - 実行コンテキストpublic HttpResponse write(java.lang.Object response, ExecutionContext executionContext)
BodyConverterwrite in interface BodyConverterresponse - BeanオブジェクトexecutionContext - 実行コンテキストprotected abstract HttpResponse convertResponse(java.lang.Object response, ExecutionContext context)
response - レスポンスオブジェクトcontext - 実行コンテキストprotected BodyConverterSupport.ContentType getContentType(java.lang.String mediaType)
mediaType - メディアタイプBodyConverterSupport.ContentType