Smack

org.jivesoftware.smackx.bytestreams.socks5.packet
Class Bytestream.StreamHost

java.lang.Object
  extended by org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.StreamHost
All Implemented Interfaces:
PacketExtension
Enclosing class:
Bytestream

public static class Bytestream.StreamHost
extends java.lang.Object
implements PacketExtension

Packet extension that represents a potential SOCKS5 proxy for the file transfer. Stream hosts are forwarded to the target of the file transfer who then chooses and connects to one.

Author:
Alexander Wenckus

Field Summary
static java.lang.String ELEMENTNAME
           
static java.lang.String NAMESPACE
           
 
Constructor Summary
Bytestream.StreamHost(java.lang.String JID, java.lang.String address)
          Default constructor.
 
Method Summary
 java.lang.String getAddress()
          Returns the internet address of the stream host.
 java.lang.String getElementName()
          Returns the root element name.
 java.lang.String getJID()
          Returns the JID of the stream host.
 java.lang.String getNamespace()
          Returns the root element XML namespace.
 int getPort()
          Returns the port on which the potential stream host would accept the connection.
 void setPort(int port)
          Sets the port of the stream host.
 java.lang.String toXML()
          Returns the XML representation of the PacketExtension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static java.lang.String NAMESPACE

ELEMENTNAME

public static java.lang.String ELEMENTNAME
Constructor Detail

Bytestream.StreamHost

public Bytestream.StreamHost(java.lang.String JID,
                             java.lang.String address)
Default constructor.

Parameters:
JID - The JID of the stream host.
address - The internet address of the stream host.
Method Detail

getJID

public java.lang.String getJID()
Returns the JID of the stream host.

Returns:
Returns the JID of the stream host.

getAddress

public java.lang.String getAddress()
Returns the internet address of the stream host.

Returns:
Returns the internet address of the stream host.

setPort

public void setPort(int port)
Sets the port of the stream host.

Parameters:
port - The port on which the potential stream host would accept the connection.

getPort

public int getPort()
Returns the port on which the potential stream host would accept the connection.

Returns:
Returns the port on which the potential stream host would accept the connection.

getNamespace

public java.lang.String getNamespace()
Description copied from interface: PacketExtension
Returns the root element XML namespace.

Specified by:
getNamespace in interface PacketExtension
Returns:
the namespace.

getElementName

public java.lang.String getElementName()
Description copied from interface: PacketExtension
Returns the root element name.

Specified by:
getElementName in interface PacketExtension
Returns:
the element name.

toXML

public java.lang.String toXML()
Description copied from interface: PacketExtension
Returns the XML representation of the PacketExtension.

Specified by:
toXML in interface PacketExtension
Returns:
the packet extension as XML.

Smack

Copyright © 2003-2007 Jive Software.