/** * Sets a reference to the external user model, * Example: "classpath:/model/resources.xml" * * @param modelRef the reference to the external model resource. */ public void setModelRef(String modelRef) { List<UserResource> resources = ResourceUtils.getUserResources(modelRef, getBus()); if (resources != null) { serviceFactory.setUserResources(resources); } }
/** * Sets a reference to the external user model, * Example: "classpath:/model/resources.xml" * * @param modelRef the reference to the external model resource. */ public void setModelRef(String modelRef) { List<UserResource> resources = ResourceUtils.getUserResources(modelRef, getBus()); if (resources != null) { serviceFactory.setUserResources(resources); } }
/** * Sets a reference to the external user model, * Example: "classpath:/model/resources.xml". * Some models may only reference interfaces, thus providing a list of * concrete classes that will be instantiated is required in such cases. * * @param modelRef the reference to the external model resource. * @param sClasses concrete root resource classes */ public void setModelRefWithServiceClass(String modelRef, Class<?>... sClasses) { List<UserResource> resources = ResourceUtils.getUserResources(modelRef, getBus()); if (resources != null) { serviceFactory.setUserResourcesWithServiceClass(resources, sClasses); } } public void setProviderComparator(Comparator<?> providerComparator) {
/** * Sets a reference to the external user model, * Example: "classpath:/model/resources.xml". * Some models may only reference interfaces, thus providing a list of * concrete classes that will be instantiated is required in such cases. * * @param modelRef the reference to the external model resource. * @param sClasses concrete root resource classes */ public void setModelRefWithServiceClass(String modelRef, Class<?>... sClasses) { List<UserResource> resources = ResourceUtils.getUserResources(modelRef, getBus()); if (resources != null) { serviceFactory.setUserResourcesWithServiceClass(resources, sClasses); } }
protected ProviderFactory setupFactory(Endpoint ep) { ProviderFactory factory = ProviderFactory.createInstance(getBus()); if (entityProviders != null) { factory.setUserProviders(entityProviders); } setDataBindingProvider(factory, ep.getService()); factory.setBus(getBus()); factory.initProviders(serviceFactory.getRealClassResourceInfo()); if (schemaLocations != null) { factory.setSchemaLocations(schemaLocations); } setBeanInfo(factory); ep.put(ProviderFactory.class.getName(), factory); getBus().setProperty(ProviderFactory.class.getName(), factory); return factory; }
protected void setupFactory(ProviderFactory factory, Endpoint ep) { if (providerComparator != null) { factory.setProviderComparator(providerComparator); } if (entityProviders != null) { factory.setUserProviders(entityProviders); } setDataBindingProvider(factory, ep.getService()); factory.setBus(getBus()); factory.initProviders(serviceFactory.getRealClassResourceInfo()); if (schemaLocations != null) { factory.setSchemaLocations(schemaLocations); } ep.put(factory.getClass().getName(), factory); }
Endpoint ep = new EndpointImpl(getBus(), service, ei);
Endpoint ep = new EndpointImpl(getBus(), service, ei);
protected BindingInfo createBindingInfo() { BindingFactoryManager mgr = getBus().getExtension(BindingFactoryManager.class); String binding = getBindingId(); BindingConfiguration bindingConfig = getBindingConfig(); if (binding == null && bindingConfig != null) { binding = bindingConfig.getBindingId(); } if (binding == null) { binding = JAXRSBindingFactory.JAXRS_BINDING_ID; } try { BindingFactory bindingFactory = mgr.getBindingFactory(binding); setBindingFactory(bindingFactory); BindingInfo bi = bindingFactory.createBindingInfo(serviceFactory.getService(), binding, bindingConfig); for (BindingOperationInfo boi : bi.getOperations()) { serviceFactory.sendEvent(FactoryBeanListener.Event.BINDING_OPERATION_CREATED, bi, boi, null); } serviceFactory.sendEvent(FactoryBeanListener.Event.BINDING_CREATED, bi); return bi; } catch (BusException ex) { ex.printStackTrace(); //do nothing } return null; }
protected BindingInfo createBindingInfo() { BindingFactoryManager mgr = getBus().getExtension(BindingFactoryManager.class); String binding = getBindingId(); BindingConfiguration bindingConfig = getBindingConfig(); if (binding == null && bindingConfig != null) { binding = bindingConfig.getBindingId(); } if (binding == null) { binding = JAXRSBindingFactory.JAXRS_BINDING_ID; } try { BindingFactory bindingFactory = mgr.getBindingFactory(binding); setBindingFactory(bindingFactory); BindingInfo bi = bindingFactory.createBindingInfo(serviceFactory.getService(), binding, bindingConfig); for (BindingOperationInfo boi : bi.getOperations()) { serviceFactory.sendEvent(FactoryBeanListener.Event.BINDING_OPERATION_CREATED, bi, boi, null); } serviceFactory.sendEvent(FactoryBeanListener.Event.BINDING_CREATED, bi); return bi; } catch (BusException ex) { ex.printStackTrace(); //do nothing } return null; }
DestinationFactory df = getDestinationFactory(); if (df == null) { DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class); df = dfm.getDestinationFactoryForUri(getAddress()); super.setDestinationFactory(df);
DestinationFactory df = getDestinationFactory(); if (df == null) { DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class); df = dfm.getDestinationFactoryForUri(getAddress()); super.setDestinationFactory(df);