/*
 * $RCSfile: SpecificInterfaceManager.java,v $
 * $Date: 2006/01/26 14:48:59 $
 * $Revision: 1.1.2.1 $
 * $Author: andreys $
 */
 
/*
 * Copyright (c) 2002-2003 IST-2004-2006-511731 ModelWare - ModelBus.
 * All rights reserved.
 *
 * This software is published under the terms of the ModelBus Software License
 * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * A copy of ModelBus Software License is provided with this distribution in
 * doc/LICENSE.txt file.
 */
 
/*
 * SpecificInterfaceManager.java Add description 
 * 
 * @author Prawee Sriplakich (LIP6)
 * @version $Revision: 1.1.2.1 $ $Date: 2006/01/26 14:48:59 $
 * @see Add references
 *
 * TODO Add description
 * TODO Add references
 */
package org.eclipse.mddi.modelbus.adapter.user.consumer;

import java.util.Hashtable;
import java.util.Map;


public class SpecificInterfaceManager {
    
    static SpecificInterfaceManager instance = new SpecificInterfaceManager();
    

    /**
     * @return Returns the instance.
     */
    public static SpecificInterfaceManager getInstance() {
        return instance;
    }
    
    Map map = new Hashtable();
    
    /**
     * Registers a Java interface specific to a ModelingServiceInterface
     * 
     * @param modelingServiceInterfaceName the name of the ModelingServiceInterface
     * @param _interface object providing this interface
     * 
     */
    public void registerSpecificInterface(String modelingServiceInterfaceName, SpecificConsumer _interface) {
        map.put(modelingServiceInterfaceName, _interface);
    
    }
    
    /**
     * getSpecificInterfaceAdd description 
     * 
     * @param modelingServiceInterfaceName the name of the ModelingServiceInterface
     * @return bject providing this interface
     * 
     */
    public SpecificConsumer getSpecificInterface(String modelingServiceInterfaceName) {    
        return (SpecificConsumer) map.get(modelingServiceInterfaceName);
    }
    

}
