Creates a new instance

@param address the address to connect to
@return a new instance
@throws NullPointerException if {@code address} is {@code null}
973766
public static TcpClientTransport create(InetSocketAddress address) {
    Objects.requireNonNull(address, "address must not be null");

    TcpClient tcpClient = TcpClient.create().addressSupplier(() -> address);
    return create(tcpClient);
  }
213238
@Override
	public Connector createConnector(String address, int port,
                                     boolean secure) {
        String protocol = "http";
        if (secure) {
            protocol = "https";
        }

        return createConnector(address, port, protocol);
    }
133410
public static void validateAddress(String address) throws ServiceException {
        if (address == null || address.isEmpty()) {
            throw new ServiceException(
                    ErrorCode.SERVICE_INSTANCE_ADDRESS_FORMAT_ERROR);
        }
    }
1285371
public ResourceAddress newResourceAddress(String location, ResourceOptions options) {
        return newResourceAddress(location, options, null /* qualifier */);
    }
909222
public static Intent newMapsIntent(String address, String placeTitle) {
        StringBuilder sb = new StringBuilder();
        sb.append("geo:0,0?q=");

        String addressEncoded = Uri.encode(address);
        sb.append(addressEncoded);

        // pass text for the info window
        String titleEncoded = Uri.encode(" (" + placeTitle + ")");
        sb.append(titleEncoded);

        return new Intent(Intent.ACTION_VIEW, Uri.parse(sb.toString()));
    }
876596
public static ChangedAddressAttribute createChangedAddressAttribute(
			TransportAddress address) {
		ChangedAddressAttribute attribute = new ChangedAddressAttribute();

		attribute.setAddress(address);

		return attribute;
	}
1113300
@Action(
            publishing = Publishing.ENABLED // uses wrapper factory
    )
    public PublishedCustomer placeOrderToNewAddress(
            @ParameterLayout(named="Name of product to order")
            final String name,
            @ParameterLayout(named="New address Line 1")
            final String line1,
            @Parameter(optionality = Optionality.OPTIONAL)
            @ParameterLayout(named="New address Line 2")
            final String line2,
            @ParameterLayout(named="New address Town")
            final String town) {
        wrapperFactory.wrap(this).addOrder(name);
        wrapperFactory.wrap(this).updateAddress(line1, line2, town);
        return this;
    }
298802
@Override
	public Socket makeObject(InetSocketAddress address) throws Exception {
		Socket socket = new Socket(address.getHostName(), address.getPort());
		socket.setKeepAlive(true);
		return socket;
	}
1159992
public SipServletRequest createRequest(SipApplicationSession appSession,
			String method, Address from, Address to) {
		SipServletRequest sipServletRequest = sipFactoryImpl.createRequest(appSession, method, from, to, ((MobicentsSipApplicationSession)appSession).getCurrentRequestHandler(), null, null);
		return sipServletRequest;
	}
930708
public NioServer init(InetSocketAddress address) {
		try {
			// 打开服务器套接字通道
			this.serverSocketChannel = ServerSocketChannel.open();
			// 设置为非阻塞状态
			serverSocketChannel.configureBlocking(false);
			// 获取通道相关联的套接字
			final ServerSocket serverSocket = serverSocketChannel.socket();
			// 绑定端口号
			serverSocket.bind(address);

			// 打开一个选择器
			selector = Selector.open();
			// 服务器套接字注册到Selector中 并指定Selector监控连接事件
			serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}

		return this;
	}
260726
public void setInetAddress(InetSocketAddress address) {
		this.value = address.getAddress();
		this.type = AttributeType.INET_ADDRESS;
		this.assigned = this.value != null;
	}
153858
public AioServer init(InetSocketAddress address) {
		try {
			this.group = AsynchronousChannelGroup.withFixedThreadPool(//
					config.getThreadPoolSize(), // 默认线程池大小
					ThreadFactoryBuilder.create().setNamePrefix("Hutool-socket-").build()//
			);
			this.channel = AsynchronousServerSocketChannel.open(group).bind(address);
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
		return this;
	}
486525
public void addTo(String address, String personal) throws AddressException {
		if(to == null) {
			to = new ArrayList<>();
		}
		to.add( toInternetAddress(address, personal) );
	}
616293
public void setFrom(String address, String personal) throws AddressException {
		from = toInternetAddress(address, personal);
	}
1047003
public void useNewRESTService(String address) throws Exception {
        List<Object> providers = createJAXRSProviders();

        org.customer.service.CustomerService customerService = JAXRSClientFactory
            .createFromModel(address, 
                             org.customer.service.CustomerService.class,
                             "classpath:/model/CustomerService-jaxrs.xml", 
                             providers, 
                             null);

        System.out.println("Using new RESTful CustomerService with new client");

        customer.v2.Customer customer = createNewCustomer("Smith New REST");
        customerService.updateCustomer(customer);

        customer = customerService.getCustomerByName("Smith New REST");
        printNewCustomerDetails(customer);
    }
1036645
@Override
    public InetAddress toInetAddress () throws UnknownHostException {
        if ( this.addr instanceof Address ) {
            return ( (Address) this.addr ).toInetAddress();
        }
        else if ( this.addr instanceof InetAddress ) {
            return (InetAddress) this.addr;
        }
        return null;
    }
304449
public static LocationEngineResult create(Location location) {
    checkNotNull(location, "location can't be null");
    List<Location> locations = new ArrayList<>();
    locations.add(location);
    return new LocationEngineResult(locations);
  }