Smack

org.jivesoftware.smackx.bytestreams.ibb.packet
Class Open

java.lang.Object
  extended by org.jivesoftware.smack.packet.Packet
      extended by org.jivesoftware.smack.packet.IQ
          extended by org.jivesoftware.smackx.bytestreams.ibb.packet.Open

public class Open
extends IQ

Represents a request to open an In-Band Bytestream.

Author:
Henning Staib

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jivesoftware.smack.packet.IQ
IQ.Type
 
Field Summary
 
Fields inherited from class org.jivesoftware.smack.packet.Packet
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE
 
Constructor Summary
Open(java.lang.String sessionID, int blockSize)
          Creates a new In-Band Bytestream open request packet.
Open(java.lang.String sessionID, int blockSize, InBandBytestreamManager.StanzaType stanza)
          Creates a new In-Band Bytestream open request packet.
 
Method Summary
 int getBlockSize()
          Returns the block size in which the data will be fragmented.
 java.lang.String getChildElementXML()
          Returns the sub-element XML section of the IQ packet, or null if there isn't one.
 java.lang.String getSessionID()
          Returns the unique session ID identifying this In-Band Bytestream.
 InBandBytestreamManager.StanzaType getStanza()
          Returns the stanza type used to encapsulate the data.
 
Methods inherited from class org.jivesoftware.smack.packet.IQ
createErrorResponse, createResultIQ, getType, setType, toXML
 
Methods inherited from class org.jivesoftware.smack.packet.Packet
addExtension, addExtensions, deleteProperty, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getProperty, getPropertyNames, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setProperty, setTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Open

public Open(java.lang.String sessionID,
            int blockSize,
            InBandBytestreamManager.StanzaType stanza)
Creates a new In-Band Bytestream open request packet.

The data sent over this In-Band Bytestream will be fragmented in blocks with the given block size. The block size should not be greater than 65535. A recommended default value is 4096.

The data can be sent using IQ stanzas or message stanzas.

Parameters:
sessionID - unique session ID identifying this In-Band Bytestream
blockSize - block size in which the data will be fragmented
stanza - stanza type used to encapsulate the data

Open

public Open(java.lang.String sessionID,
            int blockSize)
Creates a new In-Band Bytestream open request packet.

The data sent over this In-Band Bytestream will be fragmented in blocks with the given block size. The block size should not be greater than 65535. A recommended default value is 4096.

The data will be sent using IQ stanzas.

Parameters:
sessionID - unique session ID identifying this In-Band Bytestream
blockSize - block size in which the data will be fragmented
Method Detail

getSessionID

public java.lang.String getSessionID()
Returns the unique session ID identifying this In-Band Bytestream.

Returns:
the unique session ID identifying this In-Band Bytestream

getBlockSize

public int getBlockSize()
Returns the block size in which the data will be fragmented.

Returns:
the block size in which the data will be fragmented

getStanza

public InBandBytestreamManager.StanzaType getStanza()
Returns the stanza type used to encapsulate the data.

Returns:
the stanza type used to encapsulate the data

getChildElementXML

public java.lang.String getChildElementXML()
Description copied from class: IQ
Returns the sub-element XML section of the IQ packet, or null if there isn't one. Packet extensions must be included, if any are defined.

Extensions of this class must override this method.

Specified by:
getChildElementXML in class IQ
Returns:
the child element section of the IQ XML.

Smack

Copyright © 2003-2007 Jive Software.