001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.servicemix.jbi.framework;
018    
019    import javax.jbi.management.ComponentLifeCycleMBean;
020    
021    /**
022     * Defines basic operations on the Compomnent
023     */
024    public interface ComponentMBean extends ComponentLifeCycleMBean {
025        
026        String TYPE_SERVICE_ENGINE = "service-engine";
027        String TYPE_BINDING_COMPONENT = "binding-component";
028        String TYPE_POJO = "pojo";
029        
030        /**
031         * Get the name of this component
032         * @return the name of this component
033         */
034        String getName();
035        
036        /**
037         * Is MessageExchange sender throttling enabled ?
038         * @return true if throttling enabled
039         */
040        boolean isExchangeThrottling();
041        
042        /**
043         * Set exchange throttling
044         * @param value
045         *
046         */
047        void setExchangeThrottling(boolean value);
048        
049        /**
050         * Get the throttling timeout
051         * @return throttling timeout (ms)
052         */
053        long getThrottlingTimeout();
054        
055        /**
056         * Set the throttling timout 
057         * @param value (ms)
058         */
059        void setThrottlingTimeout(long value);
060        
061        /**
062         * Get the interval for throttling -
063         * number of Exchanges set before the throttling timeout is applied
064         * @return interval for throttling
065         */
066        int getThrottlingInterval();
067        
068        /**
069         * Set the throttling interval
070         * number of Exchanges set before the throttling timeout is applied
071         * @param value
072         */
073        void setThrottlingInterval(int value);
074        
075        /**
076         * @return the component type (service-engine, binding-component)
077         */
078        String getComponentType();
079    }