Пример #1
0
 /**
  * Helper method for {@link #findHandlers(Class)}. Looks up only registered handlers and adds them
  * to the end of the given list.
  *
  * @param clazz
  * @param result
  */
 private void findRegisteredHandlers(Class<?> clazz, List<IHandler> result) {
   for (IHandler handler : handlers) {
     if (handler.canHandle(clazz)) {
       result.add(handler);
     }
   }
   final Registry thisParent = parent;
   if (thisParent != null) {
     thisParent.findRegisteredHandlers(clazz, result);
   }
 }
 protected void handle(IHandler<TQ> handler, TQ query) {
   handler.setUp(query);
   if (handler.isAccepted()) {
     handler.handle();
   }
 }
Пример #3
0
 private IServletRequestHandler handlerFor(String callbackId) {
   IHandler h = handlersCallbacks.get(callbackId);
   return h != null ? h.getHandler() : null;
 }