shocks.framework.meta.repository
Class MetadataRepositoryProxy

java.lang.Object
  extended byshocks.framework.meta.repository.MetadataRepositoryProxy
All Implemented Interfaces:
MetadataRepository

public class MetadataRepositoryProxy
extends java.lang.Object
implements MetadataRepository

This class is a facade for the CentralMetadataRepository in the MBeanServer.


Constructor Summary
MetadataRepositoryProxy(javax.management.ObjectName objName)
           
 
Method Summary
 void addDataSource(DataSource metadata)
          Installs a DataSource into an instance pool.
 java.util.Set getTypeSet(java.lang.String type)
          Get a Set containing one instance of every bean in the repository corresponding to the specified type.
 DataSource leaseDataSource(java.lang.String type, java.lang.String name)
          Lease a DataSource of the appropriate type and name from the appropriate instance pool.
 void release(DataSource metadata)
          Release the DataSource back into the repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataRepositoryProxy

public MetadataRepositoryProxy(javax.management.ObjectName objName)
Method Detail

addDataSource

public void addDataSource(DataSource metadata)
Description copied from interface: MetadataRepository
Installs a DataSource into an instance pool.

Specified by:
addDataSource in interface MetadataRepository
Parameters:
metadata -

leaseDataSource

public DataSource leaseDataSource(java.lang.String type,
                                  java.lang.String name)
Description copied from interface: MetadataRepository
Lease a DataSource of the appropriate type and name from the appropriate instance pool.

Specified by:
leaseDataSource in interface MetadataRepository
Parameters:
type -
name -
Returns:
DataSource

release

public void release(DataSource metadata)
Release the DataSource back into the repository. This entails passing an invocation through the MBeanServer to release the DataSource.

Specified by:
release in interface MetadataRepository
Parameters:
metadata - to be released back into the repository.

getTypeSet

public java.util.Set getTypeSet(java.lang.String type)
Description copied from interface: MetadataRepository
Get a Set containing one instance of every bean in the repository corresponding to the specified type.

Specified by:
getTypeSet in interface MetadataRepository
Parameters:
type -
Returns:
Set