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.
- Version:
- $Revision: 1.1.1.1 $
- Author:
- David Waite
<dwaite@jabber.com>, $Author: lucky $
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 |
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,
registerNatives,
toString,
wait,
wait,
wait |
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.
AgentBuilder
public AgentBuilder()
- Creates a new
AgentBuilder
instance.
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.