クラスの使用
jakarta.ws.rs.WebApplicationException
WebApplicationException を使用するパッケージ パッケージ 説明 jakarta.ws.rs RESTful サービスリソースの作成に使用される高レベルのインターフェースとアノテーション。jakarta.ws.rs.core RESTful サービスリソースの作成に使用される低レベルのインターフェースとアノテーション。jakarta.ws.rs.ext JAX-RS API でサポートされる型の拡張を提供する API。jakarta.ws.rs 内の WebApplicationException 使用
jakarta.ws.rs 内の WebApplicationException サブクラス 修飾子と型 クラス 説明 classBadRequestExceptionbad client requestを示す実行時例外。classClientErrorExceptionクライアントリクエストエラーを示す基本ランタイムアプリケーション例外(HTTP4xxステータスコード)。classForbiddenExceptionクライアントによってリクエストされたリソースへのアクセスがサーバーによってforbiddenであったことを示す実行時例外。classInternalServerErrorExceptioninternal server errorを示す実行時例外。classNotAcceptableExceptionサーバーによるクライアントリクエストがnot acceptableであることを示す実行時例外。classNotAllowedExceptionnot allowedであるリソースメソッドをリクエストしているクライアントを示す実行時例外。classNotAuthorizedException次のシナリオのいずれかが原因でリクエストの認可が失敗したことを示すランタイム例外: クライアントが、リクエストされたリソースにアクセスするために必要な認可の認証情報を送信しませんでした。classNotFoundExceptionクライアントによってリクエストされたリソースを示すランタイム例外は、サーバー上のnot foundでした。classNotSupportedExceptionクライアントリクエストエンティティのメディア型がnot supportedであることを示す実行時例外。classRedirectionExceptionリクエストのリダイレクトを示すランタイムアプリケーション例外(HTTP3xxステータスコード)。classServerErrorExceptionサーバーエラーを示すベースランタイムアプリケーション例外(HTTP5xxステータスコード)。classServiceUnavailableExceptionリクエストされたリソースcannot be servedを示す実行時例外。jakarta.ws.rs.core 内の WebApplicationException 使用
WebApplicationException をスローする jakarta.ws.rs.core のメソッド 修飾子と型 メソッド 説明 EntityPartEntityPart.Builder. build()指定されたプロパティ値を使用して、新しい EntityPart インスタンスを構築します。<T> TEntityPart. getContent(GenericType<T> type)このパーツのコンテンツストリームを指定された型に変換して返します。<T> TEntityPart. getContent(ClassSE<T> type)このパーツのコンテンツストリームを指定されたクラスに変換して返します。voidStreamingOutput. write(OutputStreamSE output)メッセージ本文を書き込むために呼び出されます。jakarta.ws.rs.ext 内の WebApplicationException 使用
WebApplicationException をスローする jakarta.ws.rs.ext のメソッド 修飾子と型 メソッド 説明 ObjectSEReaderInterceptor. aroundReadFrom(ReaderInterceptorContext context)voidWriterInterceptor. aroundWriteTo(WriterInterceptorContext context)ObjectSEReaderInterceptorContext. proceed()チェーンの次のインターセプターに進みます。voidWriterInterceptorContext. proceed()チェーンの次のインターセプターに進みます。TMessageBodyReader. readFrom(ClassSE<T> type, TypeSE genericType, AnnotationSE[] annotations, MediaType mediaType, MultivaluedMap<StringSE,StringSE> httpHeaders, InputStreamSE entityStream)InputStreamSE から型を読み取ります。voidMessageBodyWriter. writeTo(T t, ClassSE<?> type, TypeSE genericType, AnnotationSE[] annotations, MediaType mediaType, MultivaluedMap<StringSE,ObjectSE> httpHeaders, OutputStreamSE entityStream)型を HTTP メッセージに書き込みます。