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 021import org.jpos.q2.QBeanSupportMBean; 022 023/** 024 * MBean interface. 025 * @author Alejandro Revilla 026 * @version $Revision: 2241 $ $Date: 2006-01-23 11:27:32 -0200 (Mon, 23 Jan 2006) $ 027 */ 028@SuppressWarnings("unused") 029public interface ChannelAdaptorMBean extends QBeanSupportMBean { 030 /** 031 * Sets the reconnect delay. 032 * @param delay reconnect delay in milliseconds 033 */ 034 void setReconnectDelay(long delay); 035 /** 036 * Returns the reconnect delay. 037 * @return reconnect delay in milliseconds 038 */ 039 long getReconnectDelay(); 040 /** 041 * Sets the incoming space queue name. 042 * @param in name of the incoming space queue 043 */ 044 void setInQueue(java.lang.String in); 045 /** 046 * Returns the incoming space queue name. 047 * @return name of the incoming space queue 048 */ 049 String getInQueue(); 050 /** 051 * Sets the outgoing space queue name. 052 * @param out name of the outgoing space queue 053 */ 054 void setOutQueue(java.lang.String out); 055 /** 056 * Returns the outgoing space queue name. 057 * @return name of the outgoing space queue 058 */ 059 String getOutQueue(); 060 /** 061 * Sets the remote host name or address. 062 * @param host remote host 063 */ 064 void setHost(java.lang.String host); 065 /** 066 * Returns the remote host name or address. 067 * @return remote host 068 */ 069 String getHost(); 070 /** 071 * Sets the remote port number. 072 * @param port remote port 073 */ 074 void setPort(int port); 075 /** 076 * Returns the remote port number. 077 * @return remote port 078 */ 079 int getPort(); 080 /** 081 * Sets the socket factory class name. 082 * @param sFac socket factory class name 083 */ 084 void setSocketFactory(java.lang.String sFac); 085 /** 086 * Returns the socket factory class name. 087 * @return socket factory class name 088 */ 089 String getSocketFactory(); 090 /** 091 * Returns true if the channel is currently connected. 092 * @return true if connected 093 */ 094 boolean isConnected(); 095 /** Resets all message counters to zero. */ 096 void resetCounters(); 097 /** 098 * Returns all counters as a human-readable string. 099 * @return counters string 100 */ 101 String getCountersAsString(); 102 /** 103 * Returns the transmitted message count. 104 * @return TX count 105 */ 106 int getTXCounter(); 107 /** 108 * Returns the received message count. 109 * @return RX count 110 */ 111 int getRXCounter(); 112 /** 113 * Returns the number of successful connections since last reset. 114 * @return connect count 115 */ 116 int getConnectsCounter(); 117 /** 118 * Returns the timestamp of the last transaction. 119 * @return timestamp in milliseconds 120 */ 121 long getLastTxnTimestampInMillis(); 122 /** 123 * Returns the idle time since the last transaction. 124 * @return idle time in milliseconds 125 */ 126 long getIdleTimeInMillis(); 127}