001/* 
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019package org.apache.felix.ipojo;
020
021
022/**
023 * Service interface published by handler factory.
024 * This interface allows interacting the the handler factory to create
025 * {@link Handler} objects.
026 * @see Factory 
027 * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
028 */
029public interface HandlerFactory extends Factory {
030
031    /**
032     * The iPOJO Default Namespace.
033     */
034    String IPOJO_NAMESPACE = "org.apache.felix.ipojo";
035
036    /**
037     * Gets the namespace associated with this handler factory.
038     * @return the namespace used by this handler
039     */
040    String getNamespace();
041
042    /**
043     * Gets the name associated with this handler factory.
044     * @return the name used by this handler
045     */
046    String getHandlerName();
047
048    /**
049     * Gets the type of the handler factory.
050     * The handler can only be plugged on instance container with the same type.
051     * Basically, types are <code>primitive</code> and <code>composite</code>.
052     * @return the type of the handler
053     */
054    String getType();
055
056    /**
057     * Gets the start level of the handler objects created by this factory.
058     * Handlers with a low start level are configured and started before 
059     * handlers with an higher start level. Moreover, these handlers are
060     * stopped and disposed after.
061     * @return the handler's start level
062     */
063    int getStartLevel();
064
065}