org.apache.wink.providers.protobuf
Class WinkProtobufProvider
java.lang.Object
org.apache.wink.providers.protobuf.WinkProtobufProvider
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<com.google.protobuf.Message>, javax.ws.rs.ext.MessageBodyWriter<com.google.protobuf.Message>
@Provider
public class WinkProtobufProvider
- extends java.lang.Object
- implements javax.ws.rs.ext.MessageBodyReader<com.google.protobuf.Message>, javax.ws.rs.ext.MessageBodyWriter<com.google.protobuf.Message>
JAX-RS message provider for Google Protocol Buffer
Field Summary |
static java.lang.String |
PROTOBUF
|
Method Summary |
long |
getSize(com.google.protobuf.Message t,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
boolean |
isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
boolean |
isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
com.google.protobuf.Message |
readFrom(java.lang.Class<com.google.protobuf.Message> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders,
java.io.InputStream entityStream)
|
void |
writeTo(com.google.protobuf.Message t,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
java.io.OutputStream entityStream)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROTOBUF
public static final java.lang.String PROTOBUF
- See Also:
- Constant Field Values
WinkProtobufProvider
public WinkProtobufProvider()
isReadable
public boolean isReadable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
- Specified by:
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<com.google.protobuf.Message>
readFrom
public com.google.protobuf.Message readFrom(java.lang.Class<com.google.protobuf.Message> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> httpHeaders,
java.io.InputStream entityStream)
throws java.io.IOException,
javax.ws.rs.WebApplicationException
- Specified by:
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<com.google.protobuf.Message>
- Throws:
java.io.IOException
javax.ws.rs.WebApplicationException
isWriteable
public boolean isWriteable(java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<com.google.protobuf.Message>
getSize
public long getSize(com.google.protobuf.Message t,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<com.google.protobuf.Message>
writeTo
public void writeTo(com.google.protobuf.Message t,
java.lang.Class<?> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
java.io.OutputStream entityStream)
throws java.io.IOException,
javax.ws.rs.WebApplicationException
- Specified by:
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<com.google.protobuf.Message>
- Throws:
java.io.IOException
javax.ws.rs.WebApplicationException
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.