1 | /* |
---|
2 | * Jeti, a Java Jabber client, Copyright (C) 2004 E.S. de Boer |
---|
3 | * |
---|
4 | * This program is free software; you can redistribute it and/or modify |
---|
5 | * it under the terms of the GNU General Public License as published by |
---|
6 | * the Free Software Foundation; either version 2 of the License, or |
---|
7 | * (at your option) any later version. |
---|
8 | * |
---|
9 | * This program is distributed in the hope that it will be useful, |
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | * GNU General Public License for more details. |
---|
13 | * |
---|
14 | * You should have received a copy of the GNU General Public License |
---|
15 | * along with this program; if not, write to the Free Software |
---|
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
17 | * |
---|
18 | * For questions, comments etc, |
---|
19 | * use the website at http://jeti.jabberstudio.org |
---|
20 | * or mail me at eric@jeti.tk or Jabber at jeti@jabber.org |
---|
21 | * |
---|
22 | * Created on 28-okt-2004 |
---|
23 | */ |
---|
24 | |
---|
25 | package nu.fw.jeti.plugins.filetransfer.socks5; |
---|
26 | |
---|
27 | import nu.fw.jeti.jabber.JID; |
---|
28 | import nu.fw.jeti.jabber.elements.Extension; |
---|
29 | |
---|
30 | /** |
---|
31 | * @author E.S. de Boer |
---|
32 | * |
---|
33 | */ |
---|
34 | public class StreamHost extends Extension |
---|
35 | { |
---|
36 | private JID jid; |
---|
37 | private String host; |
---|
38 | private int port; |
---|
39 | private String zeroConf; |
---|
40 | |
---|
41 | public StreamHost(JID jid, String host, int port, String zeroConf) |
---|
42 | { |
---|
43 | this.jid = jid; |
---|
44 | this.host = host; |
---|
45 | this.port = port; |
---|
46 | this.zeroConf = zeroConf; |
---|
47 | } |
---|
48 | |
---|
49 | public String getHost() |
---|
50 | { |
---|
51 | return host; |
---|
52 | } |
---|
53 | public JID getJID() |
---|
54 | { |
---|
55 | return jid; |
---|
56 | } |
---|
57 | public int getPort() |
---|
58 | { |
---|
59 | return port; |
---|
60 | } |
---|
61 | public String getZeroConf() |
---|
62 | { |
---|
63 | return zeroConf; |
---|
64 | } |
---|
65 | public void appendToXML(StringBuffer xml) |
---|
66 | { |
---|
67 | xml.append("<streamhost"); |
---|
68 | appendAttribute(xml,"jid",jid); |
---|
69 | appendAttribute(xml,"host",host); |
---|
70 | appendAttribute(xml,"port",String.valueOf(port)); |
---|
71 | appendAttribute(xml,"zeroconf",zeroConf); |
---|
72 | xml.append("/>"); |
---|
73 | } |
---|
74 | |
---|
75 | } |
---|