src/share/classes/java/beans/beancontext/BeanContextServices.java

Print this page

        

*** 60,70 **** * @param serviceClass the service to add * @param serviceProvider the <code>BeanContextServiceProvider</code> * associated with the service * @return true if the service was successful added, false otherwise */ ! boolean addService(Class serviceClass, BeanContextServiceProvider serviceProvider); /** * BeanContextServiceProviders wishing to remove * a currently registered service from this context * may do so via invocation of this method. Upon revocation of --- 60,70 ---- * @param serviceClass the service to add * @param serviceProvider the <code>BeanContextServiceProvider</code> * associated with the service * @return true if the service was successful added, false otherwise */ ! boolean addService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider); /** * BeanContextServiceProviders wishing to remove * a currently registered service from this context * may do so via invocation of this method. Upon revocation of
*** 81,99 **** * <code>BeanContextServiceProvider</code> or * <code>BeanContextServices</code> wishes to immediately * terminate service to all currently outstanding references * to the specified service. */ ! void revokeService(Class serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow); /** * Reports whether or not a given service is * currently available from this context. * @param serviceClass the service in question * @return true if the service is available */ ! boolean hasService(Class serviceClass); /** * A <code>BeanContextChild</code>, or any arbitrary object * associated with a <code>BeanContextChild</code>, may obtain * a reference to a currently registered service from its --- 81,99 ---- * <code>BeanContextServiceProvider</code> or * <code>BeanContextServices</code> wishes to immediately * terminate service to all currently outstanding references * to the specified service. */ ! void revokeService(Class<?> serviceClass, BeanContextServiceProvider serviceProvider, boolean revokeCurrentServicesNow); /** * Reports whether or not a given service is * currently available from this context. * @param serviceClass the service in question * @return true if the service is available */ ! boolean hasService(Class<?> serviceClass); /** * A <code>BeanContextChild</code>, or any arbitrary object * associated with a <code>BeanContextChild</code>, may obtain * a reference to a currently registered service from its
*** 111,121 **** * if the service should later become revoked * @throws TooManyListenersException if there are too many listeners * @return a reference to this context's named * Service as requested or <code>null</code> */ ! Object getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException; /** * Releases a <code>BeanContextChild</code>'s * (or any arbitrary object associated with a BeanContextChild) * reference to the specified service by calling releaseService() --- 111,121 ---- * if the service should later become revoked * @throws TooManyListenersException if there are too many listeners * @return a reference to this context's named * Service as requested or <code>null</code> */ ! Object getService(BeanContextChild child, Object requestor, Class<?> serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl) throws TooManyListenersException; /** * Releases a <code>BeanContextChild</code>'s * (or any arbitrary object associated with a BeanContextChild) * reference to the specified service by calling releaseService()
*** 129,150 **** /** * Gets the currently available services for this context. * @return an <code>Iterator</code> consisting of the * currently available services */ ! Iterator getCurrentServiceClasses(); /** * Gets the list of service dependent service parameters * (Service Selectors) for the specified service, by * calling getCurrentServiceSelectors() on the * underlying BeanContextServiceProvider. * @param serviceClass the specified service * @return the currently available service selectors * for the named serviceClass */ ! Iterator getCurrentServiceSelectors(Class serviceClass); /** * Adds a <code>BeanContextServicesListener</code> to this BeanContext * @param bcsl the <code>BeanContextServicesListener</code> to add */ --- 129,150 ---- /** * Gets the currently available services for this context. * @return an <code>Iterator</code> consisting of the * currently available services */ ! Iterator<? extends Object> getCurrentServiceClasses(); /** * Gets the list of service dependent service parameters * (Service Selectors) for the specified service, by * calling getCurrentServiceSelectors() on the * underlying BeanContextServiceProvider. * @param serviceClass the specified service * @return the currently available service selectors * for the named serviceClass */ ! Iterator<? extends Object> getCurrentServiceSelectors(Class<?> serviceClass); /** * Adds a <code>BeanContextServicesListener</code> to this BeanContext * @param bcsl the <code>BeanContextServicesListener</code> to add */