KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jmx > adaptor > snmp > config > manager > Manager


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.jmx.adaptor.snmp.config.manager;
23
24 /**
25  * Simple POJO class to model XML data
26  *
27  * @author <a HREF="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
28  *
29  * @version $Revision: 37459 $
30  */

31 public class Manager
32 {
33    // Private Data --------------------------------------------------
34

35    private String JavaDoc address;
36    private int port;
37    private String JavaDoc localAddress;
38    private int localPort;
39    private int version;
40
41    // Constructors -------------------------------------------------
42

43    /**
44     * Default CTOR
45     */

46    public Manager()
47    {
48       // empty
49
}
50    
51    // Accessors/Modifiers -------------------------------------------
52

53    /**
54     * Method getAddress returns the value of field 'address'.
55     *
56     * @return the value of field 'address'.
57     */

58    public String JavaDoc getAddress()
59    {
60       return address;
61    }
62
63    /**
64     * Method getLocalAddress returns the value of field
65     * 'localAddress'.
66     *
67     * @return the value of field 'localAddress'.
68     */

69    public String JavaDoc getLocalAddress()
70    {
71       return localAddress;
72    }
73    
74    /**
75     * Method getLocalPort returns the value of field 'localPort'.
76     *
77     * @return the value of field 'localPort'.
78     */

79    public int getLocalPort()
80    {
81       return localPort;
82    }
83     
84    /**
85     * Method getPort returns the value of field 'port'.
86     *
87     * @return the value of field 'port'.
88     */

89    public int getPort()
90    {
91       return port;
92    }
93
94    /**
95     * Method getVersion returns the value of field 'version'.
96     *
97     * @return the value of field 'version'.
98     */

99    public int getVersion()
100    {
101       return version;
102    }
103
104    /**
105     * Method setAddress sets the value of field 'address'.
106     *
107     * @param address the value of field 'address'.
108     */

109    public void setAddress(String JavaDoc address)
110    {
111       this.address = address;
112    }
113
114    /**
115     * Method setLocalAddress sets the value of field
116     * 'localAddress'.
117     *
118     * @param localAddress the value of field 'localAddress'.
119     */

120    public void setLocalAddress(String JavaDoc localAddress)
121    {
122       this.localAddress = localAddress;
123    }
124
125    /**
126     * Method setLocalPort sets the value of field 'localPort'.
127     *
128     * @param localPort the value of field 'localPort'.
129     */

130    public void setLocalPort(int localPort)
131    {
132       this.localPort = localPort;
133    }
134
135    /**
136     * Method setPort sets the value of field 'port'.
137     *
138     * @param port the value of field 'port'.
139     */

140    public void setPort(int port)
141    {
142       this.port = port;
143    }
144
145    /**
146     * Method setVersion sets the value of field 'version'.
147     *
148     * @param version the value of field 'version'.
149     */

150    public void setVersion(int version)
151    {
152       this.version = version;
153    }
154    
155    // Object overrides ----------------------------------------------
156

157    public String JavaDoc toString()
158    {
159       StringBuffer JavaDoc sbuf = new StringBuffer JavaDoc(256);
160       
161       sbuf.append('[')
162       .append("address=").append(address)
163       .append(", port=").append(port)
164       .append(", localAddress=").append(localAddress)
165       .append(", localPort=").append(localPort)
166       .append(", version=").append(version)
167       .append(']');
168       
169       return sbuf.toString();
170    }
171 }
172
Popular Tags