KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > planetamessenger > protocols > comvc > JSystemDetails


1 /*
2     =========================================================================
3     Package comvc - Implements the ComVc Protocol.
4
5     This module is developed and maintained by PlanetaMessenger.org.
6     Specs, New and updated versions can be found in
7     http://www.planetamessenger.org
8     If you want contact the Team please send a email to Project Manager
9     Leidson Campos Alves Ferreira at leidson@planetamessenger.org
10
11     Copyright (C) since 2001 by PlanetaMessenger.org
12     
13     This library is free software; you can redistribute it and/or
14     modify it under the terms of the GNU Lesser General Public
15     License as published by the Free Software Foundation; either
16     version 2.1 of the License, or (at your option) any later version.
17
18     This library is distributed in the hope that it will be useful,
19     but WITHOUT ANY WARRANTY; without even the implied warranty of
20     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21     Lesser General Public License for more details.
22
23     You should have received a copy of the GNU Lesser General Public
24     License along with this library; if not, write to the Free Software
25     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
27     =========================================================================
28 */

29 /**
30  *
31  * $Id: JSystemDetails.java,v 1.5 2007/01/28 17:39:21 popolony2k Exp $
32  * $Author: popolony2k $
33  * $Name: $
34  * $Revision: 1.5 $
35  * $State: Exp $
36  *
37  */

38
39 package org.planetamessenger.protocols.comvc;
40
41
42 class JSystemDetails {
43
44   private int nMyTCPPort;
45   private int nMyUDPPort;
46   private int nLoginHostPort;
47   private int nBOSPort;
48   private int nServicesPort;
49   private java.lang.String JavaDoc strLoginHost;
50   private java.lang.String JavaDoc strBOSAddress;
51   private java.lang.String JavaDoc strMyIPAddress;
52   private long nTicket;
53   private byte nCrypt;
54
55   
56   
57   JSystemDetails() {
58   /**
59      Constructor. Initializes all class
60      data.
61   */

62   
63     nMyTCPPort = 0;
64     nMyUDPPort = 0;
65     nBOSPort = 0;
66     nCrypt = 0;
67     strBOSAddress = "";
68     strMyIPAddress = "";
69     nServicesPort = JComVcConstants.COMVC_SERVICES_PORT;
70     nLoginHostPort = JComVcConstants.COMVC_LOGIN_PORT;
71     strLoginHost = JComVcConstants.COMVC_LOGIN_SERVER;
72   }
73
74   void setIPAddress( java.lang.String JavaDoc strMyAddress ) {
75   /**
76      Set the client self IP Address.
77      Parameters:
78       * strMyAddress - The IP Address;
79   */

80     
81     strMyIPAddress = strMyAddress;
82   }
83
84   java.lang.String JavaDoc getIPAddress() {
85   /**
86      Returns the self client IP address.
87   */

88     
89     return strMyIPAddress;
90   }
91
92   void setTCPPort( int nTCPPort ) {
93   /**
94      Sets the TCPPort of this
95      class.
96      Parameters:
97       * nTCPPort - New TCPPort value;
98   */

99     
100     this.nMyTCPPort = nTCPPort;
101   }
102   
103   int getTCPPort() {
104   /**
105      Returns the TCPPort value of this
106      class.
107   */

108     
109     return nMyTCPPort;
110   }
111   
112   void setUDPPort( int nUDPPort ) {
113   /**
114      Sets the UDPPort of this
115      class.
116      Parameters:
117       * nUDPPort - New UDPPort value;
118   */

119     
120     this.nMyUDPPort = nUDPPort;
121   }
122   
123   int getUDPPort() {
124   /**
125      Returns the UDPPort of this
126      class.
127   */

128     
129     return nMyUDPPort;
130   }
131   
132   int getLoginHostPort() {
133   /**
134      Returns the Login Host port.
135   */

136     
137     return nLoginHostPort;
138   }
139   
140   java.lang.String JavaDoc getLoginHost() {
141   /**
142      Returns the Login host name.
143   */

144     
145     return strLoginHost;
146   }
147   
148   void setBOSAddress( java.lang.String JavaDoc strBOSAddress ) {
149   /**
150      Sets the BOS Address of this
151      class.
152      Parameters:
153       * strBOSAddress - The new BOS
154       address;
155   */

156     
157     this.strBOSAddress = strBOSAddress;
158   }
159   
160   java.lang.String JavaDoc getBOSAddress() {
161   /**
162      Returns the BOS Address of
163      this class.
164   */

165     
166     return strBOSAddress;
167   }
168   
169   void setBOSPort( int nBOSPort ) {
170   /**
171      Sets the BOS Address of this
172      class.
173      Parameters:
174       * nBOSPort - The new BOS port;
175   */

176     
177     this.nBOSPort = nBOSPort;
178   }
179   
180   int getBOSPort() {
181   /**
182      Returns the BOS Port of this
183      class.
184   */

185     
186     return nBOSPort;
187   }
188   
189   void setServicesPort( int nServicesPort ) {
190   /**
191      Sets the BOS Address of this
192      class.
193      Parameters:
194       * nServicesPort - The new services port;
195   */

196     
197     this.nServicesPort = nServicesPort;
198   }
199   
200   int getServicesPort() {
201   /**
202      Returns the Services Port of this
203      class.
204   */

205     
206     return nServicesPort;
207   }
208   
209   void setTicket( long nTicket ) {
210   /**
211      Sets the Ticket field of this
212      class.
213      Parameters:
214       * nTicket - The new ticket value
215         of this class;
216   */

217     
218     this.nTicket = nTicket;
219   }
220   
221   long getTicket() {
222   /**
223      Returns the Ticket of this
224      class.
225   */

226     
227     return nTicket;
228   }
229   
230   void setCrypt( byte nCrypt ) {
231   /**
232      Sets the Crypt field of this
233      class.
234      Parameters:
235       * nTicket - The new ticket value
236         of this class;
237   */

238     
239     this.nCrypt = nCrypt;
240   }
241
242   byte getCrypt() {
243   /**
244      Returns the Crypt of this
245      class.
246   */

247     
248     return nCrypt;
249   }
250 }
251
252 // JSystemDetails class
Popular Tags