/** * Make callbacks, recording any exceptions in the given collection. */ private void makeCallbacks(Object source, Object related, ClassMetaData meta, int type, Collection<Exception> exceptions) { // make lifecycle callbacks LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); for (int i = 0; !_fail && i < callbacks.length; i++) { try { callbacks[i].makeCallback(source, related, type); } catch (Exception e) { exceptions.add(e); if (_failFast) _fail = true; } } }
/** * Return true if any callbacks are registered for the given source and * event type. */ private boolean hasCallbacks(Object source, ClassMetaData meta, int type) { LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); if (callbacks.length == 0) return false; for (int i = 0; i < callbacks.length; i++) if (callbacks[i].hasCallback(source, type)) return true; return false; }
/** * Make callbacks, recording any exceptions in the given collection. */ private void makeCallbacks(Object source, Object related, ClassMetaData meta, int type, Collection<Exception> exceptions) { // make lifecycle callbacks LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); for (int i = 0; !_fail && i < callbacks.length; i++) { try { callbacks[i].makeCallback(source, related, type); } catch (Exception e) { exceptions.add(e); if (_failFast) _fail = true; } } }
/** * Return true if any callbacks are registered for the given source and * event type. */ private boolean hasCallbacks(Object source, ClassMetaData meta, int type) { LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); if (callbacks.length == 0) return false; for (int i = 0; i < callbacks.length; i++) if (callbacks[i].hasCallback(source, type)) return true; return false; }
/** * Make callbacks, recording any exceptions in the given collection. */ private void makeCallbacks(Object source, Object related, ClassMetaData meta, int type, Collection exceptions) { // make lifecycle callbacks LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); for (int i = 0; !_fail && i < callbacks.length; i++) { try { callbacks[i].makeCallback(source, related, type); } catch (Exception e) { exceptions.add(e); if (_failFast) _fail = true; } } }
/** * Return true if any callbacks are registered for the given source and * event type. */ private boolean hasCallbacks(Object source, ClassMetaData meta, int type) { LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); if (callbacks.length == 0) return false; for (int i = 0; i < callbacks.length; i++) if (callbacks[i].hasCallback(source, type)) return true; return false; }
/** * Make callbacks, recording any exceptions in the given collection. */ private void makeCallbacks(Object source, Object related, ClassMetaData meta, int type, Collection<Exception> exceptions) { // make lifecycle callbacks LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); for (int i = 0; !_fail && i < callbacks.length; i++) { try { callbacks[i].makeCallback(source, related, type); } catch (Exception e) { exceptions.add(e); if (_failFast) _fail = true; } } }
/** * Return true if any callbacks are registered for the given source and * event type. */ private boolean hasCallbacks(Object source, ClassMetaData meta, int type) { LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); if (callbacks.length == 0) return false; for (int i = 0; i < callbacks.length; i++) if (callbacks[i].hasCallback(source, type)) return true; return false; }
/** * Make callbacks, recording any exceptions in the given collection. */ private void makeCallbacks(Object source, Object related, ClassMetaData meta, int type, Collection<Exception> exceptions) { // make lifecycle callbacks LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); for (int i = 0; !_fail && i < callbacks.length; i++) { try { callbacks[i].makeCallback(source, related, type); } catch (Exception e) { exceptions.add(e); if (_failFast) _fail = true; } } }
/** * Return true if any callbacks are registered for the given source and * event type. */ private boolean hasCallbacks(Object source, ClassMetaData meta, int type) { LifecycleCallbacks[] callbacks = meta.getLifecycleMetaData(). getCallbacks(type); if (callbacks.length == 0) return false; for (int i = 0; i < callbacks.length; i++) if (callbacks[i].hasCallback(source, type)) return true; return false; }
private void makeCallback(LifecycleEvent ev) { int eventType = ev.getType(); if (_callbacks[eventType] == null) return; Object src = ev.getSource(); for (LifecycleCallbacks callback : _callbacks[eventType]) { try { callback.makeCallback(src, ev.getRelated(), eventType); } catch (Throwable t) { if (t instanceof InvocationTargetException) t = t.getCause(); if (t instanceof RuntimeException) throw (RuntimeException) t; throw new CallbackException(_loc.get("system-listener-err", src)).setCause(t).setFatal(true); } } }
private void makeCallback(LifecycleEvent ev) { int eventType = ev.getType(); if (_callbacks[eventType] == null) return; Object src = ev.getSource(); for (LifecycleCallbacks callback : _callbacks[eventType]) { try { callback.makeCallback(src, ev.getRelated(), eventType); } catch (Throwable t) { if (t instanceof InvocationTargetException) t = t.getCause(); if (t instanceof RuntimeException) throw (RuntimeException) t; throw new CallbackException(_loc.get("system-listener-err", src)).setCause(t).setFatal(true); } } }
private void makeCallback(LifecycleEvent ev) { int eventType = ev.getType(); if (_callbacks[eventType] == null) return; Object src = ev.getSource(); for (LifecycleCallbacks callback : _callbacks[eventType]) { try { callback.makeCallback(src, ev.getRelated(), eventType); } catch (Throwable t) { if (t instanceof InvocationTargetException) t = t.getCause(); if (t instanceof RuntimeException) throw (RuntimeException) t; throw new CallbackException(_loc.get("system-listener-err", src)).setCause(t).setFatal(true); } } }
private void makeCallback(LifecycleEvent ev) { int eventType = ev.getType(); if (_callbacks[eventType] == null) return; Object src = ev.getSource(); for (LifecycleCallbacks callback : _callbacks[eventType]) { try { callback.makeCallback(src, ev.getRelated(), eventType); } catch (Throwable t) { if (t instanceof InvocationTargetException) t = t.getCause(); if (t instanceof RuntimeException) throw (RuntimeException) t; throw new CallbackException(_loc.get("system-listener-err", src)).setCause(t).setFatal(true); } } }
private void makeCallback(LifecycleEvent ev) { int eventType = ev.getType(); if (_callbacks[eventType] == null) return; Object src = ev.getSource(); for (LifecycleCallbacks callback : _callbacks[eventType]) { try { callback.makeCallback(src, ev.getRelated(), eventType); } catch (Throwable t) { if (t instanceof InvocationTargetException) t = t.getCause(); if (t instanceof RuntimeException) throw (RuntimeException) t; throw new CallbackException(_loc.get("system-listener-err", src)).setCause(t).setFatal(true); } } }