001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.jmx.adaptor.snmp.config.manager;
023:
024: /**
025: * Simple POJO class to model XML data
026: *
027: * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
028: *
029: * @version $Revision: 57210 $
030: */
031: public class Manager {
032: // Private Data --------------------------------------------------
033:
034: private String address;
035: private int port;
036: private String localAddress;
037: private int localPort;
038: private int version;
039:
040: // Constructors -------------------------------------------------
041:
042: /**
043: * Default CTOR
044: */
045: public Manager() {
046: // empty
047: }
048:
049: // Accessors/Modifiers -------------------------------------------
050:
051: /**
052: * Method getAddress returns the value of field 'address'.
053: *
054: * @return the value of field 'address'.
055: */
056: public String getAddress() {
057: return address;
058: }
059:
060: /**
061: * Method getLocalAddress returns the value of field
062: * 'localAddress'.
063: *
064: * @return the value of field 'localAddress'.
065: */
066: public String getLocalAddress() {
067: return localAddress;
068: }
069:
070: /**
071: * Method getLocalPort returns the value of field 'localPort'.
072: *
073: * @return the value of field 'localPort'.
074: */
075: public int getLocalPort() {
076: return localPort;
077: }
078:
079: /**
080: * Method getPort returns the value of field 'port'.
081: *
082: * @return the value of field 'port'.
083: */
084: public int getPort() {
085: return port;
086: }
087:
088: /**
089: * Method getVersion returns the value of field 'version'.
090: *
091: * @return the value of field 'version'.
092: */
093: public int getVersion() {
094: return version;
095: }
096:
097: /**
098: * Method setAddress sets the value of field 'address'.
099: *
100: * @param address the value of field 'address'.
101: */
102: public void setAddress(String address) {
103: this .address = address;
104: }
105:
106: /**
107: * Method setLocalAddress sets the value of field
108: * 'localAddress'.
109: *
110: * @param localAddress the value of field 'localAddress'.
111: */
112: public void setLocalAddress(String localAddress) {
113: this .localAddress = localAddress;
114: }
115:
116: /**
117: * Method setLocalPort sets the value of field 'localPort'.
118: *
119: * @param localPort the value of field 'localPort'.
120: */
121: public void setLocalPort(int localPort) {
122: this .localPort = localPort;
123: }
124:
125: /**
126: * Method setPort sets the value of field 'port'.
127: *
128: * @param port the value of field 'port'.
129: */
130: public void setPort(int port) {
131: this .port = port;
132: }
133:
134: /**
135: * Method setVersion sets the value of field 'version'.
136: *
137: * @param version the value of field 'version'.
138: */
139: public void setVersion(int version) {
140: this .version = version;
141: }
142:
143: // Object overrides ----------------------------------------------
144:
145: public String toString() {
146: StringBuffer sbuf = new StringBuffer(256);
147:
148: sbuf.append('[').append("address=").append(address).append(
149: ", port=").append(port).append(", localAddress=")
150: .append(localAddress).append(", localPort=").append(
151: localPort).append(", version=").append(version)
152: .append(']');
153:
154: return sbuf.toString();
155: }
156: }
|