private static JAXRSClientFactoryBean getBean(String baseAddress, Class<?> cls, String configLocation) { JAXRSClientFactoryBean bean = WebClient.getBean(baseAddress, configLocation); bean.setServiceClass(cls); return bean; }
/** * Creates WebClient * @param baseAddress baseAddress * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); return bean.createWebClient(); }
private static JAXRSClientFactoryBean getBean(String baseAddress, Class<?> cls, String configLocation) { JAXRSClientFactoryBean bean = WebClient.getBean(baseAddress, configLocation); bean.setServiceClass(cls); return bean; }
/** * Creates WebClient * @param baseAddress baseAddress * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); return bean.createWebClient(); }
private static JAXRSClientFactoryBean getBean(String baseAddress, Class<?> cls, String configLocation) { JAXRSClientFactoryBean bean = WebClient.getBean(baseAddress, configLocation); bean.setServiceClass(cls); return bean; }
/** * Creates WebClient * @param baseAddress baseAddress * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); return bean.createWebClient(); }
/** * Creates WebClient * @param baseAddress baseAddress * @param providers list of providers * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, List<?> providers, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); bean.setProviders(providers); return bean.createWebClient(); }
/** * Creates WebClient * @param baseAddress baseAddress * @param providers list of providers * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, List<?> providers, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); bean.setProviders(providers); return bean.createWebClient(); }
/** * Creates WebClient * @param baseAddress baseAddress * @param providers list of providers * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, List<?> providers, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); bean.setProviders(providers); return bean.createWebClient(); }
/** * Creates WebClient which will do basic authentication * @param baseAddress baseAddress * @param username username * @param password password * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, String username, String password, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); bean.setUsername(username); bean.setPassword(password); return bean.createWebClient(); }
/** * Creates WebClient which will do basic authentication * @param baseAddress baseAddress * @param username username * @param password password * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, String username, String password, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); bean.setUsername(username); bean.setPassword(password); return bean.createWebClient(); }
/** * Creates WebClient which will do basic authentication * @param baseAddress baseAddress * @param username username * @param password password * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, String username, String password, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); bean.setUsername(username); bean.setPassword(password); return bean.createWebClient(); }
/** * Creates WebClient with a list of custom features * @param baseAddress baseAddress * @param providers list of providers * @param features the features which will be applied to the client * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, List<?> providers, List<? extends Feature> features, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); bean.setProviders(providers); bean.setFeatures(features); return bean.createWebClient(); }
/** * Creates a thread safe WebClient * @param baseAddress baseURI * @param providers list of providers * @param timeToKeepState time to keep this thread safe state. */ public static WebClient create(String baseAddress, List<?> providers, long timeToKeepState) { JAXRSClientFactoryBean bean = getBean(baseAddress, null); bean.setProviders(providers); bean.setInitialState(new ThreadLocalClientState(baseAddress, timeToKeepState)); return bean.createWebClient(); }
/** * Creates a thread safe WebClient * @param baseAddress baseURI * @param providers list of providers * @param timeToKeepState time to keep this thread safe state. */ public static WebClient create(String baseAddress, List<?> providers, long timeToKeepState) { JAXRSClientFactoryBean bean = getBean(baseAddress, null); bean.setProviders(providers); bean.setInitialState(new ThreadLocalClientState(baseAddress, timeToKeepState)); return bean.createWebClient(); }
/** * Creates WebClient * @param baseURI baseURI * @param providers list of providers */ public static WebClient create(String baseAddress, List<?> providers, boolean threadSafe) { JAXRSClientFactoryBean bean = getBean(baseAddress, null); bean.setProviders(providers); if (threadSafe) { bean.setInitialState(new ThreadLocalClientState(baseAddress)); } return bean.createWebClient(); }
/** * Creates a thread safe WebClient * @param baseURI baseURI * @param providers list of providers * @param timeToKeepState time to keep this thread safe state. */ public static WebClient create(String baseAddress, List<?> providers, long timeToKeepState) { JAXRSClientFactoryBean bean = getBean(baseAddress, null); bean.setProviders(providers); bean.setInitialState(new ThreadLocalClientState(baseAddress, timeToKeepState)); return bean.createWebClient(); }
/** * Creates WebClient * @param baseAddress baseURI * @param providers list of providers * @param threadSafe if true ThreadLocalClientState is used */ public static WebClient create(String baseAddress, List<?> providers, boolean threadSafe) { JAXRSClientFactoryBean bean = getBean(baseAddress, null); bean.setProviders(providers); if (threadSafe) { bean.setInitialState(new ThreadLocalClientState(baseAddress)); } return bean.createWebClient(); }
/** * Creates WebClient * @param baseAddress baseURI * @param providers list of providers * @param threadSafe if true ThreadLocalClientState is used */ public static WebClient create(String baseAddress, List<?> providers, boolean threadSafe) { JAXRSClientFactoryBean bean = getBean(baseAddress, null); bean.setProviders(providers); if (threadSafe) { bean.setInitialState(new ThreadLocalClientState(baseAddress)); } return bean.createWebClient(); }
/** * Creates WebClient which will do basic authentication * @param baseAddress baseAddress * @param providers list of providers * @param username username * @param password password * @param configLocation classpath location of the configuration resource, can be null * @return WebClient instance */ public static WebClient create(String baseAddress, List<?> providers, String username, String password, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, configLocation); bean.setUsername(username); bean.setPassword(password); bean.setProviders(providers); return bean.createWebClient(); }