Class OAuth2FlowFacebookBuilder.FacebookTokenMessageBodyReader

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<TokenResult>
    Enclosing class:
    OAuth2FlowFacebookBuilder

    @Consumes("text/plain")
    static class OAuth2FlowFacebookBuilder.FacebookTokenMessageBodyReader
    extends java.lang.Object
    implements javax.ws.rs.ext.MessageBodyReader<TokenResult>
    Entity provider that deserializes entity returned from Access Token request into TokenResult. The format of data is in query param style: "access_token=45a64a654&expires_in=3600".
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isReadable​(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)  
      TokenResult readFrom​(java.lang.Class<TokenResult> 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FacebookTokenMessageBodyReader

        FacebookTokenMessageBodyReader()
    • Method Detail

      • 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<TokenResult>
      • readFrom

        public TokenResult readFrom​(java.lang.Class<TokenResult> 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<TokenResult>
        Throws:
        java.io.IOException
        javax.ws.rs.WebApplicationException