final FCLSupport getFCLSupport() { synchronized (FCLSupport.class) { if (fclSupport == null) { fclSupport = new FCLSupport(); } } return fclSupport; }
/** Add new listener to this object. * @param fcl the listener * @since 2.8 */ public final void addFileChangeListener(FileChangeListener fcl) { getFCLSupport().addFileChangeListener(fcl); }
final void dispatchEvent(FileEvent fe, Op operation, Collection<Runnable> postNotify) { List<FileChangeListener> fcls; synchronized (this) { if (listeners == null) { return; } fcls = listeners.getAllListeners(); } for (FileChangeListener l : fcls) { dispatchEvent(l, fe, operation, postNotify); } }
/** Remove listener from this object. * @param fcl the listener * @since 2.8 * @deprecated useless because there is no filesystem but only * default filesystem in Repository. Add new listener directly to * default filesystem {@link #getDefaultFileSystem}. */ @Deprecated public final void removeFileChangeListener(FileChangeListener fcl) { getFCLSupport().removeFileChangeListener(fcl); }
/** @return true if there is a listener */ protected final boolean hasListeners() { boolean fsHas = getFileSystem().getFCLSupport().hasListeners(); boolean repHas = false; Repository rep = getFileSystem().getRepository(); if (rep != null) { repHas = rep.getFCLSupport().hasListeners(); } return (listeners != null && listeners.hasListeners()) || repHas || fsHas; }
/** Remove listener from this object. * @param fcl the listener * @since 2.8 */ public final void removeFileChangeListener(FileChangeListener fcl) { getFCLSupport().removeFileChangeListener(fcl); }
/** @return true if there is a listener */ protected final boolean hasListeners () { boolean fsHas = getFileSystem().getFCLSupport ().hasListeners (); boolean repHas = false; Repository rep = getFileSystem().getRepository (); if (rep != null) repHas = rep.getFCLSupport ().hasListeners (); return (listeners != null && listeners.getAllListeners ().length != 0) || repHas || fsHas; }
/** Add new listener to this object. * @param fcl the listener * @since 2.8 * @deprecated useless because there is no filesystem but only * default filesystem in Repository. Add new listener directly to * default filesystem {@link #getDefaultFileSystem}. */ @Deprecated public final void addFileChangeListener(FileChangeListener fcl) { getFCLSupport().addFileChangeListener(fcl); }
/** Remove listener from this object. * @param fcl the listener * @since 2.8 */ public final void removeFileChangeListener(FileChangeListener fcl) { getFCLSupport ().removeFileChangeListener(fcl); }
FCLSupport.dispatchEvent(fcl, fe, op, postNotify); FCLSupport.dispatchEvent(fcl, fe, op, postNotify); FCLSupport.dispatchEvent(fcl, fe, op, postNotify);
final FCLSupport getFCLSupport() { synchronized (FCLSupport.class) { if (fclSupport == null) { fclSupport = new FCLSupport(); } } return fclSupport; }
/** @return true if there is a listener */ protected final boolean hasListeners () { boolean fsHas = getFileSystem().getFCLSupport ().hasListeners (); boolean repHas = false; Repository rep = getFileSystem().getRepository (); if (rep != null) repHas = rep.getFCLSupport ().hasListeners (); return (listeners != null && listeners.getAllListeners ().length != 0) || repHas || fsHas; }
/** Add new listener to this object. * @param fcl the listener * @since 2.8 */ public final void addFileChangeListener(FileChangeListener fcl) { getFCLSupport ().addFileChangeListener(fcl); }
/** Remove listener from this object. * @param fcl the listener * @since 2.8 * @deprecated useless because there is no filesystem but only * default filesystem in Repository. Add new listener directly to * default filesystem {@link #getDefaultFileSystem}. */ public final void removeFileChangeListener(FileChangeListener fcl) { getFCLSupport ().removeFileChangeListener(fcl); }
final void dispatchEvent (FileEvent fe, int operation) { Object[] fcls; synchronized (this) { if (listeners == null) return; fcls = listeners.getAllListeners (); } for (int i = 0; i < fcls.length; i++) { if (fcls[i] instanceof FileChangeListener) { dispatchEvent ((FileChangeListener)fcls[i], fe, operation); } } }
final FCLSupport getFCLSupport() { synchronized (FCLSupport.class) { if (fclSupport == null) fclSupport = new FCLSupport (); } return fclSupport; }
/** Add new listener to this object. * @param fcl the listener * @since 2.8 * @deprecated useless because there is no filesystem but only * default filesystem in Repository. Add new listener directly to * default filesystem {@link #getDefaultFileSystem}. */ public final void addFileChangeListener(FileChangeListener fcl) { getFCLSupport ().addFileChangeListener(fcl); }
/** Remove listener from this object. * @param fcl the listener * @since 2.8 */ public final void removeFileChangeListener(FileChangeListener fcl) { getFCLSupport ().removeFileChangeListener(fcl); }
final void dispatchEvent (FileEvent fe, int operation) { Object[] fcls; synchronized (this) { if (listeners == null) return; fcls = listeners.getAllListeners (); } for (int i = 0; i < fcls.length; i++) { if (fcls[i] instanceof FileChangeListener) { dispatchEvent ((FileChangeListener)fcls[i], fe, operation); } } }
final FCLSupport getFCLSupport() { synchronized (FCLSupport.class) { if (fclSupport == null) fclSupport = new FCLSupport (); } return fclSupport; }