Thread: [Ejtools-cvs] applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service CacheService.j
Brought to you by:
letiemble
|
From: <let...@us...> - 2003-11-27 01:13:42
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/model/service Modified Files: CacheService.java CacheServiceProvider.java ConnectionMetaData.java ConnectionServiceProvider.java CustomizationService.java CustomizationServiceProvider.java NotificationService.java NotificationServiceProvider.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: CacheService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/CacheService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CacheService.java 10 Feb 2003 20:49:31 -0000 1.1 --- CacheService.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,68 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Enumeration; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CacheService extends Serializable ! { ! /** Description of the Field */ ! public final int DOMAIN_TYPE = 0; ! /** Description of the Field */ ! public final int RESOURCE_TYPE = 1; ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheService object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type); ! ! ! /** Description of the Method */ ! public void clear(); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key); ! } --- 1,68 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Enumeration; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CacheService extends Serializable ! { ! /** Description of the Field */ ! public final int DOMAIN_TYPE = 0; ! /** Description of the Field */ ! public final int RESOURCE_TYPE = 1; ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheService object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type); ! ! ! /** Description of the Method */ ! public void clear(); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key); ! } Index: CacheServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/CacheServiceProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CacheServiceProvider.java 24 Feb 2003 22:02:36 -0000 1.2 --- CacheServiceProvider.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 1,168 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Enumeration; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CacheServiceProvider extends CustomBeanContextServiceProvider implements CacheService ! { ! /** Description of the Field */ ! protected Hashtable domains = new Hashtable(); ! /** Description of the Field */ ! protected Hashtable resources = new Hashtable(); ! /** Description of the Field */ ! protected CacheService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(CacheServiceProvider.class); ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public CacheServiceProvider() ! { ! service = this; ! } ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value) ! { ! this.getTable(type).put(key, value); ! // logger.debug("Entity added " + type + ", " + key); ! } ! ! ! /** Description of the Method */ ! public void clear() ! { ! super.clear(); ! this.getTable(CacheService.DOMAIN_TYPE).clear(); ! this.getTable(CacheService.RESOURCE_TYPE).clear(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key) ! { ! return this.getTable(type).get(key); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type) ! { ! return this.getTable(type).keys(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key) ! { ! this.getTable(type).remove(key); ! // logger.debug("Entity removed " + type + ", " + key); ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{CacheService.class}; ! } ! ! ! /** ! * Gets the table attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @return The table value ! */ ! protected Hashtable getTable(int type) ! { ! if (type == CacheService.DOMAIN_TYPE) ! { ! return this.domains; ! } ! return this.resources; ! } ! } --- 1,165 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Enumeration; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CacheServiceProvider extends CustomBeanContextServiceProvider implements CacheService ! { ! /** Description of the Field */ ! protected Hashtable domains = new Hashtable(); ! /** Description of the Field */ ! protected Hashtable resources = new Hashtable(); ! /** Description of the Field */ ! protected CacheService service = null; ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public CacheServiceProvider() ! { ! service = this; ! } ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value) ! { ! this.getTable(type).put(key, value); ! // logger.debug("Entity added " + type + ", " + key); ! } ! ! ! /** Description of the Method */ ! public void clear() ! { ! super.clear(); ! this.getTable(CacheService.DOMAIN_TYPE).clear(); ! this.getTable(CacheService.RESOURCE_TYPE).clear(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key) ! { ! return this.getTable(type).get(key); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type) ! { ! return this.getTable(type).keys(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key) ! { ! this.getTable(type).remove(key); ! // logger.debug("Entity removed " + type + ", " + key); ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{CacheService.class}; ! } ! ! ! /** ! * Gets the table attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @return The table value ! */ ! protected Hashtable getTable(int type) ! { ! if (type == CacheService.DOMAIN_TYPE) ! { ! return this.domains; ! } ! return this.resources; ! } ! } Index: ConnectionMetaData.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/ConnectionMetaData.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConnectionMetaData.java 24 Feb 2003 22:02:37 -0000 1.2 --- ConnectionMetaData.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 22,29 **** --- 22,31 ---- ConnectionMetaData.PACKAGES, ConnectionMetaData.URL, + ConnectionMetaData.SERVICE, ConnectionMetaData.CONTEXT, ConnectionMetaData.PRINCIPAL, ConnectionMetaData.CREDENTIALS }; + /** Description of the Field */ public final static String CLASS_NAME = "classname"; *************** *** 40,43 **** --- 42,47 ---- /** Description of the Field */ public final static String URL = "url"; + /** Description of the Field */ + public final static String SERVICE = "service"; Index: ConnectionServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/ConnectionServiceProvider.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConnectionServiceProvider.java 24 Feb 2003 22:02:35 -0000 1.3 --- ConnectionServiceProvider.java 27 Nov 2003 01:13:07 -0000 1.4 *************** *** 43,65 **** * * @param metadata Description of the Parameter */ public ConnectionServiceProvider(Profile metadata) { ! try ! { ! ConnectionService service = (ConnectionService) Thread.currentThread().getContextClassLoader().loadClass(metadata.getProperty(ConnectionMetaData.CLASS_NAME)).newInstance(); ! this.setup(service); ! } ! catch (ClassNotFoundException cnfe) ! { ! logger.error(cnfe.getMessage(), cnfe); ! } ! catch (IllegalAccessException iae) { ! logger.error(iae.getMessage(), iae); } ! catch (Exception e) { ! logger.error(e.getMessage(), e); } } --- 43,75 ---- * * @param metadata Description of the Parameter + * @param loader Description of the Parameter */ public ConnectionServiceProvider(Profile metadata) { ! // Create the connection service from metadatas ! String clazz = metadata.getProperty(ConnectionMetaData.CLASS_NAME); ! if (clazz != null) { ! try ! { ! ConnectionService service = (ConnectionService) Thread.currentThread().getContextClassLoader().loadClass(clazz).newInstance(); ! this.setup(service); ! } ! catch (ClassNotFoundException cnfe) ! { ! logger.error(cnfe.getMessage(), cnfe); ! } ! catch (IllegalAccessException iae) ! { ! logger.error(iae.getMessage(), iae); ! } ! catch (Exception e) ! { ! logger.error(e.getMessage(), e); ! } } ! else { ! logger.error("Class provided is null"); } } Index: CustomizationService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/CustomizationService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CustomizationService.java 10 Feb 2003 20:49:30 -0000 1.1 --- CustomizationService.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,42 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Collection; ! ! import org.ejtools.jmx.browser.mbean.View; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CustomizationService extends Serializable ! { ! /** ! * Gets the views attribute of the CustomizationService object ! * ! * @return The views value ! */ ! public Collection getViews(); ! ! ! /** ! * Gets the view attribute of the CustomizationService object ! * ! * @param index Description of the Parameter ! * @return The view value ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! */ ! public View getView(int index); ! } --- 1,42 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Collection; ! ! import org.ejtools.jmx.browser.mbean.View; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CustomizationService extends Serializable ! { ! /** ! * Gets the views attribute of the CustomizationService object ! * ! * @return The views value ! */ ! public Collection getViews(); ! ! ! /** ! * Gets the view attribute of the CustomizationService object ! * ! * @param index Description of the Parameter ! * @return The view value ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! */ ! public View getView(int index); ! } Index: CustomizationServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/CustomizationServiceProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CustomizationServiceProvider.java 12 Feb 2003 21:22:42 -0000 1.2 --- CustomizationServiceProvider.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 1,192 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Arrays; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.jmx.browser.mbean.CustomViewDeployer; ! import org.ejtools.jmx.browser.mbean.View; ! import org.ejtools.jmx.browser.model.Resource; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CustomizationServiceProvider extends CustomBeanContextServiceProvider implements CustomizationService ! { ! /** Description of the Field */ ! protected CustomizationService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(CustomizationServiceProvider.class); ! ! ! /** Constructor for the CustomizationServiceProvider object */ ! public CustomizationServiceProvider() ! { ! this.service = this; ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! * @parambcs Description of the Parameter ! * @paramrequestor Description of the Parameter ! * @paramserviceClass Description of the Parameter ! * @paramserviceSelector Description of the Parameter ! * @parambcs Description of the Parameter ! * @paramrequestor Description of the Parameter ! * @paramserviceClass Description of the Parameter ! * @paramserviceSelector Description of the Parameter ! * @parambcs Description of Parameter ! * @paramrequestor Description of Parameter ! * @paramserviceClass Description of Parameter ! * @paramserviceSelector Description of Parameter ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return service; ! } ! ! ! /** ! * Gets the view attribute of the CustomizationServiceProvider object ! * ! * @param index Description of the Parameter ! * @return The view value ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! */ ! public View getView(int index) ! { ! logger.debug("Getting view by index=" + index); ! ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! View result = null; ! ! if (context.hasService(ConnectionService.class) && context.hasService(CacheService.class)) ! { ! logger.debug("Using service ConnectionService and CacheService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! CacheService cache = (CacheService) context.getService(this, this, CacheService.class, this, this); ! ! Resource resource = (Resource) cache.get(CacheService.RESOURCE_TYPE, CustomViewDeployer.OBJECT_NAME); ! if (resource != null) ! { ! result = (View) resource.invoke("getView", new Object[]{new Integer(index)}, new String[]{"int"}); ! } ! ! context.releaseService(this, this, CacheService.class); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! logger.error("Error during utilisation of service ConnectionService or CacheService (" + e.getMessage() + ")"); ! } ! } ! ! return result; ! } ! ! ! /** ! * Gets the views attribute of the CustomizationServiceProvider object ! * ! * @return The views value ! */ ! public Collection getViews() ! { ! logger.debug("Getting views"); ! ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! Collection result = new Vector(); ! ! if (context.hasService(ConnectionService.class) && context.hasService(CacheService.class)) ! { ! logger.debug("Using service ConnectionService and CacheService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! CacheService cache = (CacheService) context.getService(this, this, CacheService.class, this, this); ! ! Resource resource = (Resource) cache.get(CacheService.RESOURCE_TYPE, CustomViewDeployer.OBJECT_NAME); ! if (resource != null) ! { ! View[] views = (View[]) resource.getAttribute("Views"); ! if (views != null) ! { ! result.addAll(Arrays.asList(views)); ! } ! } ! ! context.releaseService(this, this, CacheService.class); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! logger.error("Error during utilisation of service ConnectionService or CacheService (" + e.getMessage() + ")"); ! } ! } ! ! return result; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{CustomizationService.class}; ! } ! } --- 1,177 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Arrays; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.jmx.browser.mbean.CustomViewDeployer; ! import org.ejtools.jmx.browser.mbean.View; ! import org.ejtools.jmx.browser.model.Resource; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 d?cembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CustomizationServiceProvider extends CustomBeanContextServiceProvider implements CustomizationService ! { ! /** Description of the Field */ ! protected CustomizationService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(CustomizationServiceProvider.class); ! ! ! /** Constructor for the CustomizationServiceProvider object */ ! public CustomizationServiceProvider() ! { ! this.service = this; ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return service; ! } ! ! ! /** ! * Gets the view attribute of the CustomizationServiceProvider object ! * ! * @param index Description of the Parameter ! * @return The view value ! */ ! public View getView(int index) ! { ! logger.debug("Getting view by index=" + index); ! ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! View result = null; ! ! if (context.hasService(ConnectionService.class) && context.hasService(CacheService.class)) ! ... [truncated message content] |