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 */ 017package org.apache.activemq.broker.jmx; 018 019public interface ProducerViewMBean { 020 021 /** 022 * @return the clientId of the Connection the Producer is on 023 */ 024 @MBeanInfo("JMS Client id of the Connection the Producer is on.") 025 String getClientId(); 026 027 /** 028 * @return the id of the Connection the Producer is on 029 */ 030 @MBeanInfo("ID of the Connection the Producer is on.") 031 String getConnectionId(); 032 033 /** 034 * @return the id of the Session the Producer is on 035 */ 036 @MBeanInfo("ID of the Session the Producer is on.") 037 long getSessionId(); 038 039 /** 040 * @return the id of Producer. 041 */ 042 @MBeanInfo("ID of the Producer.") 043 String getProducerId(); 044 045 /** 046 * @return the destination name 047 */ 048 @MBeanInfo("The name of the destionation the Producer is on.") 049 String getDestinationName(); 050 051 /** 052 * @return true if the destination is a Queue 053 */ 054 @MBeanInfo("Producer is on a Queue") 055 boolean isDestinationQueue(); 056 057 /** 058 * @return true of the destination is a Topic 059 */ 060 @MBeanInfo("Producer is on a Topic") 061 boolean isDestinationTopic(); 062 063 /** 064 * @return true if the destination is temporary 065 */ 066 @MBeanInfo("Producer is on a temporary Queue/Topic") 067 boolean isDestinationTemporary(); 068 069 /** 070 * @returns the windows size configured for the producer 071 */ 072 @MBeanInfo("Configured Window Size for the Producer") 073 int getProducerWindowSize(); 074 075 /** 076 * @deprecated This value is no longer used for producers. 077 * @return if the Producer is configured for Async dispatch 078 */ 079 @Deprecated 080 @MBeanInfo("Is the producer configured for Async Dispatch") 081 boolean isDispatchAsync(); 082 083 /** 084 * Returns the User Name used to authorize creation of this Producer. 085 * This value can be null if display of user name information is disabled. 086 * 087 * @return the name of the user that created this Producer 088 */ 089 @MBeanInfo("User Name used to authorize creation of this Producer") 090 String getUserName(); 091 092 @MBeanInfo("is the producer blocked for Flow Control") 093 boolean isProducerBlocked(); 094 095 @MBeanInfo("total time (ms) Producer Blocked For Flow Control") 096 long getTotalTimeBlocked(); 097 098 @MBeanInfo("percentage of sends Producer Blocked for Flow Control") 099 int getPercentageBlocked(); 100 101 @MBeanInfo("reset flow control state") 102 void resetFlowControlStats(); 103 104 @MBeanInfo("Resets statistics.") 105 void resetStatistics(); 106 107 @MBeanInfo("Messages dispatched by Producer") 108 long getSentCount(); 109 110}