Class OAuthTokenWebListener

  • All Implemented Interfaces:

    public class OAuthTokenWebListener
    extends java.lang.Object
    implements java.util.concurrent.Callable<OAuthTokenFinish>
    This class creates a server handling the OAuth callback URLs. It has two tasks. First it is responsible for executing OAuthTokenInterceptor depending on a path defined by the interceptor itself. Furthermore it does the token parsing in the URL using a OAuthTokenExtractor.
    • Method Detail

      • start

        public start()
        Start the server created by the @{link Builder}.
        A callback URI which should be used during the OAuth process.
      • getToken

        public java.util.concurrent.Future<OAuthTokenFinishgetToken()
        Get the token generated by the OAuth process. In fact, this class returns a Future because the token may not be received by the server when this method is called.
        Returns an OAuthTokenFinish wrapped in a Future. The OAuthTokenFinish should at least contain a token
      • stop

        public void stop()
        Stop the listener server so the port becomes available again.
      • finalize

        public void finalize()
                      throws java.lang.Throwable
        finalize in class java.lang.Object