public static Channel forElement(XMap element) { String id = element.get("@id"); String className = element.get("@class"); XMap endPointElt = element.getOne("endpoint"); if (endPointElt == null) throw new RuntimeException("Excepting a 'endpoint' element in 'channel-definition': " + id); EndPoint endPoint = EndPoint.forElement(endPointElt); XMap properties = new XMap(element.getOne("properties")); return new Channel(id, className, endPoint, properties); } }
private void loadCustomInstantiators(XMap element, boolean custom) { XMap instantiators = element.getOne("instantiators"); if (instantiators != null) { for (XMap instantiator : instantiators.getAll("instantiator")) this.instantiators.put(instantiator.get("@type"), instantiator.get(".")); } }
public static Channel forElement(XMap element) { String id = element.get("@id"); String className = element.get("@class"); XMap endPointElt = element.getOne("endpoint"); if (endPointElt == null) throw new RuntimeException("Excepting a 'endpoint' element in 'channel-definition': " + id); EndPoint endPoint = EndPoint.forElement(endPointElt); XMap properties = new XMap(element.getOne("properties")); return new Channel(id, className, endPoint, properties); } }
private void loadCustomInstantiators(XMap element, boolean custom) { XMap instantiators = element.getOne("instantiators"); if (instantiators != null) { for (XMap instantiator : instantiators.getAll("instantiator")) this.instantiators.put(instantiator.get("@type"), instantiator.get(".")); } }
private void loadCustomInstantiators(XMap element, boolean custom) { XMap instantiators = element.getOne("instantiators"); if (instantiators != null) { for (XMap instantiator : instantiators.getAll("instantiator")) this.instantiators.put(instantiator.get("@type"), instantiator.get(".")); } }
private void loadCustomInstantiators(XMap element, boolean custom) { XMap instantiators = element.getOne("instantiators"); if (instantiators != null) { for (XMap instantiator : instantiators.getAll("instantiator")) this.instantiators.put(instantiator.get("@type"), instantiator.get(".")); } }
private void loadCustomMethodMatcher(XMap element, boolean custom) { XMap methodMatcher = element.getOne("method-matcher"); if (methodMatcher != null) { String type = methodMatcher.get("@type"); try { this.methodMatcher = (MethodMatcher)TypeUtil.newInstance(type); } catch (Exception e) { throw new GraniteConfigException("Could not construct method matcher: " + type, e); } } }
private void loadCustomClassGetter(XMap element, boolean custom) { XMap classGetter = element.getOne("class-getter"); if (classGetter != null) { String type = classGetter.get("@type"); try { this.classGetter = (ClassGetter)TypeUtil.newInstance(type); classGetterSet = true; } catch (Exception e) { throw new GraniteConfigException("Could not instantiate ClassGetter: " + type, e); } } }
private void loadCustomClassGetter(XMap element, boolean custom) { XMap classGetter = element.getOne("class-getter"); if (classGetter != null) { String type = classGetter.get("@type"); try { this.classGetter = (ClassGetter)TypeUtil.newInstance(type); classGetterSet = true; } catch (Exception e) { throw new GraniteConfigException("Could not instantiate ClassGetter: " + type, e); } } }
private void loadCustomClassGetter(XMap element, boolean custom) { XMap classGetter = element.getOne("class-getter"); if (classGetter != null) { String type = classGetter.get("@type"); try { this.classGetter = (ClassGetter)TypeUtil.newInstance(type); classGetterSet = true; } catch (Exception e) { throw new GraniteConfigException("Could not instantiate ClassGetter: " + type, e); } } }
private void loadCustomInvocationListener(XMap element, boolean custom) { XMap invocationListener = element.getOne("invocation-listener"); if (invocationListener != null) { String type = invocationListener.get("@type"); try { this.invocationListener = (ServiceInvocationListener)TypeUtil.newInstance(type); } catch (Exception e) { throw new GraniteConfigException("Could not instantiate ServiceInvocationListener: " + type, e); } } }
private void loadCustomAMF3MessageInterceptor(XMap element, boolean custom) { XMap interceptor = element.getOne("amf3-message-interceptor"); if (interceptor != null) { String type = interceptor.get("@type"); try { amf3MessageInterceptor = (AMF3MessageInterceptor)TypeUtil.newInstance(type); } catch (Exception e) { throw new GraniteConfigException("Could not construct amf3 message interceptor: " + type, e); } } }
private void loadCustomInvocationListener(XMap element, boolean custom) { XMap invocationListener = element.getOne("invocation-listener"); if (invocationListener != null) { String type = invocationListener.get("@type"); try { this.invocationListener = (ServiceInvocationListener)TypeUtil.newInstance(type); } catch (Exception e) { throw new GraniteConfigException("Could not instantiate ServiceInvocationListener: " + type, e); } } }
private void loadCustomMessageSelector(XMap element, boolean custom) { XMap selector = element.getOne("message-selector"); if (selector != null) { String type = selector.get("@type"); try { messageSelectorConstructor = TypeUtil.getConstructor(type, new Class<?>[]{ String.class }); } catch (Exception e) { throw new GraniteConfigException("Could not construct message selector: " + type, e); } } }
private void loadCustomClassGetter(XMap element, boolean custom) { XMap classGetter = element.getOne("class-getter"); if (classGetter != null) { String type = classGetter.get("@type"); try { this.classGetter = (ClassGetter)TypeUtil.newInstance(type); classGetterSet = true; } catch (Exception e) { throw new GraniteConfigException("Could not instantiate ClassGetter: " + type, e); } } }
private void loadCustomDistributedDataFactory(XMap element, boolean custom) { XMap distributedDataFactory = element.getOne("distributed-data-factory"); if (distributedDataFactory != null) { String type = distributedDataFactory.get("@type"); try { this.distributedDataFactory = (DistributedDataFactory)TypeUtil.newInstance(type); } catch (Exception e) { throw new GraniteConfigException("Could not construct build distributed data factory: " + type, e); } } }
private void loadCustomMethodMatcher(XMap element, boolean custom) { XMap methodMatcher = element.getOne("method-matcher"); if (methodMatcher != null) { String type = methodMatcher.get("@type"); try { this.methodMatcher = (MethodMatcher)TypeUtil.newInstance(type); } catch (Exception e) { throw new GraniteConfigException("Could not construct method matcher: " + type, e); } } }
public static Factory forElement(XMap element) { String id = element.get("@id"); String className = element.get("@class"); XMap properties = new XMap(element.getOne("properties")); return new Factory(id, className, properties); } }
public static Adapter forElement(XMap element) { String id = element.get("@id"); String className = element.get("@class"); XMap properties = new XMap(element.getOne("properties")); return new Adapter(id, className, properties); } }
public static Adapter forElement(XMap element) { String id = element.get("@id"); String className = element.get("@class"); XMap properties = new XMap(element.getOne("properties")); return new Adapter(id, className, properties); } }