org.jabber.jabberbeans.Extension
Class Agent
java.lang.Object
|
+--org.jabber.jabberbeans.XMLData
|
+--org.jabber.jabberbeans.Extension.Agent
- All Implemented Interfaces:
- Extension, QueryExtension, java.io.Serializable
- 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.
- See Also:
- Serialized Form
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
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
- Specified by:
appendItem
in interface Extension
- Specified by:
appendItem
in class XMLData
- Parameters:
retval
- The StringBuffer
to append to
- Returns:
- a
StringBuffer