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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getSize
(ServiceNames serviceNames, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isReadable
(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) boolean
isWriteable
(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) readFrom
(Class<ServiceNames> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) 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)
-
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 interfacejavax.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 interfacejavax.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 interfacejavax.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 interfacejavax.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 interfacejavax.ws.rs.ext.MessageBodyWriter<ServiceNames>
- Throws:
IOException
javax.ws.rs.WebApplicationException
-