org.jabber.jabberbeans.Extension
Class Agent

java.lang.Object
  |
  +--org.jabber.jabberbeans.XMLData
        |
        +--org.jabber.jabberbeans.Extension.Agent

public class Agent
extends XMLData
implements QueryExtension

Agent is a class representing a single Agent/Transport/Gateway. It works both as the tag inside of a jabber:iq:agents namespace, and alone as a jabber:iq:agent namespace.

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

Field Summary
private  java.lang.String description
          short textual description of the transport.
private  boolean IQAgent
          IQAgent differentiates whether this is a sub-tag of the agents namespace, or our own agent namespace.
private  JID jid
          jid holds the address of the agent, if this is a child of the agents namespace.
private  java.lang.String name
          name of the transport.
private  boolean register
          register is true if you must register to play.
private  boolean search
          search is true if the agent is searchable.
private  java.lang.String service
          service name.
private  java.lang.String transport
          transport holds the formal 'username' of the transport.
 
Constructor Summary
Agent(AgentBuilder builder)
          Creates a new Agent instance, based on AgentBuilder
 
Method Summary
 void appendItem(java.lang.StringBuffer retval)
          appendItem converts this packet to XML, either an block in a jabber:iq:agents extension, or its own jabber:iq:agent extension.
 java.lang.String getDescription()
          getDescription returns the agent short description.
 JID getJID()
          getJID returns the address which this agent is at.
 java.lang.String getName()
          getName returns the agent name.
 java.lang.String getService()
          getService returns the service name.
 java.lang.String getTransport()
          getTransport returns the transport user-name.
 boolean isIQAgent()
          isIQAgent returns true if we are a jabber:iq:agent extension
 boolean isRegister()
          isRegister returns true if you must register to use this transport
 boolean isSearchable()
          isSearchable returns true if the agent allows searches for users.
 
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

jid

private JID jid
jid holds the address of the agent, if this is a child of the agents namespace. If it is an agent namespace, then the jid is already accessable, it is the address you sent the request to, or the address the packet came back from.

name

private java.lang.String name
name of the transport.

description

private java.lang.String description
short textual description of the transport.

service

private java.lang.String service
service name.

transport

private java.lang.String transport
transport holds the formal 'username' of the transport.

register

private boolean register
register is true if you must register to play.

search

private boolean search
search is true if the agent is searchable.

IQAgent

private boolean IQAgent
IQAgent differentiates whether this is a sub-tag of the agents namespace, or our own agent namespace. True means we are our own namespace, jabber:iq:agent.
Constructor Detail

Agent

public Agent(AgentBuilder builder)
      throws java.lang.InstantiationException
Creates a new Agent instance, based on AgentBuilder
Parameters:
builder - an AgentBuilder value
Throws:
java.lang.InstantiationException - if invalid
Method Detail

getName

public java.lang.String getName()
getName returns the agent name.
Returns:
a String value

getJID

public JID getJID()
getJID returns the address which this agent is at. Note that this is not valid for a jabber:iq:agent, only if this is an element of an jabber:iq:agents list.

getDescription

public java.lang.String getDescription()
getDescription returns the agent short description.
Returns:
a String value

getService

public java.lang.String getService()
getService returns the service name.
Returns:
a String value

getTransport

public java.lang.String getTransport()
getTransport returns the transport user-name.
Returns:
a String value

isRegister

public boolean isRegister()
isRegister returns true if you must register to use this transport
Returns:
a boolean value

isSearchable

public boolean isSearchable()
isSearchable returns true if the agent allows searches for users.
Returns:
a boolean value

isIQAgent

public boolean isIQAgent()
isIQAgent returns true if we are a jabber:iq:agent extension
Returns:
a boolean value

appendItem

public void appendItem(java.lang.StringBuffer retval)
appendItem converts this packet to XML, either an block in a jabber:iq:agents extension, or its own jabber:iq:agent extension. It then appends it to a StringBuffer
Overrides:
appendItem in class XMLData
Returns:
a StringBuffer