001/*
002 * jPOS Project [http://jpos.org]
003 * Copyright (C) 2000-2026 jPOS Software SRL
004 *
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
017 */
018
019package org.jpos.q2.iso;
020
021/**
022 * MBean interface.
023 * @author Alejandro Revilla
024 * @version $Revision: 2223 $ $Date: 2005-11-29 21:04:41 -0200 (Tue, 29 Nov 2005) $
025 */
026public interface QMUXMBean extends org.jpos.q2.QBeanSupportMBean {
027    /**
028     * Sets the inbound (response) queue name.
029     *
030     * @param in queue name
031     */
032    void setInQueue(java.lang.String in) ;
033    /**
034     * Returns the inbound (response) queue name.
035     *
036     * @return queue name
037     */
038    String getInQueue() ;
039    /**
040     * Sets the outbound (request) queue name.
041     *
042     * @param out queue name
043     */
044    void setOutQueue(java.lang.String out) ;
045    /**
046     * Returns the outbound (request) queue name.
047     *
048     * @return queue name
049     */
050    String getOutQueue() ;
051    /**
052     * Sets the queue name where unmatched inbound messages are forwarded.
053     *
054     * @param unhandled queue name
055     */
056    void setUnhandledQueue(java.lang.String unhandled) ;
057    /**
058     * Returns the queue name where unmatched inbound messages are forwarded.
059     *
060     * @return queue name, or {@code null} if not configured
061     */
062    String getUnhandledQueue() ;
063    /** Resets all transaction counters and the last-transaction timestamp. */
064    void resetCounters();
065    /**
066     * Returns the current counters formatted as a single human-readable string.
067     *
068     * @return counter snapshot suitable for diagnostics
069     */
070    String getCountersAsString();
071    /**
072     * Returns the number of messages transmitted since the last reset.
073     *
074     * @return TX message count
075     */
076    int getTXCounter();
077    /**
078     * Returns the number of messages received since the last reset.
079     *
080     * @return RX message count
081     */
082    int getRXCounter();
083    /**
084     * Returns the number of TX requests that expired without a matching response.
085     *
086     * @return expired TX count
087     */
088    int getTXExpired();
089    /**
090     * Returns the number of TX requests still awaiting a response.
091     *
092     * @return pending TX count
093     */
094    int getTXPending();
095    /**
096     * Returns the number of received responses that arrived too late and were discarded.
097     *
098     * @return expired RX count
099     */
100    int getRXExpired();
101    /**
102     * Returns the number of in-flight responses awaiting matching.
103     *
104     * @return pending RX count
105     */
106    int getRXPending();
107    /**
108     * Returns the number of received messages that did not match any pending request.
109     *
110     * @return unhandled RX count
111     */
112    int getRXUnhandled();
113    /**
114     * Returns the number of unmatched messages successfully forwarded to listeners.
115     *
116     * @return forwarded RX count
117     */
118    int getRXForwarded();
119    /**
120     * Returns the wall-clock timestamp of the last successful transaction.
121     *
122     * @return milliseconds since the epoch, or {@code 0} if no transaction has completed
123     */
124    long getLastTxnTimestampInMillis();
125    /**
126     * Returns the time elapsed since the last successful transaction.
127     *
128     * @return idle time in milliseconds, or {@code -1} if no transaction has completed
129     */
130    long getIdleTimeInMillis();
131}