Package java.net

Examples of java.net.InetAddress$InetAddressHolder


   
    // create the layer described by INETADDRESSES
    protocol = Configurator.createProtocol(addressProps, stack) ;
       
    // get the value which should have been assigned a default
    InetAddress a = ((INETADDRESSES)protocol).getInetAddressField() ;
    System.out.println("value of inetAddressField = " + a) ;
   
    // get the value which should not have been assigned a default
    InetAddress b = ((INETADDRESSES)protocol).getInetAddressMethod() ;
    System.out.println("value of inetAddressMethod = " + b) ;
   
    // get the value which should have been assigned a default
    List<IpAddress> c = ((INETADDRESSES)protocol).getIpAddressListField() ;
    System.out.println("value of ipAddressListField = " + c) ;
View Full Code Here


    this.hostName = host.toLowerCase();
      this.portNumber = port;
     
      //only cache inetaddresses if they represent the ip.
      try {
      InetAddress addr = InetAddress.getByName(this.hostName);
      if (addr.getHostAddress().equalsIgnoreCase(this.hostName)) {
        this.inetAddress = addr;
      }
    } catch (UnknownHostException e) {
    }
    }
View Full Code Here

    return new SocketServerConnection(this, url.isUsingSSL(), discovery, connectionProperties);
  }

  static void updateConnectionProperties(Properties connectionProperties) {
    try {
      InetAddress addr = InetAddress.getLocalHost();
      connectionProperties.put(TeiidURL.CONNECTION.CLIENT_IP_ADDRESS, addr.getHostAddress());
      connectionProperties.put(TeiidURL.CONNECTION.CLIENT_HOSTNAME, addr.getCanonicalHostName());
        } catch (UnknownHostException err1) {
          connectionProperties.put(TeiidURL.CONNECTION.CLIENT_IP_ADDRESS, "UnknownClientAddress"); //$NON-NLS-1$
        }
  }
View Full Code Here

    if (host == null || host.trim().length() == 0) {
      System.out.println("Using undefined host: " + UNDEFINED_HOSTNAME);
      host = UNDEFINED_HOSTNAME;
    }
    if ("0.0.0.0".equals(host)) {
      InetAddress localHost = InetAddress.getLocalHost();
      System.out.println("Using local host: " + localHost.getHostName());
      host = localHost.getHostName();
    }
    this.webServiceHost = host;
  }
View Full Code Here

      System.out.println("Expected exception received: " + e.getMessage()) ;
      throw e ;
    }
   
    // get the value which should have been assigned a default
    InetAddress a = ((IPCHECK)protocol).getInetAddress1() ;
    System.out.println("value of inetAddress1 = " + a) ;
   
    InetAddress b = ((IPCHECK)protocol).getInetAddress2() ;
    System.out.println("value of inetAddress2 = " + b) ;
   
    InetAddress c = ((IPCHECK)protocol).getInetAddress3() ;
    System.out.println("value of inetAddress3 = " + c) ;
   
  }
View Full Code Here

    inetAddressMap = Configurator.createInetAddressMap(protocol_configs, protocols) ;
        Collection<InetAddress> addrs=Configurator.getAddresses(inetAddressMap);
    Configurator.determineIpVersionFromAddresses(addrs) ;

    // get the value which should have been assigned a default
    InetAddress a = ((IPCHECK)protocol).getInetAddress1() ;
    System.out.println("value of inetAddress1 = " + a) ;
   
    InetAddress b = ((IPCHECK)protocol).getInetAddress2() ;
    System.out.println("value of inetAddress2 = " + b) ;
   
    InetAddress c = ((IPCHECK)protocol).getInetAddress3() ;
    System.out.println("value of inetAddress3 = " + c) ;
   
  }
View Full Code Here


    protected static void makeUnique(Channel channel, int num) throws Exception {
        ProtocolStack stack=channel.getProtocolStack();
        TP transport=stack.getTransport();
        InetAddress bind_addr=transport.getBindAddressAsInetAddress();

        if(transport instanceof UDP) {
            String mcast_addr=ResourceManager.getNextMulticastAddress();
            short mcast_port=ResourceManager.getNextMulticastPort(bind_addr);
            ((UDP)transport).setMulticastAddress(InetAddress.getByName(mcast_addr));
View Full Code Here

            if (!ipAddress.equals(ip)) {
                throw getExceptionAlreadyInUse("Locked by another computer: " + ip);
            }
            String port = p2.getProperty("port", "0");
            int portId = Integer.parseInt(port);
            InetAddress address;
            try {
                address = InetAddress.getByName(ip);
            } catch (UnknownHostException e) {
                throw getExceptionFatal("Unknown host " + ip, e);
            }
View Full Code Here

                Socket client = socket.accept();
                Properties config = new ChainableProperties( server.getConfig() );
                Runnable runnable = createRunnable(client, config);
                if ( resolveHostName ) {
                    // after resolving, the host name appears Socket.toString.
                    InetAddress clientAddress = client.getInetAddress();
                    clientAddress.getHostName();
                }
                if( log.isLoggable( Level.INFO ) ) {
                    log.info( "Connection from: " + client.toString() );
                }
                server.post( runnable );
View Full Code Here

     * Open a new new connection to the same address and port as this one.
     *
     * @return the new transfer object
     */
    public Transfer openNewConnection() throws IOException {
        InetAddress address = socket.getInetAddress();
        int port = socket.getPort();
        Socket s2 = NetUtils.createSocket(address, port, ssl);
        Transfer trans = new Transfer(null);
        trans.setSocket(s2);
        trans.setSSL(ssl);
View Full Code Here

TOP

Related Classes of java.net.InetAddress$InetAddressHolder

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.