001: package org.jgroups.jmx.protocols;
002:
003: import org.jgroups.stack.Protocol;
004: import org.jgroups.Address;
005:
006: import java.net.UnknownHostException;
007: import java.util.List;
008:
009: /**
010: * @author Bela Ban
011: * @version $Id: TP.java,v 1.5 2005/11/09 17:42:25 belaban Exp $
012: */
013: public class TP extends org.jgroups.jmx.Protocol implements TPMBean {
014: org.jgroups.protocols.TP tp;
015:
016: public TP() {
017: }
018:
019: public TP(Protocol p) {
020: super (p);
021: tp = (org.jgroups.protocols.TP) p;
022: }
023:
024: public void attachProtocol(Protocol p) {
025: super .attachProtocol(p);
026: tp = (org.jgroups.protocols.TP) p;
027: }
028:
029: public long getMessagesSent() {
030: return tp.getNumMessagesSent();
031: }
032:
033: public long getMessagesReceived() {
034: return tp.getNumMessagesReceived();
035: }
036:
037: public long getBytesSent() {
038: return tp.getNumBytesSent();
039: }
040:
041: public long getBytesReceived() {
042: return tp.getNumBytesReceived();
043: }
044:
045: public Address getLocalAddress() {
046: return tp.getLocalAddress();
047: }
048:
049: public String getBindAddress() {
050: return tp.getBindAddress();
051: }
052:
053: public String getChannelName() {
054: return tp.getChannelName();
055: }
056:
057: public void setBindAddress(String bind_address)
058: throws UnknownHostException {
059: tp.setBindAddress(bind_address);
060: }
061:
062: public boolean isReceiveOnAllInterfaces() {
063: return tp.isReceiveOnAllInterfaces();
064: }
065:
066: public List getReceiveInterfaces() {
067: return tp.getReceiveInterfaces();
068: }
069:
070: public boolean isSendOnAllInterfaces() {
071: return tp.isSendOnAllInterfaces();
072: }
073:
074: public List getSendInterfaces() {
075: return tp.getSendInterfaces();
076: }
077:
078: public boolean isDiscardIncompatiblePackets() {
079: return tp.isDiscardIncompatiblePackets();
080: }
081:
082: public void setDiscardIncompatiblePackets(boolean flag) {
083: tp.setDiscardIncompatiblePackets(flag);
084: }
085:
086: public boolean isEnableBundling() {
087: return tp.isEnableBundling();
088: }
089:
090: public void setEnableBundling(boolean flag) {
091: tp.setEnableBundling(flag);
092: }
093:
094: public int getMaxBundleSize() {
095: return tp.getMaxBundleSize();
096: }
097:
098: public void setMaxBundleSize(int size) {
099: tp.setMaxBundleSize(size);
100: }
101:
102: public long getMaxBundleTimeout() {
103: return tp.getMaxBundleTimeout();
104: }
105:
106: public void setMaxBundleTimeout(long timeout) {
107: tp.setMaxBundleTimeout(timeout);
108: }
109:
110: public int getOutgoingQueueSize() {
111: return tp.getOutgoingQueueSize();
112: }
113:
114: public int getOutgoingQueueMaxSize() {
115: return tp.getOutgoingQueueMaxSize();
116: }
117:
118: public void setOutgoingQueueMaxSize(int new_size) {
119: tp.setOutgoingQueueMaxSize(new_size);
120: }
121:
122: public int getIncomingQueueSize() {
123: return tp.getIncomingQueueSize();
124: }
125:
126: public boolean isLoopback() {
127: return tp.isLoopback();
128: }
129:
130: public void setLoopback(boolean b) {
131: tp.setLoopback(b);
132: }
133:
134: public boolean isUseIncomingPacketHandler() {
135: return tp.isUseIncomingPacketHandler();
136: }
137:
138: public boolean isUseOutgoungPacketHandler() {
139: return tp.isUseOutgoingPacketHandler();
140: }
141:
142: }
|