Class AbstractProxyManager<E extends NamedBean>
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.beans.VetoableChangeSupport
-
- jmri.managers.AbstractProxyManager<E>
-
- Type Parameters:
E- the supported type of NamedBean
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.util.EventListener,PropertyChangeFirer,PropertyChangeProvider,SilenceablePropertyChangeProvider,VetoableChangeFirer,VetoableChangeProvider,Manager<E>,Manager.ManagerDataListener<E>,ProxyManager<E>
- Direct Known Subclasses:
AbstractProvidingProxyManager,ProxyAnalogIOManager,ProxyMeterManager
public abstract class AbstractProxyManager<E extends NamedBean> extends VetoableChangeSupport implements ProxyManager<E>, java.beans.PropertyChangeListener, Manager.ManagerDataListener<E>
Implementation of a Manager that can serves as a proxy for multiple system-specific implementations.Automatically includes an Internal system, which need not be separately added any more.
Encapsulates access to the "Primary" manager, used by default, which is the first one provided.
Internally, this is done by using an ordered list of all non-Internal managers, plus a separate reference to the internal manager and default manager.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.Manager
Manager.ManagerDataEvent<E extends NamedBean>, Manager.ManagerDataListener<E extends NamedBean>, Manager.NameValidity
-
-
Field Summary
Fields Modifier and Type Field Description protected Manager<E>defaultManager(package private) java.util.List<Manager.ManagerDataListener<E>>listenersprotected java.util.Set<java.lang.String>silenceablePropertiesprotected java.util.Map<java.lang.String,java.lang.Boolean>silencedProperties-
Fields inherited from class jmri.beans.VetoableChangeSupport
vetoableChangeSupport
-
Fields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport
-
Fields inherited from interface jmri.Manager
ANALOGIOS, AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, CTCDATA, ENTRYEXIT, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXNG_ANALOG_ACTIONS, LOGIXNG_ANALOG_EXPRESSIONS, LOGIXNG_CONDITIONALNGS, LOGIXNG_DIGITAL_ACTIONS, LOGIXNG_DIGITAL_BOOLEAN_ACTIONS, LOGIXNG_DIGITAL_EXPRESSIONS, LOGIXNG_GLOBAL_VARIABLES, LOGIXNG_MODULES, LOGIXNG_STRING_ACTIONS, LOGIXNG_STRING_EXPRESSIONS, LOGIXNG_TABLES, LOGIXNGS, LOGIXS, MEMORIES, METERFRAMES, METERS, OBLOCKS, PANELFILES, PROPERTY_BEANS, PROPERTY_CAN_DELETE, PROPERTY_DISPLAY_LIST_NAME, PROPERTY_DO_DELETE, PROPERTY_DO_NOT_DELETE, PROPERTY_LENGTH, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, STRINGIOS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS
-
-
Constructor Summary
Constructors Constructor Description AbstractProxyManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddDataListener(Manager.ManagerDataListener<E> e)Register aManager.ManagerDataListenerto hear about adding or removing items from the list of NamedBeans.voidaddManager(Manager<E> m)Add a Manager to the collection of Managers.voidaddPropertyChangeListener(java.beans.PropertyChangeListener l)Add aPropertyChangeListenerto the listener list.voidaddPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)Add aPropertyChangeListenerfor a specific property.voidaddVetoableChangeListener(java.beans.VetoableChangeListener l)Add aVetoableChangeListenerto the listener list.voidaddVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)Add aVetoableChangeListenerfor a specific property.voidcontentsChanged(Manager.ManagerDataEvent<E> e)Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods.protected Manager<E>createSystemManager(SystemConnectionMemo memo)Try to create a system manager.java.lang.StringcreateSystemName(java.lang.String curAddress, java.lang.String prefix)(package private) java.lang.StringcreateSystemName(java.lang.String curAddress, java.lang.String prefix, java.lang.Class<?> beanType)Shared method to create a systemName based on the address base, the prefix and manager class.voiddeleteBean(E s, java.lang.String property)Method for a UI to delete a bean.voidderegister(E s)Forget a NamedBean Object created outside the manager.voiddispose()Free resources when no longer used.EgetBySystemName(java.lang.String systemName)Locate an existing instance based on a system name.EgetByUserName(java.lang.String userName)Locate an existing instance based on a user name.Manager<E>getDefaultManager()Get the default manager or the internal manager if no default manager has been set.java.util.List<Manager<E>>getDisplayOrderManagerList()Get a list of all managers, with the default as the first item and internal default as the last item.java.lang.StringgetEntryToolTip()Get the Default Manager ToolTip.Manager<E>getInternalManager()java.util.List<NamedBeanPropertyDescriptor<?>>getKnownBeanProperties()Return the descriptors for the system-specific properties of the NamedBeans that are kept in this manager.protected Manager<E>getManager(java.lang.String systemName)Get the manager for the given system name.java.util.List<Manager<E>>getManagerList()Returns a list of all managers, including the internal manager.protected Manager<E>getManagerOrDefault(java.lang.String systemName)Get the manager for the given system name or the default manager if there is no matching manager.SystemConnectionMemogetMemo()Get the system connection for this manager.EgetNamedBean(java.lang.String name)Locate an existing instance based on a name.java.util.SortedSet<E>getNamedBeanSet()Provide an unmodifiable SortedSet of NamedBeans in system-name order.java.lang.StringgetNextValidSystemName(NamedBean currentBean)intgetObjectCount()Get the count of managed objects.java.lang.StringgetSystemPrefix()Provide access to the system prefix string.protected Manager<E>initInternal()voidintervalAdded(Manager.ManagerDataEvent<E> e)Sent after the indices in the index0,index1 interval have been inserted in the data model.voidintervalRemoved(Manager.ManagerDataEvent<E> e)Sent after the indices in the index0,index1 interval have been removed from the data model.protected abstract Manager<E>makeInternalManager()Create specific internal manager as needed for concrete type.java.lang.StringmakeSystemName(java.lang.String s)Create a SystemName by prepending the system name prefix to the name if not already present.voidpropertyChange(java.beans.PropertyChangeEvent event)protected voidrecomputeNamedBeanSet()voidregister(E s)Remember a NamedBean Object created outside the manager.voidremoveDataListener(Manager.ManagerDataListener<E> e)Unregister a previously-addedManager.ManagerDataListener.voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)Remove the specified listener from this object.voidremovePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)Remove the specified listener of the specified property from this object.voidremoveVetoableChangeListener(java.beans.VetoableChangeListener l)Remove the specified listener from this object.voidremoveVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)Remove the specified listener of the specified property from this object.voidsetDataListenerMute(boolean m)Temporarily suppress DataListener notifications.voidsetPropertyChangesSilenced(java.lang.String propertyName, boolean silenced)Suppress sendingPropertyChangeEvents for the named property.chartypeLetter()java.lang.StringvalidateSystemNameFormat(java.lang.String systemName, java.util.Locale locale)Validate the format of name, returning it unchanged if valid.Manager.NameValidityvalidSystemNameFormat(java.lang.String systemName)Validate system name format.-
Methods inherited from class jmri.beans.VetoableChangeSupport
fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getVetoableChangeListeners, getVetoableChangeListeners
-
Methods inherited from class jmri.beans.PropertyChangeSupport
fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jmri.Manager
getBeanTypeHandled, getBeanTypeHandled, getNamedBeanClass, getSubSystemNamePrefix, getSystemNamePrefix, getXMLOrder, isValidSystemNameFormat, makeSystemName, makeSystemName, validateBadCharsInSystemNameFormat, validateIntegerSystemNameFormat, validateNmraAccessorySystemNameFormat, validateSystemNameFormat, validateSystemNameFormatOnlyNumeric, validateSystemNamePrefix, validateTrimmedMin1NumberSystemNameFormat, validateTrimmedSystemNameFormat, validateUppercaseTrimmedSystemNameFormat
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
getPropertyChangeListeners, getPropertyChangeListeners
-
Methods inherited from interface jmri.beans.VetoableChangeProvider
getVetoableChangeListeners, getVetoableChangeListeners
-
-
-
-
Field Detail
-
silencedProperties
protected final java.util.Map<java.lang.String,java.lang.Boolean> silencedProperties
-
silenceableProperties
protected final java.util.Set<java.lang.String> silenceableProperties
-
defaultManager
protected Manager<E extends NamedBean> defaultManager
-
listeners
final java.util.List<Manager.ManagerDataListener<E extends NamedBean>> listeners
-
-
Constructor Detail
-
AbstractProxyManager
public AbstractProxyManager()
-
-
Method Detail
-
getManagerList
public java.util.List<Manager<E>> getManagerList()
Returns a list of all managers, including the internal manager. This is not a live list, but it is in alpha order (don't assume default is at front)- Specified by:
getManagerListin interfaceProxyManager<E extends NamedBean>- Returns:
- the list of managers
-
getDisplayOrderManagerList
public java.util.List<Manager<E>> getDisplayOrderManagerList()
Get a list of all managers, with the default as the first item and internal default as the last item.- Specified by:
getDisplayOrderManagerListin interfaceProxyManager<E extends NamedBean>- Returns:
- the list of managers
-
getInternalManager
public Manager<E> getInternalManager()
-
getDefaultManager
@Nonnull public Manager<E> getDefaultManager()
Get the default manager or the internal manager if no default manager has been set.- Specified by:
getDefaultManagerin interfaceProxyManager<E extends NamedBean>- Returns:
- the default manager or the internal manager
-
addManager
public void addManager(@Nonnull Manager<E> m)
Add a Manager to the collection of Managers.- Specified by:
addManagerin interfaceProxyManager<E extends NamedBean>- Parameters:
m- the Manager to add; if manager has already been added, it will not be added again
-
initInternal
protected Manager<E> initInternal()
-
makeInternalManager
protected abstract Manager<E> makeInternalManager()
Create specific internal manager as needed for concrete type.- Returns:
- an internal manager
-
getNamedBean
public E getNamedBean(@Nonnull java.lang.String name)
Locate an existing instance based on a name.- Specified by:
getNamedBeanin interfaceManager<E extends NamedBean>- Parameters:
name- User Name or System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getBySystemName
@CheckReturnValue @CheckForNull public E getBySystemName(@Nonnull java.lang.String systemName)
Locate an existing instance based on a system name.- Specified by:
getBySystemNamein interfaceManager<E extends NamedBean>- Parameters:
systemName- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getByUserName
@CheckReturnValue @CheckForNull public E getByUserName(@Nonnull java.lang.String userName)
Locate an existing instance based on a user name.- Specified by:
getByUserNamein interfaceManager<E extends NamedBean>- Parameters:
userName- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
validateSystemNameFormat
@Nonnull public java.lang.String validateSystemNameFormat(@Nonnull java.lang.String systemName, @Nonnull java.util.Locale locale)
Validate the format of name, returning it unchanged if valid.Although further restrictions may be added by system-specific implementations, at a minimum, the implementation must consider a name that does not start with the System Name prefix for this manager to be invalid, and must consider a name that is the same as the System Name prefix to be invalid.
Overriding implementations may rely on
Manager.validSystemNameFormat(java.lang.String), however they must provide an actionable message in the thrown exception if that method does not returnManager.NameValidity.VALID. When overriding implementations of this method rely on validSystemNameFormat(), implementations of that method must not throw an exception, log an error, or otherwise disrupt the user.This implementation locates a specific Manager based on the system name and validates against that. If no matching Manager exists, the default Manager attempts to validate the system name.
- Specified by:
validateSystemNameFormatin interfaceManager<E extends NamedBean>- Parameters:
systemName- the system name to validatelocale- the locale for a localized exception; this is needed for the JMRI web server, which supports multiple locales- Returns:
- the unchanged value of the name parameter
-
validSystemNameFormat
public Manager.NameValidity validSystemNameFormat(@Nonnull java.lang.String systemName)
Validate system name format. Locate a system specific Manager based on a system name.- Specified by:
validSystemNameFormatin interfaceManager<E extends NamedBean>- Parameters:
systemName- the system name- Returns:
- if a manager is found, return its determination of validity of system name format. Return INVALID if no manager exists.
-
dispose
public void dispose()
Free resources when no longer used. Specifically, remove all references to and from this object, so it can be garbage-collected.
-
getManager
@CheckForNull protected Manager<E> getManager(@Nonnull java.lang.String systemName)
Get the manager for the given system name.- Parameters:
systemName- the given name- Returns:
- the requested manager or null if there is no matching manager
-
getManagerOrDefault
@Nonnull protected Manager<E> getManagerOrDefault(@Nonnull java.lang.String systemName)
Get the manager for the given system name or the default manager if there is no matching manager.- Parameters:
systemName- the given name- Returns:
- the requested manager or the default manager if there is no matching manager
-
createSystemName
java.lang.String createSystemName(java.lang.String curAddress, java.lang.String prefix, java.lang.Class<?> beanType) throws JmriException
Shared method to create a systemName based on the address base, the prefix and manager class.- Parameters:
curAddress- base address to useprefix- system prefix to usebeanType- Bean Type for manager (method is used for Turnout and Sensor Managers)- Returns:
- a valid system name for this connection
- Throws:
JmriException- if systemName cannot be created
-
createSystemName
@Nonnull public java.lang.String createSystemName(@Nonnull java.lang.String curAddress, @Nonnull java.lang.String prefix) throws JmriException
- Throws:
JmriException
-
getNextValidSystemName
@Nonnull public java.lang.String getNextValidSystemName(@Nonnull NamedBean currentBean) throws JmriException
- Throws:
JmriException
-
deleteBean
public void deleteBean(@Nonnull E s, @Nonnull java.lang.String property) throws java.beans.PropertyVetoException
Method for a UI to delete a bean.The UI should first request a "CanDelete", this will return a list of locations (and descriptions) where the bean is in use via throwing a VetoException, then if that comes back clear, or the user agrees with the actions, then a "DoDelete" can be called which inform the listeners to delete the bean, then it will be deregistered and disposed of.
If a property name of "DoNotDelete" is thrown back in the VetoException then the delete process should be aborted.
- Specified by:
deleteBeanin interfaceManager<E extends NamedBean>- Parameters:
s- The NamedBean to be deletedproperty- The programmatic name of the request. "CanDelete" will enquire with all listeners if the item can be deleted. "DoDelete" tells the listener to delete the item- Throws:
java.beans.PropertyVetoException- If the recipients wishes the delete to be aborted (see above)
-
createSystemManager
protected Manager<E> createSystemManager(@Nonnull SystemConnectionMemo memo)
Try to create a system manager. If this proxy manager is able to create a system manager, the concrete class must implement this method.- Parameters:
memo- the system connection memo for this connection- Returns:
- the new manager or null if it's not possible to create the manager
-
getEntryToolTip
public java.lang.String getEntryToolTip()
Get the Default Manager ToolTip. Get a manager-specific tool tip for adding an entry to the manager.- Specified by:
getEntryToolTipin interfaceManager<E extends NamedBean>- Returns:
- the tool tip or null to disable the tool tip
-
register
public void register(@Nonnull E s)
Remember a NamedBean Object created outside the manager.The non-system-specific SignalHeadManagers use this method extensively.
Forwards the register request to the matching system.
-
deregister
public void deregister(@Nonnull E s)
Forget a NamedBean Object created outside the manager.The non-system-specific RouteManager uses this method.
Forwards the deregister request to the matching system.
- Specified by:
deregisterin interfaceManager<E extends NamedBean>- Parameters:
s- the name
-
getKnownBeanProperties
@Nonnull public java.util.List<NamedBeanPropertyDescriptor<?>> getKnownBeanProperties()
Return the descriptors for the system-specific properties of the NamedBeans that are kept in this manager. List does not contain duplicates.- Specified by:
getKnownBeanPropertiesin interfaceManager<E extends NamedBean>- Returns:
- list of known properties, or empty list if there are none
-
addPropertyChangeListener
@OverridingMethodsMustInvokeSuper public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add aPropertyChangeListenerto the listener list.- Specified by:
addPropertyChangeListenerin interfacePropertyChangeProvider- Overrides:
addPropertyChangeListenerin classPropertyChangeSupport- Parameters:
l- The PropertyChangeListener to be added
-
removePropertyChangeListener
@OverridingMethodsMustInvokeSuper public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove the specified listener from this object.- Specified by:
removePropertyChangeListenerin interfacePropertyChangeProvider- Overrides:
removePropertyChangeListenerin classPropertyChangeSupport- Parameters:
l- ThePropertyChangeListenerto remove.
-
addPropertyChangeListener
@OverridingMethodsMustInvokeSuper public void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
Add aPropertyChangeListenerfor a specific property.- Specified by:
addPropertyChangeListenerin interfacePropertyChangeProvider- Overrides:
addPropertyChangeListenerin classPropertyChangeSupport- Parameters:
propertyName- The name of the property to listen on.listener- The PropertyChangeListener to be added
-
removePropertyChangeListener
@OverridingMethodsMustInvokeSuper public void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
Remove the specified listener of the specified property from this object.- Specified by:
removePropertyChangeListenerin interfacePropertyChangeProvider- Overrides:
removePropertyChangeListenerin classPropertyChangeSupport- Parameters:
propertyName- The name of the property to stop listening to.listener- ThePropertyChangeListenerto remove.
-
addVetoableChangeListener
@OverridingMethodsMustInvokeSuper public void addVetoableChangeListener(java.beans.VetoableChangeListener l)
Add aVetoableChangeListenerto the listener list.- Specified by:
addVetoableChangeListenerin interfaceVetoableChangeProvider- Overrides:
addVetoableChangeListenerin classVetoableChangeSupport- Parameters:
l- The VetoableChangeListener to be added
-
removeVetoableChangeListener
@OverridingMethodsMustInvokeSuper public void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
Remove the specified listener from this object.- Specified by:
removeVetoableChangeListenerin interfaceVetoableChangeProvider- Overrides:
removeVetoableChangeListenerin classVetoableChangeSupport- Parameters:
l- TheVetoableChangeListenerto remove.
-
addVetoableChangeListener
@OverridingMethodsMustInvokeSuper public void addVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)
Add aVetoableChangeListenerfor a specific property.- Specified by:
addVetoableChangeListenerin interfaceVetoableChangeProvider- Overrides:
addVetoableChangeListenerin classVetoableChangeSupport- Parameters:
propertyName- The name of the property to listen on.listener- The VetoableChangeListener to be added
-
removeVetoableChangeListener
@OverridingMethodsMustInvokeSuper public void removeVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)
Remove the specified listener of the specified property from this object.- Specified by:
removeVetoableChangeListenerin interfaceVetoableChangeProvider- Overrides:
removeVetoableChangeListenerin classVetoableChangeSupport- Parameters:
propertyName- The name of the property to stop listening to.listener- TheVetoableChangeListenerto remove.
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
getMemo
@Nonnull public SystemConnectionMemo getMemo()
Get the system connection for this manager.- Specified by:
getMemoin interfaceManager<E extends NamedBean>- Returns:
- The system connection memo for the manager returned by
getDefaultManager(), or the Internal system connection memo if there is no default manager
-
getSystemPrefix
@Nonnull public java.lang.String getSystemPrefix()
Description copied from interface:ManagerProvide access to the system prefix string. This was previously called the "System letter"- Specified by:
getSystemPrefixin interfaceManager<E extends NamedBean>- Returns:
- The system-specific prefix letter for the primary implementation
-
typeLetter
public char typeLetter()
- Specified by:
typeLetterin interfaceManager<E extends NamedBean>- Returns:
- The type letter for for the primary implementation
-
makeSystemName
@Nonnull public java.lang.String makeSystemName(@Nonnull java.lang.String s)
Create a SystemName by prepending the system name prefix to the name if not already present.Note: implementations must call
Manager.validateSystemNameFormat(java.lang.String, java.util.Locale)to ensure the returned name is valid.- Specified by:
makeSystemNamein interfaceManager<E extends NamedBean>- Parameters:
s- the item to make the system name for- Returns:
- A system name from a user input, typically a number.
-
getObjectCount
@CheckReturnValue public int getObjectCount()
Get the count of managed objects.- Specified by:
getObjectCountin interfaceManager<E extends NamedBean>- Returns:
- the number of managed objects
-
recomputeNamedBeanSet
protected void recomputeNamedBeanSet()
-
getNamedBeanSet
@Nonnull public java.util.SortedSet<E> getNamedBeanSet()
Provide an unmodifiable SortedSet of NamedBeans in system-name order.Note: This is the fastest of the accessors, and is the only long-term form.
Note: This is a live set; the contents are kept up to date
- Specified by:
getNamedBeanSetin interfaceManager<E extends NamedBean>- Returns:
- Unmodifiable access to a SortedSet of NamedBeans
-
setPropertyChangesSilenced
@OverridingMethodsMustInvokeSuper public void setPropertyChangesSilenced(java.lang.String propertyName, boolean silenced)
Suppress sendingPropertyChangeEvents for the named property.Stopping the suppression of sending change events may send a PropertyChangeEvent if the property changed while silenced, but otherwise should not fire a PropertyChangeEvent.
- Specified by:
setPropertyChangesSilencedin interfaceSilenceablePropertyChangeProvider- Parameters:
propertyName- the name of the property to mutesilenced- true if events are to be suppressed; false otherwise
-
addDataListener
public void addDataListener(Manager.ManagerDataListener<E> e)
Register aManager.ManagerDataListenerto hear about adding or removing items from the list of NamedBeans.- Specified by:
addDataListenerin interfaceManager<E extends NamedBean>- Parameters:
e- the data listener to add
-
removeDataListener
public void removeDataListener(Manager.ManagerDataListener<E> e)
Unregister a previously-addedManager.ManagerDataListener.- Specified by:
removeDataListenerin interfaceManager<E extends NamedBean>- Parameters:
e- the data listener to remove- See Also:
Manager.addDataListener(ManagerDataListener)
-
contentsChanged
public void contentsChanged(Manager.ManagerDataEvent<E> e)
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods. From Manager.ManagerDataListener, receives notifications from underlying managers.- Specified by:
contentsChangedin interfaceManager.ManagerDataListener<E extends NamedBean>- Parameters:
e- encapsulates event information
-
intervalAdded
public void intervalAdded(Manager.ManagerDataEvent<E> e)
Sent after the indices in the index0,index1 interval have been inserted in the data model. From Manager.ManagerDataListener, receives notifications from underlying managers.- Specified by:
intervalAddedin interfaceManager.ManagerDataListener<E extends NamedBean>- Parameters:
e- encapsulates the event information
-
intervalRemoved
public void intervalRemoved(Manager.ManagerDataEvent<E> e)
Sent after the indices in the index0,index1 interval have been removed from the data model. From Manager.ManagerDataListener, receives notifications from underlying managers.- Specified by:
intervalRemovedin interfaceManager.ManagerDataListener<E extends NamedBean>- Parameters:
e- encapsulates the event information
-
setDataListenerMute
public void setDataListenerMute(boolean m)
Temporarily suppress DataListener notifications.This avoids O(N^2) behavior when doing bulk updates, i.e. when loading lots of Beans. Note that this is (1) optional, in the sense that the manager is not required to mute and (2) if present, its' temporary, in the sense that the manager must do a cumulative notification when done.
- Specified by:
setDataListenerMutein interfaceManager<E extends NamedBean>- Parameters:
m- true if notifications should be suppressed; false otherwise
-
-