KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ve > luz > ica > jackass > solver > ComponentSolverImpl


1 /*
2  * Copyright (c) 2003 by The Jackass Team
3  * Licensed under the Open Software License version 2.0
4  */

5 package ve.luz.ica.jackass.solver;
6
7 import org.apache.commons.logging.Log;
8 import org.apache.commons.logging.LogFactory;
9 import org.omg.CORBA.Object JavaDoc;
10
11 /**
12  * ComponentSolver implementation. This implementation delegates
13  * all the functionality in a ComponentProxyManager
14  * @author Guido Urdaneta, David Fernández
15  * @see ComponentProxyManager
16  */

17 public class ComponentSolverImpl extends ComponentSolverPOA
18 {
19     private static final Log LOG = LogFactory.getLog(ComponentSolverImpl.class);
20
21     private ComponentProxyManager cpm;
22
23     /**
24      * Creates a ComponentSolverImpl.
25      * @param cpMgr the ComponentProxyManager to delegate the functionality in.
26      */

27     public ComponentSolverImpl(ComponentProxyManager cpMgr)
28     {
29         this.cpm = cpMgr;
30     }
31
32     /**
33      * Returns all proxy references associated to a specified component.
34      * @param componentID the ID of the component
35      * @return an array with the proxy references.
36      * @see ComponentProxyManager#COMPONENT_ID_SEPARATOR
37      */

38     public Object JavaDoc[] solve(String JavaDoc componentID)
39     {
40         Object JavaDoc[] proxies = cpm.getProxies(componentID);
41         if (LOG.isDebugEnabled()) LOG.debug("Resolving " + componentID +
42                 " found " + proxies.length + " proxies");
43         //return cpm.getProxies(componentID);
44
return proxies;
45     }
46
47 }
48
Popular Tags