Package java.net

Examples of java.net.InetAddress$WaitReachable


      Map  map = BDecoder.decode( data, 0, length );
           
      long  version = ((Long)map.get( "ver" )).longValue();
      long  type  = ((Long)map.get( "type" )).longValue();
     
      InetAddress  originator_address = originator.getAddress();
     
      if ( map.get( "explicit" ) != null ){
       
        addInstanceSupport( originator_address, false );
      }
View Full Code Here


 
  protected void
  addAddresses(
    AZInstance  inst )
  {
    InetAddress  internal_address   = inst.getInternalAddress();
    InetAddress  external_address  = inst.getExternalAddress();
    int      tcp          = inst.getTCPListenPort();
    int      udp          = inst.getUDPListenPort();
    int      udp2        = inst.getUDPNonDataListenPort();
   
    modifyAddresses( internal_address, external_address, tcp, udp, udp2, true );
View Full Code Here

  protected void
  removeAddresses(
    AZOtherInstanceImpl  inst )
  {
    List    internal_addresses   = inst.getInternalAddresses();
    InetAddress  external_address  = inst.getExternalAddress();
    int      tcp          = inst.getTCPListenPort();
    int      udp          = inst.getUDPListenPort();
    int      udp2        = inst.getUDPNonDataListenPort();

    for (int i=0;i<internal_addresses.size();i++){
View Full Code Here

      if ( !int_ip.equals("0.0.0.0")){
       
        internal_address = InetAddress.getByName( int_ip );
      }

      InetAddress  external_address = InetAddress.getByName( ext_ip );
     
        // ignore incompatible address mappings
     
      if ( internal_address instanceof Inet4Address == external_address instanceof Inet4Address ){
       
View Full Code Here

  update(
    AZOtherInstanceImpl  new_inst )
  {   
    alive_time  = SystemTime.getCurrentTime();
   
    InetAddress  new_address = new_inst.getInternalAddress();
   
    boolean  same = true;
   
    if ( !internal_addresses.contains( new_address )){
     
View Full Code Here

    if ( ip == null ){
     
      return( result );
    }
   
    InetAddress adjusted = getAdjustedIP();
   
    if ( adjusted == ip ){
     
      result.add( ip );
     
    }else{
     
      List l = AddressUtils.getLANAddresses( adjusted.getHostAddress());
     
      for (int i=0;i<l.size();i++){
       
        try{
          result.add( InetAddress.getByName((String)l.get(i)));
View Full Code Here

    if ( msg_registration == null ){
           
      throw( new BuddyPluginException( "Messaging system unavailable" ));
    }
   
    InetAddress ip = getIP();
   
    if ( ip == null ){
           
      throw( new BuddyPluginException( "Friend offline (no usable IP address)" ));
    }
View Full Code Here

    if ( instance == my_instance ){
     
      return;
    }
   
    InetAddress  my_ext     = my_instance.getExternalAddress();
    InetAddress  other_ext   = instance.getExternalAddress();
   
    if (   my_ext.isLoopbackAddress() ||
        other_ext.isLoopbackAddress() ||
        my_ext.equals( other_ext )){
   
      String  warning = null;
     
      int  my_tcp = my_instance.getTCPListenPort();
View Full Code Here

     
      return( false );
    }
   
    try{
      InetAddress address = HostNameToIPResolver.syncResolve( ip );
     
      final String host_address = address.getHostAddress();
     
      if ( cache_ips.contains( host_address )){
 
        return( false );
      }
View Full Code Here

    if ( !isEnabled()){
     
      throw( new RuntimeException( "DHT isn't enabled" ));
    }

    InetAddress contact_address = address.getAddress();
   
    for ( DHTPluginImpl dht: dhts ){
     
      InetAddress dht_address = dht.getLocalAddress().getAddress().getAddress();
     
      if (   ( contact_address instanceof Inet4Address && dht_address instanceof Inet4Address ) ||
          ( contact_address instanceof Inet6Address && dht_address instanceof Inet6Address )){
       
        return( dht.importContact( address, version ));
View Full Code Here

TOP

Related Classes of java.net.InetAddress$WaitReachable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.