Class JsonServiceNamesMarshaller

java.lang.Object
org.apache.curator.x.discovery.server.entity.JsonServiceNamesMarshaller
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<ServiceNames>, javax.ws.rs.ext.MessageBodyWriter<ServiceNames>

@Provider public class JsonServiceNamesMarshaller extends Object implements javax.ws.rs.ext.MessageBodyReader<ServiceNames>, javax.ws.rs.ext.MessageBodyWriter<ServiceNames>
Message body reader/writer. Inject this as appropriate for the JAX-RS implementation you are using
  • Constructor Details

    • JsonServiceNamesMarshaller

      public JsonServiceNamesMarshaller()
  • Method Details

    • isReadable

      public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      isReadable in interface javax.ws.rs.ext.MessageBodyReader<ServiceNames>
    • readFrom

      public ServiceNames readFrom(Class<ServiceNames> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
      Specified by:
      readFrom in interface javax.ws.rs.ext.MessageBodyReader<ServiceNames>
      Throws:
      IOException
      javax.ws.rs.WebApplicationException
    • isWriteable

      public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<ServiceNames>
    • getSize

      public long getSize(ServiceNames serviceNames, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface javax.ws.rs.ext.MessageBodyWriter<ServiceNames>
    • writeTo

      public void writeTo(ServiceNames serviceNames, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface javax.ws.rs.ext.MessageBodyWriter<ServiceNames>
      Throws:
      IOException
      javax.ws.rs.WebApplicationException