org.jivesoftware.smackx.bytestreams.socks5
Class Socks5PacketUtils

java.lang.Object
  extended by org.jivesoftware.smackx.bytestreams.socks5.Socks5PacketUtils

public class Socks5PacketUtils
extends java.lang.Object

A collection of utility methods to create XMPP packets.

Author:
Henning Staib

Constructor Summary
Socks5PacketUtils()
           
 
Method Summary
static IQ createActivationConfirmation(java.lang.String from, java.lang.String to)
          Returns a response IQ for a activation request to the proxy.
static Bytestream createBytestreamInitiation(java.lang.String from, java.lang.String to, java.lang.String sessionID)
          Returns a SOCKS5 Bytestream initialization request packet.
static Bytestream createBytestreamResponse(java.lang.String from, java.lang.String to)
          Returns a response to a SOCKS5 Bytestream initialization request.
static DiscoverInfo createDiscoverInfo(java.lang.String from, java.lang.String to)
          Returns a response to an info discovery request.
static DiscoverItems createDiscoverItems(java.lang.String from, java.lang.String to)
          Returns a response to an item discovery request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Socks5PacketUtils

public Socks5PacketUtils()
Method Detail

createBytestreamInitiation

public static Bytestream createBytestreamInitiation(java.lang.String from,
                                                    java.lang.String to,
                                                    java.lang.String sessionID)
Returns a SOCKS5 Bytestream initialization request packet. The Request doesn't contain any SOCKS5 proxies.

Parameters:
from - the initiator
to - the target
sessionID - the session ID
Returns:
SOCKS5 Bytestream initialization request packet

createBytestreamResponse

public static Bytestream createBytestreamResponse(java.lang.String from,
                                                  java.lang.String to)
Returns a response to a SOCKS5 Bytestream initialization request. The packet doesn't contain the uses-host information.

Parameters:
from - the target
to - the initiator
Returns:
response to a SOCKS5 Bytestream initialization request

createDiscoverItems

public static DiscoverItems createDiscoverItems(java.lang.String from,
                                                java.lang.String to)
Returns a response to an item discovery request. The packet doesn't contain any items.

Parameters:
from - the XMPP server
to - the XMPP client
Returns:
response to an item discovery request

createDiscoverInfo

public static DiscoverInfo createDiscoverInfo(java.lang.String from,
                                              java.lang.String to)
Returns a response to an info discovery request. The packet doesn't contain any infos.

Parameters:
from - the target
to - the initiator
Returns:
response to an info discovery request

createActivationConfirmation

public static IQ createActivationConfirmation(java.lang.String from,
                                              java.lang.String to)
Returns a response IQ for a activation request to the proxy.

Parameters:
from - JID of the proxy
to - JID of the client who wants to activate the SOCKS5 Bytestream
Returns:
response IQ for a activation request to the proxy