@Test public void shouldReturnRestClient() throws NoSuchClientTypeException { String[] hostNames = { "127.0.0.1" }; Object o = factory.getClient(ElasticSearchClientFactory.RestClient, hostNames, "test", serializer, null); assertThat(o, instanceOf(ElasticSearchRestClient.class)); }
public ElasticSearchClient getClient(String clientType, String[] hostNames, String clusterName, ElasticSearchEventSerializer serializer, ElasticSearchIndexRequestBuilderFactory indexBuilder) throws NoSuchClientTypeException { if (clientType.equalsIgnoreCase(TransportClient) && serializer != null) { return new ElasticSearchTransportClient(hostNames, clusterName, serializer); } else if (clientType.equalsIgnoreCase(TransportClient) && indexBuilder != null) { return new ElasticSearchTransportClient(hostNames, clusterName, indexBuilder); } else if (clientType.equalsIgnoreCase(RestClient) && serializer != null) { return new ElasticSearchRestClient(hostNames, serializer); } throw new NoSuchClientTypeException(); }
ElasticSearchClientFactory { public ElasticSearchClient getClient(String clientType, String[] hostNames, String clusterName, ElasticSearchEventSerializer serializer, ElasticSearchIndexRequestBuilderFactory indexBuilder) throws NoSuchClientTypeException { if (clientType.equalsIgnoreCase(TransportClient) && serializer != null) { return new ElasticSearchTransportClient(hostNames, clusterName, serializer); } else if (clientType.equalsIgnoreCase(TransportClient) && indexBuilder != null) { return new ElasticSearchTransportClient(hostNames, clusterName, indexBuilder); } else if (clientType.equalsIgnoreCase(RestClient) && serializer != null) { return new ElasticSearchRestClient(hostNames, serializer); } throw new NoSuchClientTypeException(); } }
ElasticSearchClientFactory { public ElasticSearchClient getClient(String clientType, String[] hostNames, String clusterName, ElasticSearchEventSerializer serializer, ElasticSearchIndexRequestBuilderFactory indexBuilder) throws NoSuchClientTypeException { if (clientType.equalsIgnoreCase(TransportClient) && serializer != null) { return new ElasticSearchTransportClient(hostNames, clusterName, serializer); } else if (clientType.equalsIgnoreCase(TransportClient) && indexBuilder != null) { return new ElasticSearchTransportClient(hostNames, clusterName, indexBuilder); } else if (clientType.equalsIgnoreCase(RestClient) && serializer != null) { return new ElasticSearchRestClient(hostNames, serializer); } throw new NoSuchClientTypeException(); }  }
ElasticSearchClientFactory { public ElasticSearchClient getClient(String clientType, String[] hostNames, String clusterName, ElasticSearchEventSerializer serializer, ElasticSearchIndexRequestBuilderFactory indexBuilder) throws NoSuchClientTypeException { if (clientType.equalsIgnoreCase(TransportClient) && serializer != null) { return new ElasticSearchTransportClient(hostNames, clusterName, serializer); } else if (clientType.equalsIgnoreCase(TransportClient) && indexBuilder != null) { return new ElasticSearchTransportClient(hostNames, clusterName, indexBuilder); } else if (clientType.equalsIgnoreCase(RestClient) && serializer != null) { return new ElasticSearchRestClient(hostNames, serializer); } throw new NoSuchClientTypeException(); }  ElasticSearchClient getClient(String clientType, String[] hostNames,
      String clusterName, ElasticSearchEventSerializer serializer,
      ElasticSearchIndexRequestBuilderFactory indexBuilder); ElasticSearchClient getLocalClient(String clientType, ElasticSearchEventSerializer serializer,
          ElasticSearchIndexRequestBuilderFactory indexBuilder); }
ElasticSearchClientFactory { public ElasticSearchClient getClient(String clientType, String[] hostNames, String clusterName, ElasticSearchEventSerializer serializer, ElasticSearchIndexRequestBuilderFactory indexBuilder) throws NoSuchClientTypeException { if (clientType.equalsIgnoreCase(TransportClient) && serializer != null) { return new ElasticSearchTransportClient(hostNames, clusterName, serializer); } else if (clientType.equalsIgnoreCase(TransportClient) && indexBuilder != null) { return new ElasticSearchTransportClient(hostNames, clusterName, indexBuilder); } else if (clientType.equalsIgnoreCase(RestClient) && serializer != null) { return new ElasticSearchRestClient(hostNames, serializer); } throw new NoSuchClientTypeException(); }  ElasticSearchClient getClient(String clientType, String[] hostNames,
      String clusterName, ElasticSearchEventSerializer serializer,
      ElasticSearchIndexRequestBuilderFactory indexBuilder); ElasticSearchClient getLocalClient(String clientType, ElasticSearchEventSerializer serializer,
          ElasticSearchIndexRequestBuilderFactory indexBuilder); static final String TransportClient; static final String RestClient; }