@Override protected void initClient(AbstractClient client, Endpoint ep, boolean addHeaders) { super.initClient(client, ep, addHeaders); MicroProfileClientProviderFactory factory = MicroProfileClientProviderFactory.createInstance(getBus(), comparator); factory.setUserProviders(registeredProviders); ep.put(MicroProfileClientProviderFactory.CLIENT_FACTORY_NAME, factory); }
@Override protected void initClient(AbstractClient client, Endpoint ep, boolean addHeaders) { super.initClient(client, ep, addHeaders); MicroProfileClientProviderFactory factory = MicroProfileClientProviderFactory.createInstance(getBus(), comparator); factory.setUserProviders(registeredProviders); ep.put(MicroProfileClientProviderFactory.CLIENT_FACTORY_NAME, factory); }
/** * Creates a WebClient instance * @return WebClient instance */ public WebClient createWebClient() { String serviceAddress = getAddress(); int queryIndex = serviceAddress != null ? serviceAddress.lastIndexOf('?') : -1; if (queryIndex != -1) { serviceAddress = serviceAddress.substring(0, queryIndex); } Service service = new JAXRSServiceImpl(serviceAddress, getServiceName()); getServiceFactory().setService(service); try { Endpoint ep = createEndpoint(); this.getServiceFactory().sendEvent(FactoryBeanListener.Event.PRE_CLIENT_CREATE, ep); ClientState actualState = getActualState(); WebClient client = actualState == null ? new WebClient(getAddress()) : new WebClient(actualState); initClient(client, ep, actualState == null); notifyLifecycleManager(client); this.getServiceFactory().sendEvent(FactoryBeanListener.Event.CLIENT_CREATED, client, ep); return client; } catch (Exception ex) { LOG.severe(ex.getClass().getName() + " : " + ex.getLocalizedMessage()); throw new RuntimeException(ex); } }
ClientState actualState = getActualState(); ClientProxyImpl proxyImpl = createClientProxy(cri, isRoot, actualState, varValues); initClient(proxyImpl, ep, actualState == null);
/** * Creates a WebClient instance * @return WebClient instance */ public WebClient createWebClient() { String serviceAddress = getAddress(); int queryIndex = serviceAddress != null ? serviceAddress.lastIndexOf('?') : -1; if (queryIndex != -1) { serviceAddress = serviceAddress.substring(0, queryIndex); } Service service = new JAXRSServiceImpl(serviceAddress, getServiceName()); getServiceFactory().setService(service); try { Endpoint ep = createEndpoint(); this.getServiceFactory().sendEvent(FactoryBeanListener.Event.PRE_CLIENT_CREATE, ep); ClientState actualState = getActualState(); WebClient client = actualState == null ? new WebClient(getAddress()) : new WebClient(actualState); initClient(client, ep, actualState == null); notifyLifecycleManager(client); this.getServiceFactory().sendEvent(FactoryBeanListener.Event.CLIENT_CREATED, client, ep); return client; } catch (Exception ex) { LOG.severe(ex.getClass().getName() + " : " + ex.getLocalizedMessage()); throw new RuntimeException(ex); } }
ClientState actualState = getActualState(); ClientProxyImpl proxyImpl = createClientProxy(cri, isRoot, actualState, varValues); initClient(proxyImpl, ep, actualState == null);
inheritHeaders, varValues); initClient(proxyImpl, ep, actualState == null);
/** * Creates a WebClient instance * @return WebClient instance */ public WebClient createWebClient() { Service service = new JAXRSServiceImpl(getAddress(), getServiceName()); getServiceFactory().setService(service); try { Endpoint ep = createEndpoint(); this.getServiceFactory().sendEvent(FactoryBeanListener.Event.PRE_CLIENT_CREATE, ep); ClientState actualState = getActualState(); WebClient client = actualState == null ? new WebClient(getAddress()) : new WebClient(actualState); initClient(client, ep, actualState == null); notifyLifecycleManager(client); this.getServiceFactory().sendEvent(FactoryBeanListener.Event.CLIENT_CREATED, client, ep); return client; } catch (Exception ex) { LOG.severe(ex.getClass().getName() + " : " + ex.getLocalizedMessage()); throw new RuntimeException(ex); } }