public interface WriterInterceptorContext extends InterceptorContext
MessageBodyWriter.writeTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, java.io.OutputStream)
への呼び出しをインターセプトするために WriterInterceptor
によって使用されるコンテキストクラス。このコンテキストクラスの getter および setter は、インターセプトされたメソッドのパラメーターに対応します。WriterInterceptor
, MessageBodyWriter
修飾子と型 | メソッドと説明 |
---|---|
ObjectSE | getEntity() HTTP エンティティとして書き込まれるオブジェクトを取得します。 |
MultivaluedMap<StringSE, ObjectSE> | getHeaders() HTTP ヘッダーの可変マップを取得します。 |
OutputStreamSE | getOutputStream() 書き込むオブジェクトの出力ストリームを取得します。 |
void | proceed() チェーンの次のインターセプターに進みます。 |
void | setEntity(ObjectSE entity) HTTP エンティティとして書き込まれるオブジェクトを更新します。 |
void | setOutputStream(OutputStreamSE os) 書き込むオブジェクトの新しい出力ストリームを設定します。 |
getAnnotations, getGenericType, getMediaType, getProperty, getPropertyNames, getType, removeProperty, setAnnotations, setGenericType, setMediaType, setProperty, setType
void proceed() throws IOExceptionSE, WebApplicationException
MessageBodyWriter.writeTo(T, java.lang.Class<?>, java.lang.reflect.Type, java.lang.annotation.Annotation[], javax.ws.rs.core.MediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String, java.lang.Object>, java.io.OutputStream)
メソッドが呼び出されます。IOExceptionSE
- IO エラーが発生した場合、またはラップされた MessageBodyWriter.writeTo
メソッドによってスローされた場合。WebApplicationException
- ラップされた MessageBodyWriter.writeTo
メソッドによってスローされます。ObjectSE getEntity()
void setEntity(ObjectSE entity)
entity
- 書き込まれる新しいオブジェクト。OutputStreamSE getOutputStream()
void setOutputStream(OutputStreamSE os)
os
- 書き込まれるオブジェクトの新しい出力ストリーム。MultivaluedMap<StringSE,ObjectSE> getHeaders()
Copyright © 2019 Eclipse Foundation.
Use is subject to license terms.