Class BeanContextServicesSupport
java.lang.Object
java.beans.beancontext.BeanContextChildSupport
java.beans.beancontext.BeanContextSupport
java.beans.beancontext.BeanContextServicesSupport
- All Implemented Interfaces:
BeanContext, BeanContextChild, BeanContextServiceRevokedListener, BeanContextServices, BeanContextServicesListener, DesignMode, PropertyChangeListener, VetoableChangeListener, Visibility, Serializable, Iterable, Collection, EventListener
@Deprecated(since="23",
forRemoval=true)
public class BeanContextServicesSupport
extends BeanContextSupport
implements BeanContextServices
Deprecated, for removal: This API element is subject to removal in a future version.
This helper class provides a utility implementation of the java.beans.beancontext.BeanContextServices interface.
Since this class directly implements the BeanContextServices interface, the class can, and is intended to be used either by subclassing this implementation, or via delegation of an instance of this class from another through the BeanContextProxy interface.
- Since:
- 1.2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classDeprecated, for removal: This API element is subject to removal in a future version.A protected nested class containing per-child information in thechildrenhashtable.protected classDeprecated, for removal: This API element is subject to removal in a future version.Subclasses may subclass this nested class to represent a proxy for each BeanContextServiceProvider.protected static classDeprecated, for removal: This API element is subject to removal in a future version.subclasses may subclass this nested class to add behaviors for each BeanContextServicesProvider.Nested classes/interfaces declared in class BeanContextSupport
BeanContextSupport.BCSChild, BeanContextSupport.BCSIteratorModifier and TypeClassDescriptionprotected classDeprecated, for removal: This API element is subject to removal in a future version.A protected nested class containing per-child information in thechildrenhashtable.protected static final classDeprecated, for removal: This API element is subject to removal in a future version.protected final subclass that encapsulates an iterator but implements a noop remove() method. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<BeanContextServicesListener> Deprecated, for removal: This API element is subject to removal in a future version.List ofBeanContextServicesListenerobjects.Deprecated, for removal: This API element is subject to removal in a future version.Delegate for theBeanContextServiceProvider.protected intDeprecated, for removal: This API element is subject to removal in a future version.The number of instances of a serializableBeanContextServceProvider.Deprecated, for removal: This API element is subject to removal in a future version.all accesses to theprotected transient HashMap servicesfield should be synchronized on that objectFields declared in class BeanContextSupport
bcmListeners, children, designTime, locale, okToUseGuiModifier and TypeFieldDescriptionprotected ArrayList<BeanContextMembershipListener> Deprecated, for removal: This API element is subject to removal in a future version.all accesses to theprotected ArrayList bcmListenersfield shall be synchronized on that object.protected HashMap<Object, BeanContextSupport.BCSChild> Deprecated, for removal: This API element is subject to removal in a future version.all accesses to theprotected HashMap childrenfield shall be synchronized on that object.protected booleanDeprecated, for removal: This API element is subject to removal in a future version.Abooleanindicating whether or not this object is currently in design time mode.protected LocaleDeprecated, for removal: This API element is subject to removal in a future version.The current locale of this BeanContext.protected booleanDeprecated, for removal: This API element is subject to removal in a future version.Abooleanindicating if this instance may now render a GUI.Fields declared in class BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupportModifier and TypeFieldDescriptionprotected BeanContextDeprecated, for removal: This API element is subject to removal in a future version.The bean context.Deprecated, for removal: This API element is subject to removal in a future version.TheBeanContextin which thisBeanContextChildis nested.protected PropertyChangeSupportDeprecated, for removal: This API element is subject to removal in a future version.ThePropertyChangeSupportassociated with thisBeanContextChildSupport.protected booleanDeprecated, for removal: This API element is subject to removal in a future version.A flag indicating that there has been at least onePropertyChangeVetoExceptionthrown for the attempted setBeanContext operation.protected VetoableChangeSupportDeprecated, for removal: This API element is subject to removal in a future version.TheVetoableChangeSupportassociated with thisBeanContextChildSupport.Fields declared in interface BeanContext
globalHierarchyLockModifier and TypeFieldDescriptionstatic final ObjectDeprecated, for removal: This API element is subject to removal in a future version.This global lock is used by bothBeanContextandBeanContextServicesimplementors to serialize changes in aBeanContexthierarchy and any service requests etc.Fields declared in interface DesignMode
PROPERTYNAMEModifier and TypeFieldDescriptionstatic final StringThe standard value of the propertyName as fired from a BeanContext or other source of PropertyChangeEvents. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Create an instance that is not a delegate of another objectDeprecated, for removal: This API element is subject to removal in a future version.Create an instance with a peerBeanContextServicesSupport(BeanContextServices peer, Locale lcle) Deprecated, for removal: This API element is subject to removal in a future version.Create an instance using the specified localeBeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dtime) Deprecated, for removal: This API element is subject to removal in a future version.Create an instance using the specified Locale and design mode.BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible) Deprecated, for removal: This API element is subject to removal in a future version.Construct a BeanContextServicesSupport instance -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.add a BeanContextServicesListenerbooleanaddService(Class<?> serviceClass, BeanContextServiceProvider bcsp) Deprecated, for removal: This API element is subject to removal in a future version.add a serviceprotected booleanaddService(Class<?> serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent) Deprecated, for removal: This API element is subject to removal in a future version.add a serviceprotected voidDeprecated, for removal: This API element is subject to removal in a future version.called from BeanContextSupport readObject before it deserializes the children ...protected voidDeprecated, for removal: This API element is subject to removal in a future version.called from BeanContextSupport writeObject before it serializes the children ...protected voidchildJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc) Deprecated, for removal: This API element is subject to removal in a future version.called from superclass child removal operations after a child has been successfully removed. called with child synchronized.protected BeanContextSupport.BCSChildcreateBCSChild(Object targetChild, Object peer) Deprecated, for removal: This API element is subject to removal in a future version.Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.createBCSSServiceProvider(Class<?> sc, BeanContextServiceProvider bcsp) Deprecated, for removal: This API element is subject to removal in a future version.subclasses can override this method to create new subclasses of BCSSServiceProvider without having to override addService() in order to instantiate.protected final voidDeprecated, for removal: This API element is subject to removal in a future version.Fires aBeanContextServiceAvailableEventindicating that a new service has become available.protected final voidfireServiceAdded(Class<?> serviceClass) Deprecated, for removal: This API element is subject to removal in a future version.Fires aBeanContextServiceEventnotifying of a new service.protected final voidDeprecated, for removal: This API element is subject to removal in a future version.Fires aBeanContextServiceEventnotifying of a service being revoked.protected final voidfireServiceRevoked(Class<?> serviceClass, boolean revokeNow) Deprecated, for removal: This API element is subject to removal in a future version.Fires aBeanContextServiceRevokedEventindicating that a particular service is no longer available.Deprecated, for removal: This API element is subject to removal in a future version.Gets theBeanContextServicesassociated with thisBeanContextServicesSupport.protected static final BeanContextServicesListenerDeprecated, for removal: This API element is subject to removal in a future version.Gets theBeanContextServicesListener(if any) of the specified child.Deprecated, for removal: This API element is subject to removal in a future version.Gets the currently available services for this context.Iterator<?> getCurrentServiceSelectors(Class<?> serviceClass) Deprecated, for removal: This API element is subject to removal in a future version.Gets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.getService(BeanContextChild child, Object requestor, Class<?> serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) Deprecated, for removal: This API element is subject to removal in a future version.obtain a service which may be delegatedbooleanhasService(Class<?> serviceClass) Deprecated, for removal: This API element is subject to removal in a future version.has a service, which may be delegatedvoidDeprecated, for removal: This API element is subject to removal in a future version.called by BeanContextSupport superclass during construction and deserialization to initialize subclass transient state.protected voidDeprecated, for removal: This API element is subject to removal in a future version.called from setBeanContext to notify a BeanContextChild to allocate resources obtained from the nesting BeanContext.protected voidDeprecated, for removal: This API element is subject to removal in a future version.called from setBeanContext to notify a BeanContextChild to release resources obtained from the nesting BeanContext.voidreleaseService(BeanContextChild child, Object requestor, Object service) Deprecated, for removal: This API element is subject to removal in a future version.release a servicevoidDeprecated, for removal: This API element is subject to removal in a future version.remove a BeanContextServicesListenervoidrevokeService(Class<?> serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow) Deprecated, for removal: This API element is subject to removal in a future version.remove a servicevoidDeprecated, for removal: This API element is subject to removal in a future version.BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.voidDeprecated, for removal: This API element is subject to removal in a future version.BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself.Methods declared in class BeanContextSupport
add, 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, iterator, needsGui, okToUseGui, propertyChange, readChildren, remove, remove, removeAll, removeBeanContextMembershipListener, retainAll, serialize, setDesignTime, setLocale, size, toArray, toArray, validatePendingAdd, validatePendingRemove, vetoableChange, writeChildrenModifier and TypeMethodDescriptionbooleanDeprecated, for removal: This API element is subject to removal in a future version.Adds/nests a child within thisBeanContext.booleanaddAll(Collection c) Deprecated, for removal: This API element is subject to removal in a future version.add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldvoidDeprecated, for removal: This API element is subject to removal in a future version.Adds a BeanContextMembershipListenerbooleanDeprecated, for removal: This API element is subject to removal in a future version.Used to determine if theBeanContextchild is avoiding using its GUI.protected Iterator<BeanContextSupport.BCSChild> Deprecated, for removal: This API element is subject to removal in a future version.Returns an iterator of all children of thisBeanContext.protected voidchildDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc) Deprecated, for removal: This API element is subject to removal in a future version.Called by readObject with the newly deserialized child and BCSChild.protected voidchildJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc) Deprecated, for removal: This API element is subject to removal in a future version.subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred.protected static final booleanclassEquals(Class<?> first, Class<?> second) Deprecated, for removal: This API element is subject to removal in a future version.Tests to see if two class objects, or their names are equal.voidclear()Deprecated, for removal: This API element is subject to removal in a future version.clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldbooleanDeprecated, for removal: This API element is subject to removal in a future version.Determines whether or not the specified object is currently a child of thisBeanContext.booleanDeprecated, for removal: This API element is subject to removal in a future version.Tests to see if all objects in the specifiedCollectionare children of thisBeanContext.booleanDeprecated, for removal: This API element is subject to removal in a future version.Determines whether or not the specified object is currently a child of thisBeanContext.protected final Object[]Deprecated, for removal: This API element is subject to removal in a future version.Gets a copy of the this BeanContext's children.protected final voiddeserialize(ObjectInputStream ois, Collection coll) Deprecated, for removal: This API element is subject to removal in a future version.used by readObject to deserialize a collection.voidDeprecated, for removal: This API element is subject to removal in a future version.notify this instance that it may no longer render a GUI.protected final voidDeprecated, for removal: This API element is subject to removal in a future version.Fire a BeanContextMembershipEvent on the BeanContextMembershipListener interfaceprotected final voidDeprecated, for removal: This API element is subject to removal in a future version.Fire a BeanContextMembershipEvent on the BeanContextMembershipListener interfaceDeprecated, for removal: This API element is subject to removal in a future version.Gets the instance ofBeanContextthat this object is providing the implementation for.protected static final BeanContextChildgetChildBeanContextChild(Object child) Deprecated, for removal: This API element is subject to removal in a future version.Gets the BeanContextChild (if any) of the specified childprotected static final BeanContextMembershipListenerDeprecated, for removal: This API element is subject to removal in a future version.Gets the BeanContextMembershipListener (if any) of the specified childprotected static final PropertyChangeListenerDeprecated, for removal: This API element is subject to removal in a future version.Gets the PropertyChangeListener (if any) of the specified childprotected static final SerializablegetChildSerializable(Object child) Deprecated, for removal: This API element is subject to removal in a future version.Gets the Serializable (if any) associated with the specified Childprotected static final VetoableChangeListenerDeprecated, for removal: This API element is subject to removal in a future version.Gets the VetoableChangeListener (if any) of the specified childprotected static final VisibilitygetChildVisibility(Object child) Deprecated, for removal: This API element is subject to removal in a future version.Gets the Component (if any) associated with the specified child.Deprecated, for removal: This API element is subject to removal in a future version.Gets the locale for thisBeanContext.getResource(String name, BeanContextChild bcc) Deprecated, for removal: This API element is subject to removal in a future version.Analogous tojava.lang.ClassLoader.getResource(), this method allows aBeanContextimplementation to interpose behavior between the childComponentand underlyingClassLoader.getResourceAsStream(String name, BeanContextChild bcc) Deprecated, for removal: This API element is subject to removal in a future version.Analogous tojava.lang.ClassLoader.getResourceAsStream(), this method allows aBeanContextimplementation to interpose behavior between the childComponentand underlyingClassLoader.instantiateChild(String beanName) Deprecated, for removal: This API element is subject to removal in a future version.The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into aBeanContext.booleanDeprecated, for removal: This API element is subject to removal in a future version.Reports whether or not this object is in currently in design time mode.booleanisEmpty()Deprecated, for removal: This API element is subject to removal in a future version.Reports whether or not thisBeanContextis empty.booleanDeprecated, for removal: This API element is subject to removal in a future version.Is thisBeanContextin the process of being serialized?iterator()Deprecated, for removal: This API element is subject to removal in a future version.Gets all JavaBean orBeanContextinstances currently nested in thisBeanContext.booleanneedsGui()Deprecated, for removal: This API element is subject to removal in a future version.This method is typically called from the environment in order to determine if the implementor "needs" a GUI.voidDeprecated, for removal: This API element is subject to removal in a future version.Notify this instance that it may now render a GUIvoidDeprecated, for removal: This API element is subject to removal in a future version.subclasses may envelope to monitor child property changes.final voidDeprecated, for removal: This API element is subject to removal in a future version.When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserializationbooleanDeprecated, for removal: This API element is subject to removal in a future version.Removes a child from this BeanContext.protected booleanDeprecated, for removal: This API element is subject to removal in a future version.internal remove used when removal caused by unexpectedsetBeanContextor byremove()invocation.booleanDeprecated, for removal: This API element is subject to removal in a future version.remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldvoidDeprecated, for removal: This API element is subject to removal in a future version.Removes a BeanContextMembershipListenerbooleanDeprecated, for removal: This API element is subject to removal in a future version.retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldprotected final voidserialize(ObjectOutputStream oos, Collection<?> coll) Deprecated, for removal: This API element is subject to removal in a future version.Used by writeObject to serialize a Collection.voidsetDesignTime(boolean dTime) Deprecated, for removal: This API element is subject to removal in a future version.Sets the new design time value for thisBeanContext.voidDeprecated, for removal: This API element is subject to removal in a future version.Sets the locale of this BeanContext.intsize()Deprecated, for removal: This API element is subject to removal in a future version.Gets the number of children currently nested in this BeanContext.Object[]toArray()Deprecated, for removal: This API element is subject to removal in a future version.Gets all JavaBean orBeanContextinstances currently nested in this BeanContext.Object[]Deprecated, for removal: This API element is subject to removal in a future version.Gets an array containing all children of thisBeanContextthat match the types contained in arry.protected booleanvalidatePendingAdd(Object targetChild) Deprecated, for removal: This API element is subject to removal in a future version.Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being added to the BeanContext.protected booleanvalidatePendingRemove(Object targetChild) Deprecated, for removal: This API element is subject to removal in a future version.Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being removed from the BeanContext.voidDeprecated, for removal: This API element is subject to removal in a future version.subclasses may envelope to monitor veto child property changes.final voidDeprecated, for removal: This API element is subject to removal in a future version.Used to serialize all children of thisBeanContext.Methods declared in class BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, validatePendingSetBeanContextModifier and TypeMethodDescriptionvoidDeprecated, for removal: This API element is subject to removal in a future version.Add a PropertyChangeListener for a specific property.voidDeprecated, for removal: This API element is subject to removal in a future version.Add a VetoableChangeListener for a specific property.voidfirePropertyChange(String name, Object oldValue, Object newValue) Deprecated, for removal: This API element is subject to removal in a future version.Report a bound property update to any registered listeners.voidfireVetoableChange(String name, Object oldValue, Object newValue) Deprecated, for removal: This API element is subject to removal in a future version.Report a vetoable property update to any registered listeners.Deprecated, for removal: This API element is subject to removal in a future version.Gets the nestingBeanContextfor thisBeanContextChildSupport.Deprecated, for removal: This API element is subject to removal in a future version.Gets theBeanContextChildassociated with thisBeanContextChildSupport.booleanDeprecated, for removal: This API element is subject to removal in a future version.Reports whether or not this class is a delegate of another.voidDeprecated, for removal: This API element is subject to removal in a future version.Remove a PropertyChangeListener for a specific property.voidDeprecated, for removal: This API element is subject to removal in a future version.Removes aVetoableChangeListener.voidDeprecated, for removal: This API element is subject to removal in a future version.Sets theBeanContextfor thisBeanContextChildSupport.booleanvalidatePendingSetBeanContext(BeanContext newValue) Deprecated, for removal: This API element is subject to removal in a future version.Called from setBeanContext to validate (or otherwise) the pending change in the nesting BeanContext property value.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.booleanIndicates whether some other object is "equal to" this one.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.inthashCode()Returns a hash code value for this object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.Methods declared in interface Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArrayModifier and TypeMethodDescriptionbooleanCompares the specified object with this collection for equality.inthashCode()Returns the hash code value for this collection.default StreamReturns a possibly parallelStreamwith this collection as its source.default booleanRemoves all of the elements of this collection that satisfy the given predicate (optional operation).default SpliteratorCreates aSpliteratorover the elements in this collection.default Streamstream()Returns a sequentialStreamwith this collection as its source.default <T> Object[]toArray(IntFunction generator) Returns an array containing all of the elements in this collection, using the providedgeneratorfunction to allocate the returned array.
-
Field Details
-
services
Deprecated, for removal: This API element is subject to removal in a future version.all accesses to theprotected transient HashMap servicesfield should be synchronized on that object -
serializable
protected transient int serializableDeprecated, for removal: This API element is subject to removal in a future version.The number of instances of a serializableBeanContextServceProvider. -
proxy
Deprecated, for removal: This API element is subject to removal in a future version.Delegate for theBeanContextServiceProvider. -
bcsListeners
Deprecated, for removal: This API element is subject to removal in a future version.List ofBeanContextServicesListenerobjects.
-
-
Constructor Details
-
BeanContextServicesSupport
public BeanContextServicesSupport(BeanContextServices peer, Locale lcle, boolean dTime, boolean visible) Deprecated, for removal: This API element is subject to removal in a future version.Construct a BeanContextServicesSupport instance
- Parameters:
peer- The peer BeanContext we are supplying an implementation for, if null the this object is its own peerlcle- The current Locale for this BeanContext.dTime- The initial state, true if in design mode, false if runtime.visible- The initial visibility.
-
BeanContextServicesSupport
Deprecated, for removal: This API element is subject to removal in a future version.Create an instance using the specified Locale and design mode.- Parameters:
peer- The peer BeanContext we are supplying an implementation for, if null the this object is its own peerlcle- The current Locale for this BeanContext.dtime- The initial state, true if in design mode, false if runtime.
-
BeanContextServicesSupport
Deprecated, for removal: This API element is subject to removal in a future version.Create an instance using the specified locale- Parameters:
peer- The peer BeanContext we are supplying an implementation for, if null the this object is its own peerlcle- The current Locale for this BeanContext.
-
BeanContextServicesSupport
Deprecated, for removal: This API element is subject to removal in a future version.Create an instance with a peer- Parameters:
peer- The peer BeanContext we are supplying an implementation for, if null the this object is its own peer
-
BeanContextServicesSupport
public BeanContextServicesSupport()Deprecated, for removal: This API element is subject to removal in a future version.Create an instance that is not a delegate of another object
-
-
Method Details
-
initialize
public void initialize()Deprecated, for removal: This API element is subject to removal in a future version.called by BeanContextSupport superclass during construction and deserialization to initialize subclass transient state. subclasses may envelope this method, but should not override it or call it directly.- Overrides:
initializein classBeanContextSupport
-
getBeanContextServicesPeer
Deprecated, for removal: This API element is subject to removal in a future version.Gets theBeanContextServicesassociated with thisBeanContextServicesSupport.- Returns:
- the instance of
BeanContextthis object is providing the implementation for.
-
createBCSChild
Deprecated, for removal: This API element is subject to removal in a future version.Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
- Overrides:
createBCSChildin classBeanContextSupport- Parameters:
targetChild- the child to create the Child on behalf ofpeer- the peer if the targetChild and peer are related by BeanContextProxy- Returns:
- Subtype-specific subclass of Child without overriding collection methods
-
createBCSSServiceProvider
protected BeanContextServicesSupport.BCSSServiceProvider createBCSSServiceProvider(Class<?> sc, BeanContextServiceProvider bcsp) Deprecated, for removal: This API element is subject to removal in a future version.subclasses can override this method to create new subclasses of BCSSServiceProvider without having to override addService() in order to instantiate.- Parameters:
sc- the classbcsp- the service provider- Returns:
- a service provider without overriding addService()
-
addBeanContextServicesListener
Deprecated, for removal: This API element is subject to removal in a future version.add a BeanContextServicesListener- Specified by:
addBeanContextServicesListenerin interfaceBeanContextServices- Parameters:
bcsl- theBeanContextServicesListenerto add- Throws:
NullPointerException- if the argument is null
-
removeBeanContextServicesListener
Deprecated, for removal: This API element is subject to removal in a future version.remove a BeanContextServicesListener- Specified by:
removeBeanContextServicesListenerin interfaceBeanContextServices- Parameters:
bcsl- theBeanContextServicesListenerto remove from this context
-
addService
Deprecated, for removal: This API element is subject to removal in a future version.add a service- Specified by:
addServicein interfaceBeanContextServices- Parameters:
serviceClass- the service classbcsp- the service provider- Returns:
- true if the service was successful added, false otherwise
-
addService
protected boolean addService(Class<?> serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent) Deprecated, for removal: This API element is subject to removal in a future version.add a service- Parameters:
serviceClass- the service classbcsp- the service providerfireEvent- whether or not an event should be fired- Returns:
- true if the service was successfully added
-
revokeService
public void revokeService(Class<?> serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow) Deprecated, for removal: This API element is subject to removal in a future version.remove a service- Specified by:
revokeServicein interfaceBeanContextServices- Parameters:
serviceClass- the service classbcsp- the service providerrevokeCurrentServicesNow- whether or not to revoke the service
-
hasService
Deprecated, for removal: This API element is subject to removal in a future version.has a service, which may be delegated- Specified by:
hasServicein interfaceBeanContextServices- Parameters:
serviceClass- the service in question- Returns:
- true if the service is available
-
getService
public Object getService(BeanContextChild child, Object requestor, Class<?> serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException Deprecated, for removal: This API element is subject to removal in a future version.obtain a service which may be delegated- Specified by:
getServicein interfaceBeanContextServices- Parameters:
child- theBeanContextChildassociated with this requestrequestor- the object requesting the serviceserviceClass- class of the requested serviceserviceSelector- the service dependent parameterbcsrl- theBeanContextServiceRevokedListenerto notify if the service should later become revoked- Returns:
- a reference to this context's named
Service as requested or
null - Throws:
TooManyListenersException- if there are too many listeners
-
releaseService
Deprecated, for removal: This API element is subject to removal in a future version.release a service- Specified by:
releaseServicein interfaceBeanContextServices- Parameters:
child- theBeanContextChildrequestor- the requestorservice- the service
-
getCurrentServiceClasses
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:BeanContextServicesGets the currently available services for this context.- Specified by:
getCurrentServiceClassesin interfaceBeanContextServices- Returns:
- an iterator for all the currently registered service classes.
-
getCurrentServiceSelectors
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:BeanContextServicesGets the list of service dependent service parameters (Service Selectors) for the specified service, by calling getCurrentServiceSelectors() on the underlying BeanContextServiceProvider.- Specified by:
getCurrentServiceSelectorsin interfaceBeanContextServices- Parameters:
serviceClass- the specified service- Returns:
- an iterator for all the currently available service selectors (if any) available for the specified service.
-
serviceAvailable
Deprecated, for removal: This API element is subject to removal in a future version.BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself. subclasses may override or envelope this method to implement their own propagation semantics.- Specified by:
serviceAvailablein interfaceBeanContextServicesListener- Overrides:
serviceAvailablein classBeanContextChildSupport- Parameters:
bcssae- The BeanContextServiceAvailableEvent fired as a result of a service becoming available
-
serviceRevoked
Deprecated, for removal: This API element is subject to removal in a future version.BeanContextServicesListener callback, propagates event to all currently registered listeners and BeanContextServices children, if this BeanContextService does not already implement this service itself. subclasses may override or envelope this method to implement their own propagation semantics.- Specified by:
serviceRevokedin interfaceBeanContextServiceRevokedListener- Overrides:
serviceRevokedin classBeanContextChildSupport- Parameters:
bcssre- TheBeanContextServiceRevokedEventfired as a result of a service being revoked
-
getChildBeanContextServicesListener
protected static final BeanContextServicesListener getChildBeanContextServicesListener(Object child) Deprecated, for removal: This API element is subject to removal in a future version.Gets theBeanContextServicesListener(if any) of the specified child.- Parameters:
child- the specified child- Returns:
- the BeanContextServicesListener (if any) of the specified child
-
childJustRemovedHook
Deprecated, for removal: This API element is subject to removal in a future version.called from superclass child removal operations after a child has been successfully removed. called with child synchronized. This subclass uses this hook to immediately revoke any services being used by this child if it is a BeanContextChild. subclasses may envelope this method in order to implement their own child removal side-effects.- Overrides:
childJustRemovedHookin classBeanContextSupport- Parameters:
child- the childbcsc- the BCSChild
-
releaseBeanContextResources
protected void releaseBeanContextResources()Deprecated, for removal: This API element is subject to removal in a future version.called from setBeanContext to notify a BeanContextChild to release resources obtained from the nesting BeanContext. This method revokes any services obtained from its parent. subclasses may envelope this method to implement their own semantics.- Overrides:
releaseBeanContextResourcesin classBeanContextChildSupport
-
initializeBeanContextResources
protected void initializeBeanContextResources()Deprecated, for removal: This API element is subject to removal in a future version.called from setBeanContext to notify a BeanContextChild to allocate resources obtained from the nesting BeanContext. subclasses may envelope this method to implement their own semantics.- Overrides:
initializeBeanContextResourcesin classBeanContextChildSupport
-
fireServiceAdded
Deprecated, for removal: This API element is subject to removal in a future version.Fires aBeanContextServiceEventnotifying of a new service.- Parameters:
serviceClass- the service class
-
fireServiceAdded
Deprecated, for removal: This API element is subject to removal in a future version.Fires aBeanContextServiceAvailableEventindicating that a new service has become available.- Parameters:
bcssae- theBeanContextServiceAvailableEvent
-
fireServiceRevoked
Deprecated, for removal: This API element is subject to removal in a future version.Fires aBeanContextServiceEventnotifying of a service being revoked.- Parameters:
bcsre- theBeanContextServiceRevokedEvent
-
fireServiceRevoked
Deprecated, for removal: This API element is subject to removal in a future version.Fires aBeanContextServiceRevokedEventindicating that a particular service is no longer available.- Parameters:
serviceClass- the service classrevokeNow- whether or not the event should be revoked now
-
bcsPreSerializationHook
Deprecated, for removal: This API element is subject to removal in a future version.called from BeanContextSupport writeObject before it serializes the children ... This class will serialize any Serializable BeanContextServiceProviders herein. subclasses may envelope this method to insert their own serialization processing that has to occur prior to serialization of the children- Overrides:
bcsPreSerializationHookin classBeanContextSupport- Parameters:
oos- theObjectOutputStreamto use during serialization- Throws:
IOException- if serialization failed
-
bcsPreDeserializationHook
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException Deprecated, for removal: This API element is subject to removal in a future version.called from BeanContextSupport readObject before it deserializes the children ... This class will deserialize any Serializable BeanContextServiceProviders serialized earlier thus making them available to the children when they deserialized. subclasses may envelope this method to insert their own serialization processing that has to occur prior to serialization of the children- Overrides:
bcsPreDeserializationHookin classBeanContextSupport- Parameters:
ois- theObjectInputStreamto use during deserialization- Throws:
IOException- if deserialization failedClassNotFoundException- if needed classes are not found
-