public void handleClass(Class<?> clazz) { RemoteDestination anno = clazz.getAnnotation(RemoteDestination.class); if (anno != null && !("".equals(anno.id()))) { XMap props = new XMap("properties"); if (anno.service().length() > 0) { log.info("Configuring service from RemoteDestination annotation: service=%s (class=%s, anno=%s)", anno.service(), clazz, anno); service = this.services.get(anno.service()); if (anno.channels().length > 0) channelIds = Arrays.asList(anno.channels()); else if (anno.channel().length() > 0) channelIds = Collections.singletonList(anno.channel()); else if (this.channels.size() == 1) { channelIds = new ArrayList<String>(this.channels.keySet()); if (anno.factory().length() > 0) factoryId = anno.factory(); else if (this.factories.isEmpty()) { props.put("scope", anno.scope()); props.put("source", clazz.getName()); log.info("Default POJO factory selected for destination in class: " + clazz.getName() + " with scope: " + anno.scope()); if (!(anno.source().equals(""))) props.put("source", anno.source()); if (anno.securityRoles().length > 0) { roles = new ArrayList<String>(anno.securityRoles().length); for (String role : anno.securityRoles()) roles.add(role);
if (clazz.isAnnotationPresent(RemoteDestination.class)) { scannedClasses.put(clazz, clazz); if (clazz.getAnnotation(RemoteDestination.class).id().length() > 0) scannedClassesById.put(clazz.getAnnotation(RemoteDestination.class).id(), clazz); if (i.isAnnotationPresent(RemoteDestination.class)) { scannedClasses.put(i, clazz); if (i.getAnnotation(RemoteDestination.class).id().length() > 0) scannedClassesById.put(i.getAnnotation(RemoteDestination.class).id(), clazz);
public void handleClass(Class<?> clazz) { RemoteDestination anno = clazz.getAnnotation(RemoteDestination.class); if (anno != null && !("".equals(anno.id()))) { XMap props = new XMap("properties"); if (anno.service().length() > 0) { log.info("Configuring service from RemoteDestination annotation: service=%s (class=%s, anno=%s)", anno.service(), clazz, anno); service = this.services.get(anno.service()); if (anno.channels().length > 0) channelIds = Arrays.asList(anno.channels()); else if (anno.channel().length() > 0) channelIds = Collections.singletonList(anno.channel()); else if (this.channels.size() == 1) { channelIds = new ArrayList<String>(this.channels.keySet()); if (anno.factory().length() > 0) factoryId = anno.factory(); else if (this.factories.isEmpty()) { props.put("scope", anno.scope()); props.put("source", clazz.getName()); log.info("Default POJO factory selected for destination in class: " + clazz.getName() + " with scope: " + anno.scope()); if (!(anno.source().equals(""))) props.put("source", anno.source()); if (anno.securityRoles().length > 0) { roles = new ArrayList<String>(anno.securityRoles().length); for (String role : anno.securityRoles()) roles.add(role);