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

Print this page




  53 
  54    /**
  55     * Invoked by <code>BeanContextServices</code>, this method
  56     * requests an instance of a
  57     * service from this <code>BeanContextServiceProvider</code>.
  58     *
  59     * @param bcs The <code>BeanContextServices</code> associated with this
  60     * particular request. This parameter enables the
  61     * <code>BeanContextServiceProvider</code> to distinguish service
  62     * requests from multiple sources.
  63     *
  64     * @param requestor          The object requesting the service
  65     *
  66     * @param serviceClass       The service requested
  67     *
  68     * @param serviceSelector the service dependent parameter
  69     * for a particular service, or <code>null</code> if not applicable.
  70     *
  71     * @return a reference to the requested service
  72     */
  73     Object getService(BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector);
  74 
  75     /**
  76      * Invoked by <code>BeanContextServices</code>,
  77      * this method releases a nested <code>BeanContextChild</code>'s
  78      * (or any arbitrary object associated with a
  79      * <code>BeanContextChild</code>) reference to the specified service.
  80      *
  81      * @param bcs the <code>BeanContextServices</code> associated with this
  82      * particular release request
  83      *
  84      * @param requestor the object requesting the service to be released
  85      *
  86      * @param service the service that is to be released
  87      */
  88     public void releaseService(BeanContextServices bcs, Object requestor, Object service);
  89 
  90     /**
  91      * Invoked by <code>BeanContextServices</code>, this method
  92      * gets the current service selectors for the specified service.
  93      * A service selector is a service specific parameter,
  94      * typical examples of which could include: a
  95      * parameter to a constructor for the service implementation class,
  96      * a value for a particular service's property, or a key into a
  97      * map of existing implementations.
  98      *
  99      * @param bcs           the <code>BeanContextServices</code> for this request
 100      * @param serviceClass  the specified service
 101      * @return   the current service selectors for the specified serviceClass
 102      */
 103     Iterator getCurrentServiceSelectors(BeanContextServices bcs, Class serviceClass);
 104 }


  53 
  54    /**
  55     * Invoked by <code>BeanContextServices</code>, this method
  56     * requests an instance of a
  57     * service from this <code>BeanContextServiceProvider</code>.
  58     *
  59     * @param bcs The <code>BeanContextServices</code> associated with this
  60     * particular request. This parameter enables the
  61     * <code>BeanContextServiceProvider</code> to distinguish service
  62     * requests from multiple sources.
  63     *
  64     * @param requestor          The object requesting the service
  65     *
  66     * @param serviceClass       The service requested
  67     *
  68     * @param serviceSelector the service dependent parameter
  69     * for a particular service, or <code>null</code> if not applicable.
  70     *
  71     * @return a reference to the requested service
  72     */
  73     Object getService(BeanContextServices bcs, Object requestor, Class<?> serviceClass, Object serviceSelector);
  74 
  75     /**
  76      * Invoked by <code>BeanContextServices</code>,
  77      * this method releases a nested <code>BeanContextChild</code>'s
  78      * (or any arbitrary object associated with a
  79      * <code>BeanContextChild</code>) reference to the specified service.
  80      *
  81      * @param bcs the <code>BeanContextServices</code> associated with this
  82      * particular release request
  83      *
  84      * @param requestor the object requesting the service to be released
  85      *
  86      * @param service the service that is to be released
  87      */
  88     public void releaseService(BeanContextServices bcs, Object requestor, Object service);
  89 
  90     /**
  91      * Invoked by <code>BeanContextServices</code>, this method
  92      * gets the current service selectors for the specified service.
  93      * A service selector is a service specific parameter,
  94      * typical examples of which could include: a
  95      * parameter to a constructor for the service implementation class,
  96      * a value for a particular service's property, or a key into a
  97      * map of existing implementations.
  98      *
  99      * @param bcs           the <code>BeanContextServices</code> for this request
 100      * @param serviceClass  the specified service
 101      * @return   the current service selectors for the specified serviceClass
 102      */
 103     Iterator<?> getCurrentServiceSelectors(BeanContextServices bcs, Class<?> serviceClass);
 104 }