@RegisterProvider(UnknownWidgetExceptionMapper.class)
public interface MyClientService {
@GET
@Path("/myService/{id}")
Widget getWidget(@PathParam("id") String id) throws UnknownWidgetException;
}
...
public class UnknownWidgetExceptionMapper implements ResponseExceptionMapper {
@Override
UnknownWidgetException toThrowable(Response response) {
String msg = "Could not find widget with ID of " + response.getHeaderString("WidgetId");
return new UnknownWidgetException(msg)
}
}
| Modifier and Type | Interface and Description |
|---|---|
| public interface | AsyncInvocationInterceptor
Implementations of this interface can intercept asynchronous method invocations. |
| public interface | AsyncInvocationInterceptorFactory
This is a provider interface intended for intercepting asynchronous method invocations. |
| public interface | ClientHeadersFactory
This interface is intended for generating or propagating HTTP headers. |
| public interface | ResponseExceptionMapper<T extends Throwable>
Converts an Jakarta RESTful Web Services Response object into an Exception. |
| Modifier and Type | Class and Description |
|---|---|
| public class | DefaultClientHeadersFactoryImpl
This class propagates Jakarta RESTful Web Services headers whose names are specified using the MicroProfile Config
property, |
| Modifier and Type | Enum and Description |
|---|---|
| public enum | QueryParamStyle
A QueryParamStyle enum is used to specify how multiple values are handled when constructing the query portion of the URI. |