public class Bytestream extends IQ
Modifier and Type | Class and Description |
---|---|
static class |
Bytestream.Activate
The packet sent by the stream initiator to the stream proxy to activate
the connection.
|
static class |
Bytestream.Mode
The stream can be either a TCP stream or a UDP stream.
|
static class |
Bytestream.StreamHost
Packet extension that represents a potential Socks5 proxy for the file
transfer.
|
static class |
Bytestream.StreamHostUsed
After selected a Socks5 stream host and successfully connecting, the
target of the file transfer returns a byte stream packet with the stream
host used extension.
|
ID_NOT_AVAILABLE
Constructor and Description |
---|
Bytestream()
The default constructor
|
Bytestream(java.lang.String SID)
A constructor where the session ID can be specified.
|
Modifier and Type | Method and Description |
---|---|
void |
addStreamHost(Bytestream.StreamHost host)
Adds a potential stream host that the remote user can transfer the file
through.
|
Bytestream.StreamHost |
addStreamHost(java.lang.String JID,
java.lang.String address)
Adds a potential stream host that the remote user can connect to to
receive the file.
|
Bytestream.StreamHost |
addStreamHost(java.lang.String JID,
java.lang.String address,
int port)
Adds a potential stream host that the remote user can connect to to
receive the file.
|
int |
countStreamHosts()
Returns the count of stream hosts contained in this packet.
|
java.lang.String |
getChildElementXML()
Returns the sub-element XML section of the IQ packet, or null if there
isn't one.
|
Bytestream.Mode |
getMode()
Returns the transport mode.
|
java.lang.String |
getSessionID()
Returns the session ID related to the Byte Stream negotiation.
|
Bytestream.StreamHost |
getStreamHost(java.lang.String JID)
Returns the stream host related to the given jabber ID, or null if there
is none.
|
java.util.Collection |
getStreamHosts()
Returns the list of stream hosts contained in the packet.
|
Bytestream.Activate |
getToActivate()
Returns the activate element of the packet sent to the proxy host to
verify the identity of the initiator and match them to the appropriate
stream.
|
Bytestream.StreamHostUsed |
getUsedHost()
Returns the Socks5 host connected to by the remote user.
|
void |
setMode(Bytestream.Mode mode)
Set the transport mode.
|
void |
setSessionID(java.lang.String sessionID)
Set the session ID related to the Byte Stream.
|
void |
setToActivate(java.lang.String targetID)
Upon the response from the target of the used host the activate packet is
sent to the Socks5 proxy.
|
void |
setUsedHost(java.lang.String JID)
Upon connecting to the stream host the target of the stream replys to the
initiator with the jabber id of the Socks5 host that they used.
|
addExtension, deleteProperty, getError, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, removeExtension, setError, setFrom, setPacketID, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTo
public Bytestream()
public Bytestream(java.lang.String SID)
SID
- The session ID related to the negotiation.setSessionID(String)
public void setSessionID(java.lang.String sessionID)
sessionID
- public java.lang.String getSessionID()
setSessionID(String)
public void setMode(Bytestream.Mode mode)
mode
- Bytestream.Mode
public Bytestream.Mode getMode()
setMode(Mode)
public Bytestream.StreamHost addStreamHost(java.lang.String JID, java.lang.String address)
JID
- The jabber ID of the stream host.address
- The internet address of the stream host.public Bytestream.StreamHost addStreamHost(java.lang.String JID, java.lang.String address, int port)
JID
- The jabber ID of the stream host.address
- The internet address of the stream host.port
- The port on which the remote host is seeking connections.public void addStreamHost(Bytestream.StreamHost host)
host
- The potential stream host.public java.util.Collection getStreamHosts()
public Bytestream.StreamHost getStreamHost(java.lang.String JID)
JID
- The jabber ID of the desired stream host.public int countStreamHosts()
public void setUsedHost(java.lang.String JID)
JID
- The jabber ID of the used host.public Bytestream.StreamHostUsed getUsedHost()
public Bytestream.Activate getToActivate()
public void setToActivate(java.lang.String targetID)
targetID
- The jabber ID of the target of the file transfer.public java.lang.String getChildElementXML()
IQ
Extensions of this class must override this method.
getChildElementXML
in class IQ
Copyright © 2003 Jive Software.