Class StringBeanEntityProviderWithInjectables
java.lang.Object
ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider
ee.jakarta.tck.ws.rs.spec.context.server.StringBeanEntityProviderWithInjectables
- All Implemented Interfaces:
jakarta.ws.rs.ext.MessageBodyReader<StringBean>
,jakarta.ws.rs.ext.MessageBodyWriter<StringBean>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
computeMask
(jakarta.ws.rs.core.Application application, jakarta.ws.rs.core.UriInfo info, jakarta.ws.rs.core.Request request, jakarta.ws.rs.core.HttpHeaders headers, jakarta.ws.rs.core.SecurityContext security, jakarta.ws.rs.ext.Providers providers, jakarta.ws.rs.container.ResourceContext resources, jakarta.ws.rs.core.Configuration configuration) Chosen decimal as a representation to be more human readablelong
getSize
(StringBean t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) static String
notInjected
(String sMask) Here, the bitwise operation with mask variable would be more efficient, but less human readable when sending over the link as a binary number.static final String
notInjected
(String sMask, int index) Here, the bitwise operation with mask variable would be more efficient, but less human readable when sending over the link as a binary number.readFrom
(Class<StringBean> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) void
writeTo
(StringBean t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) Methods inherited from class ee.jakarta.tck.ws.rs.common.provider.StringBeanEntityProvider
isReadable, isWriteable
-
Constructor Details
-
StringBeanEntityProviderWithInjectables
public StringBeanEntityProviderWithInjectables()
-
-
Method Details
-
getSize
public long getSize(StringBean t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
getSize
in interfacejakarta.ws.rs.ext.MessageBodyWriter<StringBean>
- Overrides:
getSize
in classStringBeanEntityProvider
-
writeTo
public void writeTo(StringBean t, Class<?> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
writeTo
in interfacejakarta.ws.rs.ext.MessageBodyWriter<StringBean>
- Overrides:
writeTo
in classStringBeanEntityProvider
- Throws:
IOException
jakarta.ws.rs.WebApplicationException
-
readFrom
public StringBean readFrom(Class<StringBean> type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, jakarta.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, jakarta.ws.rs.WebApplicationException- Specified by:
readFrom
in interfacejakarta.ws.rs.ext.MessageBodyReader<StringBean>
- Overrides:
readFrom
in classStringBeanEntityProvider
- Throws:
IOException
jakarta.ws.rs.WebApplicationException
-
computeMask
public static String computeMask(jakarta.ws.rs.core.Application application, jakarta.ws.rs.core.UriInfo info, jakarta.ws.rs.core.Request request, jakarta.ws.rs.core.HttpHeaders headers, jakarta.ws.rs.core.SecurityContext security, jakarta.ws.rs.ext.Providers providers, jakarta.ws.rs.container.ResourceContext resources, jakarta.ws.rs.core.Configuration configuration) Chosen decimal as a representation to be more human readable -
notInjected
Here, the bitwise operation with mask variable would be more efficient, but less human readable when sending over the link as a binary number. Hence, sMask is supposed to be decimal number created by writeTo method. If something has not been injected, and thus not written by writeTo, this static method parses what it was not injected. -
notInjected
Here, the bitwise operation with mask variable would be more efficient, but less human readable when sending over the link as a binary number. Hence, sMask is supposed to be decimal number created by writeTo method. If something has not been injected, and thus not written by writeTo, this static method parses what it was not injected.
-