/******************************************************************************************************************* * * ******************************************************************************************************************/ @Override protected final boolean createKeys (final @Nonnull List<T> list) { try { return createKeysSafely(list); } catch (Exception e) { ChildFactoryExceptionHandler nodeExceptionHandler = null; try { nodeExceptionHandler = findExceptionHandler(node); } catch (NotFoundException e2) { logger.finest(">>>> no specific NodeExceptionHandler, using the default"); nodeExceptionHandler = Locator.find(ChildFactoryExceptionHandler.class); } nodeExceptionHandler.handleException(node, this, e); return true; } }
/******************************************************************************************************************* * * ******************************************************************************************************************/ @Nonnull private ChildFactoryExceptionHandler findExceptionHandler (final @CheckForNull Node node) throws NotFoundException { logger.finest("findNodeExceptionHandler(%s)", node); NotFoundException.throwWhenNull(node, ""); final ChildFactoryExceptionHandler exceptionHandler = node.getLookup().lookup(ChildFactoryExceptionHandler.class); return (exceptionHandler != null) ? exceptionHandler : findExceptionHandler(node.getParentNode()); } }
/******************************************************************************************************************* * * ******************************************************************************************************************/ public void retry() { if (node != null) { node.getChildren().add(new Node[] {createWaitNode()}); } super.refresh(false); }
public void retry() { try { EventQueue.invokeAndWait(new Runnable() { @Override public void run() { logger.finest(">>>> removing current children..."); children.remove(children.getNodes()); } }); logger.finer(">>>> retrying creating children..."); childFactory.retry(); } catch (InvocationTargetException e) { } catch (InterruptedException e) { } } }