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>

@Provider public class StringBeanEntityProviderWithInjectables extends StringBeanEntityProvider
  • 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 interface jakarta.ws.rs.ext.MessageBodyWriter<StringBean>
      Overrides:
      getSize in class StringBeanEntityProvider
    • 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 interface jakarta.ws.rs.ext.MessageBodyWriter<StringBean>
      Overrides:
      writeTo in class StringBeanEntityProvider
      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 interface jakarta.ws.rs.ext.MessageBodyReader<StringBean>
      Overrides:
      readFrom in class StringBeanEntityProvider
      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

      public 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. 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

      public 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. 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.