diff options
author | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-12-01 21:32:38 +0000 |
---|---|---|
committer | Andrew John Hughes <gnu_andrew@member.fsf.org> | 2006-12-01 21:32:38 +0000 |
commit | 9ea0fdeb40fcc88b8a86e7db8373e4f8be076fa3 (patch) | |
tree | 67b9cde2e5cb6dfeb0152ff9917e20f6c2471b2a | |
parent | 08e9180b19d851a196ddb8a235dff3ff849f9cc7 (diff) | |
download | classpath-9ea0fdeb40fcc88b8a86e7db8373e4f8be076fa3.tar.gz |
2006-12-01 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/beans/beancontext/BeanContextServicesSupport.java:
(BCSSProxyServiceProvider.getCurrentServiceSelectors(BeanContextServices,
Class)): Implemented.
(BCSSProxyServiceProvider.getService(BeanContextServices, Object,
Class, Object)): Implemented.
(BCSSProxyServiceProvider.releaseService(BeanContextServices,
Object, Object)): Implemented.
(BCSSProxyServiceProvider.serviceRevoked(BeanContextServiceRevokedEvent)):
Implemented.
(initialiseBeanContextResources()): Implemented.
(releaseBeanContextResoures()): Implemented.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | java/beans/beancontext/BeanContextServicesSupport.java | 39 |
2 files changed, 38 insertions, 15 deletions
@@ -1,3 +1,17 @@ +2006-12-01 Andrew John Hughes <gnu_andrew@member.fsf.org> + + * java/beans/beancontext/BeanContextServicesSupport.java: + (BCSSProxyServiceProvider.getCurrentServiceSelectors(BeanContextServices, + Class)): Implemented. + (BCSSProxyServiceProvider.getService(BeanContextServices, Object, + Class, Object)): Implemented. + (BCSSProxyServiceProvider.releaseService(BeanContextServices, + Object, Object)): Implemented. + (BCSSProxyServiceProvider.serviceRevoked(BeanContextServiceRevokedEvent)): + Implemented. + (initialiseBeanContextResources()): Implemented. + (releaseBeanContextResoures()): Implemented. + 2006-12-01 Mark Wielaard <mark@klomp.org> * include/gnu_java_awt_peer_gtk_GdkFontPeer.h: Regenerated. diff --git a/java/beans/beancontext/BeanContextServicesSupport.java b/java/beans/beancontext/BeanContextServicesSupport.java index ce09b86cc..f354ff474 100644 --- a/java/beans/beancontext/BeanContextServicesSupport.java +++ b/java/beans/beancontext/BeanContextServicesSupport.java @@ -86,38 +86,39 @@ public class BeanContextServicesSupport { private static final long serialVersionUID = 7078212910685744490L; - private BCSSProxyServiceProvider() + private BeanContextServiceProvider provider; + + private BCSSProxyServiceProvider(BeanContextServiceProvider p) { + provider = p; } public Iterator getCurrentServiceSelectors (BeanContextServices bcs, Class serviceClass) - throws NotImplementedException { - throw new Error ("Not implemented"); + return provider.getCurrentServiceSelectors(bcs, serviceClass); } public Object getService (BeanContextServices bcs, Object requestor, Class serviceClass, Object serviceSelector) - throws NotImplementedException { - throw new Error ("Not implemented"); + return provider.getService(bcs, requestor, serviceClass, + serviceSelector); } public void releaseService (BeanContextServices bcs, Object requestor, Object service) - throws NotImplementedException { - throw new Error ("Not implemented"); + provider.releaseService(bcs, requestor, service); } public void serviceRevoked (BeanContextServiceRevokedEvent bcsre) - throws NotImplementedException { - throw new Error ("Not implemented"); + if (provider instanceof BeanContextServiceRevokedListener) + ((BeanContextServiceRevokedListener) provider).serviceRevoked(bcsre); } } @@ -772,16 +773,24 @@ public class BeanContextServicesSupport serviceLeases = new HashMap(); } - protected void initializeBeanContextResources () - throws NotImplementedException + /** + * Subclasses may override this method to allocate resources + * from the nesting bean context. + */ + protected void initializeBeanContextResources() { - throw new Error ("Not implemented"); + /* Purposefully left empty */ } - protected void releaseBeanContextResources () - throws NotImplementedException + /** + * Relinquishes any resources obtained from the parent context. + * Specifically, those services obtained from the parent are revoked. + * Subclasses may override this method to deallocate resources + * from the nesting bean context. + */ + protected void releaseBeanContextResources() { - throw new Error ("Not implemented"); + /* Purposefully left empty */ } /** |