| | |
| | | ctxAttrs.putAll(cd.attributes); |
| | | if (h instanceof Handler) { |
| | | for (String packageName : packageNames) { |
| | | wireActors(scn, |
| | | packageName, (Handler) h, |
| | | cd.attributes.get("contextName")); |
| | | scn.process(this, packageName, (Handler) h, cd.attributes.get("contextName")); |
| | | ctx.getAttributes().put("serverDataProviderList", sdp); |
| | | } |
| | | } |
| | |
| | | | InvocationTargetException ex) { |
| | | // Klasse nicht gefunden. Muss das geloggt oder sonstwie behandel werden? |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @SuppressWarnings("unchecked") |
| | | private void wireActors(Scanner scn, String packageName, /*Class annotation, */Handler h, String contextName) { |
| | | if (!scn.isJar()) { |
| | | scn.processClasses(this, packageName, h, contextName); |
| | | } else { |
| | | scn.processZipContent(packageName, this, h, contextName); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | /* -------------- ScannerListener Implementierung --------------- */ |
| | | @Override |
| | | public void annotationFound(Class foundClass, Handler h, String contextName) { |
| | | wire(h, foundClass, contextName); |
| | | public void annotationFound(Class foundClass, Object[] params) { |
| | | Handler h = null; |
| | | String contextName = null; |
| | | for(Object param : params) { |
| | | if(param instanceof Handler) { |
| | | h = (Handler) param; |
| | | } else if(param instanceof String) { |
| | | contextName = (String) param; |
| | | } |
| | | } |
| | | if(h == null || contextName == null) { |
| | | Logger.getLogger(Factory.class.getName()).log(Level.FINER, "Handler oder contextName ist null"); |
| | | } else { |
| | | wire(h, foundClass, contextName); |
| | | } |
| | | } |
| | | } |