blob: 9d8e8c539060dba0aad0a241512a15854980adc5 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.felix.ipojo;
import java.util.Dictionary;
/**
* Component Type Factory Service.
* This service is exposed by a component manager factory, and allows the dynamic creation of component instance.
* @author <a href="mailto:felix-dev@incubator.apache.org">Felix Project Team</a>
*/
public interface Factory {
/**
* Create a component manager (i.e. component type instance).
* @param configuration : the configuration properties for this component.
* @return the created component manager.
*/
ComponentManager createComponent(Dictionary configuration);
/**
* Create a component manager (i.e. component type instance).
* This has these service interaction in the scope given in argument.
* @param configuration : the configuration properties for this component.
* @param serviceContext : the service context of the component.
* @return the created component manager.
*/
ComponentManager createComponent(Dictionary configuration, ServiceContext serviceContext);
/**
* Get the component type information containing provided service, configuration properties ...
* @return the compionent type information.
*/
ComponentInfo getComponentInfo();
/**
* Check if the given configuration is acceptable as a configuration of a component instance.
* @param conf : the configuration to test
* @return true if the configuration is acceptable
*/
boolean isAcceptable(Dictionary conf);
}