de.deepamehta.plugins.webservice.provider
Class StringCollectionProvider

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.plugins.webservice.provider.StringCollectionProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<List<String>>, javax.ws.rs.ext.MessageBodyWriter<Collection<String>>

@Provider
public class StringCollectionProvider
extends Object
implements javax.ws.rs.ext.MessageBodyReader<List<String>>, javax.ws.rs.ext.MessageBodyWriter<Collection<String>>


Field Summary
private  Logger logger
           
 
Constructor Summary
StringCollectionProvider()
           
 
Method Summary
 long getSize(Collection<String> strings, 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)
           
 List<String> readFrom(Class<List<String>> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
           
 void writeTo(Collection<String> strings, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private Logger logger
Constructor Detail

StringCollectionProvider

public StringCollectionProvider()
Method Detail

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<List<String>>

readFrom

public List<String> readFrom(Class<List<String>> 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<List<String>>
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<Collection<String>>

getSize

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

writeTo

public void writeTo(Collection<String> strings,
                    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<Collection<String>>
Throws:
IOException
javax.ws.rs.WebApplicationException


Copyright © 2013. All Rights Reserved.