org.jabber.jabberbeans.serverside
Class XDB

java.lang.Object
  |
  +--org.jabber.jabberbeans.XMLData
        |
        +--org.jabber.jabberbeans.ContentPacket
              |
              +--org.jabber.jabberbeans.serverside.XDB

public class XDB
extends ContentPacket

A XDBPacket object represents a single XDB packet, which is used to set and query information between the server components and any data store.

e.g.:
<xdb type="get|set|result|error" to="user@service/namespage">
  <query xmlns="namespace">
    information custom to the namespace..
  </query>
<xdb>

Note that unlike other basic packet types, XDB does not do any error responses. If there is a problem, the jabber server will retry events until the client component times out. To report errors, use <log> packets.

Version:
$Revision: 1.1.1.1 $
Author:
David Waite <dwaite@jabber.com>, $Author: lucky $
See Also:
ContentPacket, Serialized Form

Field Summary
protected  java.lang.String action
          action to indicate partial record updates
protected  java.lang.String match
          match string to choose partial record updates
protected  java.lang.String namespace
          Namespace for the packet.
 
Fields inherited from class org.jabber.jabberbeans.ContentPacket
errorCode, errorText, extensions, fromAddress, identifier, toAddress, type
 
Constructor Summary
XDB(XDBBuilder builder)
          Creates a new InfoQuery instance.
 
Method Summary
private  void appendExtension(java.lang.StringBuffer retval)
          appendExtension checks if this packet has an extension; if so, appends it to the specified StringBuffer.
 void appendItem(java.lang.StringBuffer retval)
          appendItem appends the XML representation of the current packet data to the specified StringBuffer.
 java.lang.String getAction()
           
 java.lang.String getMatch()
           
 java.lang.String getNamespace()
           
 
Methods inherited from class org.jabber.jabberbeans.ContentPacket
appendAnyError, appendBaseAttribs, Extensions, getErrorCode, getErrorText, getFromAddress, getIdentifier, getToAddress, getType
 
Methods inherited from class org.jabber.jabberbeans.XMLData
appendAttrib, appendAttrib, appendChild, appendChild, escapeString, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

namespace

protected java.lang.String namespace
Namespace for the packet. e.g. ns="jabber:iq:auth"

action

protected java.lang.String action
action to indicate partial record updates

match

protected java.lang.String match
match string to choose partial record updates
Constructor Detail

XDB

public XDB(XDBBuilder builder)
    throws java.lang.InstantiationException
Creates a new InfoQuery instance. Note that because of the complexity of the InfoQuery object and because the object is immutable after creation, a builder object is needed in order to construct this object.
Parameters:
builder - an InfoQueryBuilder holding appropriate values
Throws:
java.lang.InstantiationException - if the values supplied by the InfoQueryBuilder are not sufficient to create a 'correctly-formed' InfoQuery packet.
Method Detail

getNamespace

public java.lang.String getNamespace()

getAction

public java.lang.String getAction()

getMatch

public java.lang.String getMatch()

appendItem

public void appendItem(java.lang.StringBuffer retval)
appendItem appends the XML representation of the current packet data to the specified StringBuffer.
Overrides:
appendItem in class XMLData
Parameters:
retval - The StringBuffer to append to

appendExtension

private void appendExtension(java.lang.StringBuffer retval)
appendExtension checks if this packet has an extension; if so, appends it to the specified StringBuffer. The data is appended in XML format.
Parameters:
retval - The StringBuffer to append to