org.jabber.jabberbeans.Extension
Class AgentBuilder

java.lang.Object
  |
  +--org.jabber.jabberbeans.Extension.AgentBuilder

public class AgentBuilder
extends java.lang.Object

AgentBuilder is a class which constructs single Agent/Transport/Gateway entries, either as tags within a jabber:iq:agents namespace, or as its own jabber:iq:agent namespace.


Constructor Summary
AgentBuilder()
          Creates a new AgentBuilder instance.
 
Method Summary
 Agent build()
          build an Agent object.
 java.lang.String getDescription()
          getDescription returns the short description, or null if none.
 JID getJID()
          getJID returns the jid
 java.lang.String getName()
          getName returns the name of the agent, or null if none.
 java.lang.String getService()
          getService returns the service name of the agent, or null if none.
 java.lang.String getTransport()
          getTransport holds the context-specific name of the user in regards to this Agent/Transport/Gateway
 boolean isIQAgent()
          isIQAgent returns true if we are to construct our own agent namespace object, and false if this is just a member of jabber:iq:agents.
 boolean isRegister()
          isRegister returns true if you need to register to use this agent.
 boolean isSearchable()
          isSearchable indicates if this agent supports searching.
 void reset()
          reset restores defaults to all values, so that this builder can be reused.
 void setDescription(java.lang.String val)
          setDescription sets the short agent description.
 void setIQAgent(boolean val)
          setIQAgent sets whether this is an agent namespace, or a member of jabber:iq:agents.
 void setJID(JID val)
          setJID sets the jid, or clears it if null is passed in
 void setName(java.lang.String val)
          setName sets the name of the transport
 void setRegister(boolean val)
          setRegister sets whether or not this agent needs registration
 void setSearchable(boolean val)
          setSearchable sets whether or not this agent supports searching.
 void setService(java.lang.String val)
          setService sets the service name of the agent.
 void setTransport(java.lang.String val)
          setTransport sets the field name of the user with respect to the Agent/Transport/Gateway.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentBuilder

public AgentBuilder()
Creates a new AgentBuilder instance.

Method Detail

reset

public void reset()
reset restores defaults to all values, so that this builder can be reused.


getJID

public JID getJID()
getJID returns the jid

Returns:
a JID value

setJID

public void setJID(JID val)
setJID sets the jid, or clears it if null is passed in

Parameters:
val - a JID value, or null to clear

getName

public java.lang.String getName()
getName returns the name of the agent, or null if none.

Returns:
a String value

setName

public void setName(java.lang.String val)
setName sets the name of the transport

Parameters:
val - a String value, or null to clear.

getDescription

public java.lang.String getDescription()
getDescription returns the short description, or null if none.

Returns:
a String value

setDescription

public void setDescription(java.lang.String val)
setDescription sets the short agent description.

Parameters:
val - a String value, or null to clear.

getService

public java.lang.String getService()
getService returns the service name of the agent, or null if none.

Returns:
a String value

setService

public void setService(java.lang.String val)
setService sets the service name of the agent.

Parameters:
val - a String value, or null to clear.

isRegister

public boolean isRegister()
isRegister returns true if you need to register to use this agent.

Returns:
a boolean value

setRegister

public void setRegister(boolean val)
setRegister sets whether or not this agent needs registration

Parameters:
val - a boolean value

isSearchable

public boolean isSearchable()
isSearchable indicates if this agent supports searching.

Returns:
a boolean value

setSearchable

public void setSearchable(boolean val)
setSearchable sets whether or not this agent supports searching.

Parameters:
val - a boolean value

getTransport

public java.lang.String getTransport()
getTransport holds the context-specific name of the user in regards to this Agent/Transport/Gateway

Returns:
a String value, or null if none.

setTransport

public void setTransport(java.lang.String val)
setTransport sets the field name of the user with respect to the Agent/Transport/Gateway.

Parameters:
val - a String value, or null to clear.

isIQAgent

public boolean isIQAgent()
isIQAgent returns true if we are to construct our own agent namespace object, and false if this is just a member of jabber:iq:agents.

Returns:
a boolean value

setIQAgent

public void setIQAgent(boolean val)
setIQAgent sets whether this is an agent namespace, or a member of jabber:iq:agents.

Parameters:
val - a boolean value

build

public Agent build()
            throws java.lang.InstantiationException
build an Agent object.

Returns:
an Agent value
Throws:
java.lang.InstantiationException - if inadequate data was provided.