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.broker.jmx;
018    
019    import org.apache.activemq.Service;
020    
021    public interface ConnectionViewMBean extends Service {
022        /**
023         * @return true if the Connection is slow
024         */
025        @MBeanInfo("Connection is slow.")
026        boolean isSlow();
027    
028        /**
029         * @return if after being marked, the Connection is still writing
030         */
031        @MBeanInfo("Connection is blocked.")
032        boolean isBlocked();
033    
034        /**
035         * @return true if the Connection is connected
036         */
037        @MBeanInfo("Connection is connected to the broker.")
038        boolean isConnected();
039    
040        /**
041         * @return true if the Connection is active
042         */
043        @MBeanInfo("Connection is active (both connected and receiving messages).")
044        boolean isActive();
045        
046        /**
047         * Resets the statistics
048         */
049        @MBeanInfo("Resets the statistics")
050        void resetStatistics();
051        
052        /**
053         * Returns the source address for this connection
054         * 
055         * @return the souce address for this connection
056         */
057        @MBeanInfo("Source address for this connection")
058        String getRemoteAddress();
059    
060    }