Class DNS_PING

    • Field Detail

      • DEFAULT_DNS_FACTORY

        private static final java.lang.String DEFAULT_DNS_FACTORY
        See Also:
        Constant Field Values
      • DEFAULT_DNS_RECORD_TYPE

        private static final java.lang.String DEFAULT_DNS_RECORD_TYPE
        See Also:
        Constant Field Values
      • dns_context_factory

        protected java.lang.String dns_context_factory
      • dns_address

        protected java.lang.String dns_address
      • dns_record_type

        protected java.lang.String dns_record_type
      • dns_query

        protected java.lang.String dns_query
      • probe_transport_ports

        protected boolean probe_transport_ports
      • dns_resolver

        protected volatile DNSResolver dns_resolver
      • transportPort

        private int transportPort
      • portRange

        private int portRange
    • Constructor Detail

      • DNS_PING

        public DNS_PING()
    • Method Detail

      • init

        public void init()
                  throws java.lang.Exception
        Description copied from class: Protocol
        Called after a protocol has been created and before the protocol is started. Attributes are already set. Other protocols are not yet connected and events cannot yet be sent.
        Specified by:
        init in interface Lifecycle
        Overrides:
        init in class Discovery
        Throws:
        java.lang.Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the the channel constructor will throw an exception
      • validateProperties

        protected void validateProperties()
      • getMembers

        java.util.List<Address> getMembers​(java.lang.String dns_query,
                                           DNSResolver.DNSRecordType dns_record_type)
        Gets a list of IP addresses for the provided DNS query list and record type.
        Parameters:
        dns_query - A comma-separated list of DNS queries. Must not be null.
        dns_record_type - The DNS record type.
        Returns:
        A list of IP addresses corresponding to the provided DNS query list and record type. An empty list is returned if the provided DNS query does not resolve to any IP addresses.
        Throws:
        java.lang.NullPointerException - if dns_query is null.
      • fetchFromDns

        public java.lang.String fetchFromDns()
      • findMembers

        public void findMembers​(java.util.List<Address> members,
                                boolean initial_discovery,
                                Responses responses)
        Description copied from class: Discovery
        Fetches information (e.g. physical address, logical name) for the given member addresses. Needs to add responses to the Responses object. If Discovery.async_discovery is true, this method will be called in a separate thread, otherwise the caller's thread will be used.
        Specified by:
        findMembers in class Discovery
        Parameters:
        members - A list of logical addresses (typically UUIDs). If null, then information for all members is fetched
        initial_discovery - Set to true if this is for the initial membership discovery. Some protocols (e.g. file based ones) may return only the information for the coordinator(s).
        responses - The list to which responses should be added
      • sendDiscoveryRequest

        protected void sendDiscoveryRequest​(Message req)