< prev index next >

src/java.desktop/share/classes/java/beans/beancontext/BeanContextServicesSupport.java

Print this page

        

*** 132,145 **** services = new HashMap<>(serializable + 1); bcsListeners = new ArrayList<>(1); } /** ! * Gets the <tt>BeanContextServices</tt> associated with this ! * <tt>BeanContextServicesSupport</tt>. * ! * @return the instance of <tt>BeanContext</tt> * this object is providing the implementation for. */ public BeanContextServices getBeanContextServicesPeer() { return (BeanContextServices)getBeanContextChildPeer(); } --- 132,145 ---- services = new HashMap<>(serializable + 1); bcsListeners = new ArrayList<>(1); } /** ! * Gets the {@code BeanContextServices} associated with this ! * {@code BeanContextServicesSupport}. * ! * @return the instance of {@code BeanContext} * this object is providing the implementation for. */ public BeanContextServices getBeanContextServicesPeer() { return (BeanContextServices)getBeanContextChildPeer(); }
*** 999,1009 **** } } } /** ! * Gets the <tt>BeanContextServicesListener</tt> (if any) of the specified * child. * * @param child the specified child * @return the BeanContextServicesListener (if any) of the specified child */ --- 999,1009 ---- } } } /** ! * Gets the {@code BeanContextServicesListener} (if any) of the specified * child. * * @param child the specified child * @return the BeanContextServicesListener (if any) of the specified child */
*** 1082,1105 **** // do nothing ... } } /** ! * Fires a <tt>BeanContextServiceEvent</tt> notifying of a new service. * @param serviceClass the service class */ protected final void fireServiceAdded(Class<?> serviceClass) { BeanContextServiceAvailableEvent bcssae = new BeanContextServiceAvailableEvent(getBeanContextServicesPeer(), serviceClass); fireServiceAdded(bcssae); } /** ! * Fires a <tt>BeanContextServiceAvailableEvent</tt> indicating that a new * service has become available. * ! * @param bcssae the <tt>BeanContextServiceAvailableEvent</tt> */ protected final void fireServiceAdded(BeanContextServiceAvailableEvent bcssae) { Object[] copy; synchronized (bcsListeners) { copy = bcsListeners.toArray(); } --- 1082,1105 ---- // do nothing ... } } /** ! * Fires a {@code BeanContextServiceEvent} notifying of a new service. * @param serviceClass the service class */ protected final void fireServiceAdded(Class<?> serviceClass) { BeanContextServiceAvailableEvent bcssae = new BeanContextServiceAvailableEvent(getBeanContextServicesPeer(), serviceClass); fireServiceAdded(bcssae); } /** ! * Fires a {@code BeanContextServiceAvailableEvent} indicating that a new * service has become available. * ! * @param bcssae the {@code BeanContextServiceAvailableEvent} */ protected final void fireServiceAdded(BeanContextServiceAvailableEvent bcssae) { Object[] copy; synchronized (bcsListeners) { copy = bcsListeners.toArray(); }
*** 1108,1120 **** ((BeanContextServicesListener)copy[i]).serviceAvailable(bcssae); } } /** ! * Fires a <tt>BeanContextServiceEvent</tt> notifying of a service being revoked. * ! * @param bcsre the <tt>BeanContextServiceRevokedEvent</tt> */ protected final void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre) { Object[] copy; synchronized (bcsListeners) { copy = bcsListeners.toArray(); } --- 1108,1120 ---- ((BeanContextServicesListener)copy[i]).serviceAvailable(bcssae); } } /** ! * Fires a {@code BeanContextServiceEvent} notifying of a service being revoked. * ! * @param bcsre the {@code BeanContextServiceRevokedEvent} */ protected final void fireServiceRevoked(BeanContextServiceRevokedEvent bcsre) { Object[] copy; synchronized (bcsListeners) { copy = bcsListeners.toArray(); }
*** 1123,1133 **** ((BeanContextServiceRevokedListener)copy[i]).serviceRevoked(bcsre); } } /** ! * Fires a <tt>BeanContextServiceRevokedEvent</tt> * indicating that a particular service is * no longer available. * @param serviceClass the service class * @param revokeNow whether or not the event should be revoked now */ --- 1123,1133 ---- ((BeanContextServiceRevokedListener)copy[i]).serviceRevoked(bcsre); } } /** ! * Fires a {@code BeanContextServiceRevokedEvent} * indicating that a particular service is * no longer available. * @param serviceClass the service class * @param revokeNow whether or not the event should be revoked now */
*** 1233,1259 **** /* * fields */ /** ! * all accesses to the <code> protected transient HashMap services </code> * field should be synchronized on that object */ protected transient HashMap<Object, BCSSServiceProvider> services; /** ! * The number of instances of a serializable <tt>BeanContextServceProvider</tt>. */ protected transient int serializable = 0; /** ! * Delegate for the <tt>BeanContextServiceProvider</tt>. */ protected transient BCSSProxyServiceProvider proxy; /** ! * List of <tt>BeanContextServicesListener</tt> objects. */ protected transient ArrayList<BeanContextServicesListener> bcsListeners; } --- 1233,1259 ---- /* * fields */ /** ! * all accesses to the {@code protected transient HashMap services} * field should be synchronized on that object */ protected transient HashMap<Object, BCSSServiceProvider> services; /** ! * The number of instances of a serializable {@code BeanContextServceProvider}. */ protected transient int serializable = 0; /** ! * Delegate for the {@code BeanContextServiceProvider}. */ protected transient BCSSProxyServiceProvider proxy; /** ! * List of {@code BeanContextServicesListener} objects. */ protected transient ArrayList<BeanContextServicesListener> bcsListeners; }
< prev index next >