Class JsonServiceInstancesMarshaller<T>
java.lang.Object
org.apache.curator.x.discovery.server.entity.JsonServiceInstancesMarshaller<T>
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<ServiceInstances<T>>,- javax.ws.rs.ext.MessageBodyWriter<ServiceInstances<T>>
@Provider
public class JsonServiceInstancesMarshaller<T>
extends Object
implements javax.ws.rs.ext.MessageBodyReader<ServiceInstances<T>>, javax.ws.rs.ext.MessageBodyWriter<ServiceInstances<T>>
Message body reader/writer. Inject this as appropriate for the JAX-RS implementation you are using
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionlonggetSize(ServiceInstances<T> serviceInstances, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) booleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) readFrom(Class<ServiceInstances<T>> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> httpHeaders, InputStream entityStream) voidwriteTo(ServiceInstances<T> serviceInstances, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) 
- 
Constructor Details- 
JsonServiceInstancesMarshaller
 
- 
- 
Method Details- 
isReadablepublic boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
- isReadablein interface- javax.ws.rs.ext.MessageBodyReader<T>
 
- 
isWriteablepublic boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
- isWriteablein interface- javax.ws.rs.ext.MessageBodyWriter<T>
 
- 
getSizepublic long getSize(ServiceInstances<T> serviceInstances, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType) - Specified by:
- getSizein interface- javax.ws.rs.ext.MessageBodyWriter<T>
 
- 
readFrompublic ServiceInstances<T> readFrom(Class<ServiceInstances<T>> 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:
- readFromin interface- javax.ws.rs.ext.MessageBodyReader<T>
- Throws:
- IOException
- javax.ws.rs.WebApplicationException
 
- 
writeTopublic void writeTo(ServiceInstances<T> serviceInstances, 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:
- writeToin interface- javax.ws.rs.ext.MessageBodyWriter<T>
- Throws:
- IOException
- javax.ws.rs.WebApplicationException
 
 
-