View Javadoc

1   /*
2    *  XNap - A P2P framework and client.
3    *
4    *  See the file AUTHORS for copyright information.
5    *
6    *  This program is free software; you can redistribute it and/or modify
7    *  it under the terms of the GNU General Public License as published by
8    *  the Free Software Foundation.
9    *
10   *  This program is distributed in the hope that it will be useful,
11   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   *  GNU General Public License for more details.
14   *
15   *  You should have received a copy of the GNU General Public License
16   *  along with this program; if not, write to the Free Software
17   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18   */
19  
20  package org.xnap.plugin.gift.net.event;
21  
22  /***
23   * OnlineEvent
24   *
25   * @author <a href="mailto:tvanlessen@taval.de">Tammo van Lessen</a>
26   * @version CVS $Id: OnlineEvent.java,v 1.1 2003/10/05 00:20:32 squig Exp $
27   */
28  public class OnlineEvent extends Event {
29      //~ Instance fields --------------------------------------------------------
30  
31      private String server;
32      private String version;
33  
34      //~ Constructors -----------------------------------------------------------
35  
36      /***
37       * Constructor for OnlineEvent.
38       *
39       * @param server
40       * @param version
41       */
42      public OnlineEvent(String server, String version) {
43          super();
44          this.server = server;
45          this.version = version;
46      }
47  
48      //~ Methods ----------------------------------------------------------------
49  
50      /***
51       * Returns the server.
52       *
53       * @return String
54       */
55      public String getServer() {
56          return server;
57      }
58  
59      /***
60       * Returns the version.
61       *
62       * @return String
63       */
64      public String getVersion() {
65          return version;
66      }
67  
68      /***
69       * @see java.lang.Object#toString()
70       */
71      public String toString() {
72          return server + "-" + version + "@OnlineEvent";
73      }
74  }