| | |
| | | } |
| | | |
| | | private Authenticator createAuthenticator(NeonDescriptor d) { |
| | | Logger.getLogger(Factory.class.getName()).log( |
| | | Level.FINER, "{0} ", new Object[]{"creating Authenticator"}); |
| | | Authenticator auth = null; |
| | | if (d.authenticator != null) { |
| | | try { |
| | | Logger.getLogger(Factory.class.getName()).log( |
| | | Level.FINER, "Authenticator className {0} ", new Object[]{d.authenticator.className}); |
| | | Object authObj = Class.forName(d.authenticator.className) |
| | | .getDeclaredConstructor().newInstance(); |
| | | if (authObj instanceof Authenticator) { |
| | | auth = (Authenticator) authObj; |
| | | Logger.getLogger(Factory.class.getName()).log( |
| | | Level.FINER, "Authenticator className {0} created", new Object[]{d.authenticator.className}); |
| | | return auth; |
| | | } |
| | | } catch (ClassNotFoundException | NoSuchMethodException | SecurityException |
| | | | InstantiationException | IllegalAccessException | IllegalArgumentException |
| | | | InvocationTargetException ex) { |
| | | // Klasse nicht gefunden. Muss das geloggt oder sonstwie behandel werden? |
| | | Logger.getLogger(Factory.class.getName()).log( |
| | | Level.FINER, "Authenticator className {0} not created, error {1}", |
| | | new Object[]{d.authenticator.className, ex.getLocalizedMessage()}); |
| | | |
| | | return null; |
| | | } |
| | | } |
| | |
| | | Iterator<ActorDescriptor> i = actorList.iterator(); |
| | | while(i.hasNext()) { |
| | | ActorDescriptor actor = i.next(); |
| | | Logger.getLogger(Factory.class.getName()).log( |
| | | Level.FINER, "actorClassName {0} route {1}", |
| | | new Object[]{actor.getActorClassName(), actor.getRoute()}); |
| | | h.setActor(actor.getHttpMethod(), actor.getRoute(), actor.getActorClassName()); |
| | | } |
| | | } |