public class MapHandler
extends java.beans.beancontext.BeanContextServicesSupport
java.beans.beancontext.BeanContextServicesSupport.BCSSChild, java.beans.beancontext.BeanContextServicesSupport.BCSSProxyServiceProvider, java.beans.beancontext.BeanContextServicesSupport.BCSSServiceProvider
Modifier and Type | Field and Description |
---|---|
protected boolean |
addInProgress |
protected java.util.Vector<java.lang.Object> |
addLaterVector |
protected boolean |
DEBUG |
static java.util.logging.Logger |
logger |
protected SoloMapComponentPolicy |
policy |
bcsListeners, proxy, serializable, services
bcmListeners, children, designTime, locale, okToUseGui
Constructor and Description |
---|
MapHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object obj)
Add an object to the MapHandler BeanContextSupport.
|
protected void |
addLater(java.lang.Object obj)
Call made from the add() method for objects that added when another object
was being added, setting up a ConcurrentModificationException condition.
|
void |
dispose()
Calls dispose() on the contained MapBean and removes all objects from
BeanContext.
|
<T> T |
get(java.lang.Class<T> someClass)
Given a Class, find the object in the MapHandler.
|
java.lang.Object |
get(java.lang.String classname)
Given a class name, find the object in the MapHandler.
|
<T> java.util.Collection<T> |
getAll(java.lang.Class<T> someClass)
Given a Class, find all the objects in the MapHandler that are
assignment-compatible with that Class.
|
java.util.Collection |
getAll(java.lang.String classname)
Given a Class name, find all the objects in the MapHandler that are
assignment-compatible object of that Class.
|
SoloMapComponentPolicy |
getPolicy()
Get the policy that sets the behavior of the MapHandler when it encounters
the situation of multiple instances of a particular SoloMapComponent.
|
protected boolean |
isAddInProgress() |
java.util.Iterator |
iterator()
Create an iterator copy, to avoid ConcurrentModificationExceptions in the
MapHandler if one of the components wants to add more components when the
MapHandler is set as the BeanContext on them.
|
void |
present(java.lang.Object obj)
Method to call with an object you don't want to add to this MapHandler,
but you want to make it available to all the MapHandlerChildren in it.
|
protected void |
purgeLaterList()
Call to add any objects on the addLaterVector to the MapHandler.
|
boolean |
remove(java.lang.Object obj)
Added because apparently, the BeanContext doesn't check to see if the
object is also a membership listener to remove it from that list.
|
protected void |
setAddInProgress(boolean value) |
void |
setPolicy(SoloMapComponentPolicy smcp)
Set the policy of behavior for the MapHandler on how it should act when
multiple instances of a certain SoloMapComponents are added to it.
|
java.lang.String |
toString() |
addBeanContextServicesListener, addService, addService, bcsPreDeserializationHook, bcsPreSerializationHook, childJustRemovedHook, createBCSChild, createBCSSServiceProvider, fireServiceAdded, fireServiceAdded, fireServiceRevoked, fireServiceRevoked, getBeanContextServicesPeer, getChildBeanContextServicesListener, getCurrentServiceClasses, getCurrentServiceSelectors, getService, hasService, initialize, initializeBeanContextResources, releaseBeanContextResources, releaseService, removeBeanContextServicesListener, revokeService, serviceAvailable, serviceRevoked
addAll, addBeanContextMembershipListener, avoidingGui, bcsChildren, childDeserializedHook, childJustAddedHook, classEquals, clear, contains, containsAll, containsKey, copyChildren, deserialize, dontUseGui, fireChildrenAdded, fireChildrenRemoved, getBeanContextPeer, getChildBeanContextChild, getChildBeanContextMembershipListener, getChildPropertyChangeListener, getChildSerializable, getChildVetoableChangeListener, getChildVisibility, getLocale, getResource, getResourceAsStream, instantiateChild, isDesignTime, isEmpty, isSerializing, needsGui, okToUseGui, propertyChange, readChildren, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildren
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addBeanContextMembershipListener, getResource, getResourceAsStream, instantiateChild, removeBeanContextMembershipListener
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
public static java.util.logging.Logger logger
protected SoloMapComponentPolicy policy
protected boolean DEBUG
protected boolean addInProgress
protected java.util.Vector<java.lang.Object> addLaterVector
public void setPolicy(SoloMapComponentPolicy smcp)
public SoloMapComponentPolicy getPolicy()
protected void addLater(java.lang.Object obj)
protected void purgeLaterList()
protected void setAddInProgress(boolean value)
protected boolean isAddInProgress()
public boolean add(java.lang.Object obj)
add
in interface java.util.Collection
add
in class java.beans.beancontext.BeanContextSupport
obj
- the map component to nest within this BeanContext.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object get(java.lang.String classname)
public <T> T get(java.lang.Class<T> someClass)
public java.util.Collection getAll(java.lang.String classname)
public <T> java.util.Collection<T> getAll(java.lang.Class<T> someClass)
public boolean remove(java.lang.Object obj)
remove
in interface java.util.Collection
remove
in class java.beans.beancontext.BeanContextSupport
public void present(java.lang.Object obj)
obj
- public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in class java.beans.beancontext.BeanContextSupport
public void dispose()
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details