org.apache.wink.providers.thrift
Class WinkThriftProvider
java.lang.Object
org.apache.wink.providers.thrift.WinkThriftProvider
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<org.apache.thrift.TBase>, javax.ws.rs.ext.MessageBodyWriter<org.apache.thrift.TBase>
@Provider
public class WinkThriftProvider
- extends java.lang.Object
- implements javax.ws.rs.ext.MessageBodyReader<org.apache.thrift.TBase>, javax.ws.rs.ext.MessageBodyWriter<org.apache.thrift.TBase>
JAX-RS message provider for Apache Thrift
Field Summary |
static java.lang.String |
THRIFT
|
static javax.ws.rs.core.MediaType |
THRIFT_TYPE
|
Method Summary |
long |
getSize(org.apache.thrift.TBase 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)
|
org.apache.thrift.TBase |
readFrom(java.lang.Class<org.apache.thrift.TBase> 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(org.apache.thrift.TBase 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 |
THRIFT
public static final java.lang.String THRIFT
- See Also:
- Constant Field Values
THRIFT_TYPE
public static final javax.ws.rs.core.MediaType THRIFT_TYPE
WinkThriftProvider
public WinkThriftProvider()
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<org.apache.thrift.TBase>
readFrom
public org.apache.thrift.TBase readFrom(java.lang.Class<org.apache.thrift.TBase> 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<org.apache.thrift.TBase>
- 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<org.apache.thrift.TBase>
getSize
public long getSize(org.apache.thrift.TBase 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<org.apache.thrift.TBase>
writeTo
public void writeTo(org.apache.thrift.TBase 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<org.apache.thrift.TBase>
- Throws:
java.io.IOException
javax.ws.rs.WebApplicationException
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.