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.activemq.transport;
018    
019    /**
020     * MBean to manage a single Transport Logger.
021     * It can inform if the logger is currently writing to a log file or not,
022     * by setting the logging property or by using the operations
023     * enableLogging() and disableLogging().
024     * 
025     * @author David Martin Clavo david(dot)martin(dot)clavo(at)gmail.com
026     * 
027     */
028    public interface TransportLoggerViewMBean {
029    
030        /**
031         * Returns if the managed TransportLogger is currently active
032         * (writing to a log) or not.
033         * @return if the managed TransportLogger is currently active
034         * (writing to a log) or not.
035         */
036        public boolean isLogging();
037        
038        /**
039         * Enables or disables logging for the managed TransportLogger.
040         * @param logging Boolean value to enable or disable logging for
041         * the managed TransportLogger.
042         * true to enable logging, false to disable logging.
043         */
044        public void setLogging(boolean logging);
045        
046        /**
047         * Enables logging for the managed TransportLogger.
048         */
049        public void enableLogging();
050        
051        /**
052         * Disables logging for the managed TransportLogger.
053         */
054        public void disableLogging();
055        
056    }