/** * Creates a proxy * @param baseAddress baseAddress * @param cls resource class, if not interface then a CGLIB proxy will be created * @param configLocation classpath location of the configuration resource * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation); return bean.create(cls); }
/** * Creates a proxy * @param baseAddress baseAddress * @param cls resource class, if not interface then a CGLIB proxy will be created * @param configLocation classpath location of the configuration resource * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation); return bean.create(cls); }
/** * Creates a proxy * @param baseAddress baseAddress * @param cls resource class, if not interface then a CGLIB proxy will be created * @param configLocation classpath location of the configuration resource * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation); return bean.create(cls); }
/** * Creates a proxy * @param baseAddress baseAddress * @param cls resource class, if not interface then a CGLIB proxy will be created * This class is expected to have a root JAXRS Path annotation containing * template variables, for ex, "/path/{id1}/{id2}" * @param configLocation classpath location of the configuration resource * @param varValues values to replace root Path template variables * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, String configLocation, Object... varValues) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation); return bean.create(cls, varValues); }
/** * Creates a proxy * @param baseAddress baseAddress * @param cls resource class, if not interface then a CGLIB proxy will be created * This class is expected to have a root JAXRS Path annotation containing * template variables, for ex, "/path/{id1}/{id2}" * @param configLocation classpath location of the configuration resource * @param varValues values to replace root Path template variables * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, String configLocation, Object... varValues) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation); return bean.create(cls, varValues); }
/** * Creates a proxy * @param baseAddress baseAddress * @param cls resource class, if not interface then a CGLIB proxy will be created * This class is expected to have a root JAXRS Path annotation containing * template variables, for ex, "/path/{id1}/{id2}" * @param configLocation classpath location of the configuration resource * @param varValues values to replace root Path template variables * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, String configLocation, Object... varValues) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation); return bean.create(cls, varValues); }
/** * Creates a proxy * @param baseURI baseURI * @param cls resource class, if not interface then a CGLIB proxy will be created * @param inheritHeaders if true then existing proxy headers will be inherited by * subresource proxies if any * @return typed proxy */ public static <T> T create(URI baseURI, Class<T> cls, boolean inheritHeaders) { JAXRSClientFactoryBean bean = getBean(baseURI.toString(), cls, null); bean.setInheritHeaders(inheritHeaders); return bean.create(cls); }
/** * Creates a proxy * @param baseURI baseURI * @param cls resource class, if not interface then a CGLIB proxy will be created * @param inheritHeaders if true then existing proxy headers will be inherited by * subresource proxies if any * @return typed proxy */ public static <T> T create(URI baseURI, Class<T> cls, boolean inheritHeaders) { JAXRSClientFactoryBean bean = getBean(baseURI.toString(), cls, null); bean.setInheritHeaders(inheritHeaders); return bean.create(cls); }
/** * Creates a proxy * @param baseURI baseURI * @param cls resource class, if not interface then a CGLIB proxy will be created * @param inheritHeaders if true then existing proxy headers will be inherited by * subresource proxies if any * @return typed proxy */ public static <T> T create(URI baseURI, Class<T> cls, boolean inheritHeaders) { JAXRSClientFactoryBean bean = getBean(baseURI.toString(), cls, null); bean.setInheritHeaders(inheritHeaders); return bean.create(cls); }
/** * Creates a proxy using a custom class loader * @param baseAddress baseAddress * @param loader class loader * @param cls resource class, if not interface then a CGLIB proxy will be created * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, ClassLoader loader) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, null); bean.setClassLoader(loader); return bean.create(cls); }
/** * Creates a proxy * @param baseAddress baseAddress * @param cls proxy class, if not interface then a CGLIB proxy will be created * @param providers list of providers * @param configLocation classpath location of the configuration resource * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, List<?> providers, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation); bean.setProviders(providers); return bean.create(cls); }
/** * Creates a proxy using a custom class loader * @param baseAddress baseAddress * @param loader class loader * @param cls resource class, if not interface then a CGLIB proxy will be created * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, ClassLoader loader) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, null); bean.setClassLoader(loader); return bean.create(cls); }
/** * Creates a proxy using a custom class loader * @param baseAddress baseAddress * @param loader class loader * @param cls resource class, if not interface then a CGLIB proxy will be created * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, ClassLoader loader) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, null); bean.setClassLoader(loader); return bean.create(cls); }
/** * Creates a proxy * @param baseAddress baseAddress * @param cls proxy class, if not interface then a CGLIB proxy will be created * @param providers list of providers * @param configLocation classpath location of the configuration resource * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, List<?> providers, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation); bean.setProviders(providers); return bean.create(cls); }
/** * Creates a proxy * @param baseAddress baseAddress * @param cls proxy class, if not interface then a CGLIB proxy will be created * @param providers list of providers * @param configLocation classpath location of the configuration resource * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, List<?> providers, String configLocation) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, configLocation); bean.setProviders(providers); return bean.create(cls); }
/** * Creates a thread safe proxy and allows to specify time to keep state. * @param baseAddress baseAddress * @param cls proxy class, if not interface then a CGLIB proxy will be created * @param providers list of providers * @param timeToKeepState how long to keep this state * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, List<?> providers, long timeToKeepState) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, null); bean.setProviders(providers); bean.setInitialState(new ThreadLocalClientState(baseAddress, timeToKeepState)); return bean.create(cls); }
/** * Creates a thread safe proxy and allows to specify time to keep state. * @param baseAddress baseAddress * @param cls proxy class, if not interface then a CGLIB proxy will be created * @param providers list of providers * @param timeToKeepState how long to keep this state * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, List<?> providers, long timeToKeepState) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, null); bean.setProviders(providers); bean.setInitialState(new ThreadLocalClientState(baseAddress, timeToKeepState)); return bean.create(cls); }
/** * Creates a thread safe proxy * @param baseAddress baseAddress * @param cls proxy class, if not interface then a CGLIB proxy will be created * @param providers list of providers * @param threadSafe if true then a thread-safe proxy will be created * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, List<?> providers, boolean threadSafe) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, null); bean.setProviders(providers); if (threadSafe) { bean.setInitialState(new ThreadLocalClientState(baseAddress)); } return bean.create(cls); }
/** * Creates a thread safe proxy * @param baseAddress baseAddress * @param cls proxy class, if not interface then a CGLIB proxy will be created * @param providers list of providers * @param threadSafe if true then a thread-safe proxy will be created * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, List<?> providers, boolean threadSafe) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, null); bean.setProviders(providers); if (threadSafe) { bean.setInitialState(new ThreadLocalClientState(baseAddress)); } return bean.create(cls); }
/** * Creates a thread safe proxy and allows to specify time to keep state. * @param baseAddress baseAddress * @param cls proxy class, if not interface then a CGLIB proxy will be created * @param providers list of providers * @param timeToKeepState how long to keep this state * @return typed proxy */ public static <T> T create(String baseAddress, Class<T> cls, List<?> providers, long timeToKeepState) { JAXRSClientFactoryBean bean = getBean(baseAddress, cls, null); bean.setProviders(providers); bean.setInitialState(new ThreadLocalClientState(baseAddress, timeToKeepState)); return bean.create(cls); }