com.verisign.getdns

Class GetDNSFutureResult

  • All Implemented Interfaces:
    IGetDNSCallback, java.util.concurrent.Future<java.util.HashMap<java.lang.String,java.lang.Object>>


    public class GetDNSFutureResult
    extends java.lang.Object
    implements java.util.concurrent.Future<java.util.HashMap<java.lang.String,java.lang.Object>>, IGetDNSCallback

    This is used to consume response from methods invoked on IGetDNSContextAsyncWithFuture call implementation. It implements java Future.

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean cancel(boolean mayInterruptIfRunning)
      This method can be invoked to cancel the request
      java.util.HashMap<java.lang.String,java.lang.Object> get()
      This method will return response of a dns lookup.
      java.util.HashMap<java.lang.String,java.lang.Object> get(long timeout, java.util.concurrent.TimeUnit unit)
      This method will return response of a dns lookup.
      void handleResponse(java.util.HashMap<java.lang.String,java.lang.Object> response, java.lang.RuntimeException exception)
      This method will be invoked when the response to a dns query is ready.
      boolean isCancelled()
      This method will return true in case the dns request is canceled.
      boolean isDone()
      This method will return true when the dns lookup is complete
      • Methods inherited from class java.lang.Object

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

      • cancel

        public boolean cancel(boolean mayInterruptIfRunning)
                       throws GetDNSException
        This method can be invoked to cancel the request
        Specified by:
        cancel in interface java.util.concurrent.Future<java.util.HashMap<java.lang.String,java.lang.Object>>
        Throws:
        GetDNSException
      • get

        public java.util.HashMap<java.lang.String,java.lang.Object> get()
                                                                 throws java.lang.InterruptedException,
                                                                        java.util.concurrent.ExecutionException
        This method will return response of a dns lookup.
        Specified by:
        get in interface java.util.concurrent.Future<java.util.HashMap<java.lang.String,java.lang.Object>>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • get

        public java.util.HashMap<java.lang.String,java.lang.Object> get(long timeout,
                                                               java.util.concurrent.TimeUnit unit)
                                                                 throws java.lang.InterruptedException,
                                                                        java.util.concurrent.ExecutionException,
                                                                        java.util.concurrent.TimeoutException
        This method will return response of a dns lookup.
        Specified by:
        get in interface java.util.concurrent.Future<java.util.HashMap<java.lang.String,java.lang.Object>>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.util.concurrent.TimeoutException
      • handleResponse

        public void handleResponse(java.util.HashMap<java.lang.String,java.lang.Object> response,
                          java.lang.RuntimeException exception)
        Description copied from interface: IGetDNSCallback
        This method will be invoked when the response to a dns query is ready.
        Specified by:
        handleResponse in interface IGetDNSCallback
        Parameters:
        response - This is response from the dns query
        exception - This parameter will be non-null, in case there was a problem during the dns query.
      • isCancelled

        public boolean isCancelled()
        This method will return true in case the dns request is canceled.
        Specified by:
        isCancelled in interface java.util.concurrent.Future<java.util.HashMap<java.lang.String,java.lang.Object>>
      • isDone

        public boolean isDone()
        This method will return true when the dns lookup is complete
        Specified by:
        isDone in interface java.util.concurrent.Future<java.util.HashMap<java.lang.String,java.lang.Object>>