1 19 20 package org.apache.james.test.mock.avalon; 21 22 import org.apache.avalon.framework.service.ServiceException; 23 24 import java.util.HashMap ; 25 26 public class MockServiceManager implements org.apache.avalon.framework.service.ServiceManager { 27 28 private HashMap m_serviceMap = new HashMap (); 29 30 public Object lookup(String serviceName) throws ServiceException { 31 return m_serviceMap.get(serviceName); 32 } 33 34 public boolean hasService(String serviceName) { 35 return m_serviceMap.get(serviceName) != null; 36 } 37 38 public void put(String name, Object service) { 39 m_serviceMap.put(name, service); 40 } 41 42 public void release(Object object) { 43 } 45 } 46 | Popular Tags |