Class ReverseDNSRunnable

java.lang.Object
org.apereo.cas.support.spnego.util.ReverseDNSRunnable
All Implemented Interfaces:
Runnable

public class ReverseDNSRunnable extends Object implements Runnable
Utility class to perform DNS work in a threaded, timeout-able way Adapted from: here.
Since:
4.1
  • Constructor Summary

    Constructors
    Constructor
    Description
    Simple constructor which also pre-sets hostName attribute for failover situations.
  • Method Summary

    Modifier and Type
    Method
    Description
    Remote user hostname.
    Remote user IP address.
    void
    run()
    Runnable implementation to thread the work done in this class, allowing the implementer to set a thread timeout and thereby short-circuit the lookup.
    void
    set(String hostName)
    Glorified setter with logging.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ReverseDNSRunnable

      public ReverseDNSRunnable(String ipAddress)
      Simple constructor which also pre-sets hostName attribute for failover situations.
      Parameters:
      ipAddress - the ip address on which reverse DNS will be done.
  • Method Details

    • run

      public void run()
      Runnable implementation to thread the work done in this class, allowing the implementer to set a thread timeout and thereby short-circuit the lookup.
      Specified by:
      run in interface Runnable
    • set

      public void set(String hostName)
      Glorified setter with logging.
      Parameters:
      hostName - the resolved hostname
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getIpAddress

      public String getIpAddress()
      Remote user IP address.
    • getHostName

      public String getHostName()
      Remote user hostname.