2017-04-05 5 views

답변

1

예, 나머지 클라이언트를 사용할 수 있습니다. 코드입니다 다음 -

RestClient restClient = RestClient.builder(
     new HttpHost(hostname, portnumber, "http")).build(); 

그렇지 않으면, 당신은 정기적으로 전송 클라이언트를 사용할 수 있습니다

TransportClient client = new PreBuiltTransportClient(Settings.EMPTY) 
     .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(hostName), portNumber));