|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jabber.jabberbeans.PacketBuilder
A PacketBuilder
is the base class for the builder of all
the different Builder classes for Packet objects. Packet-derived objects
require builders since they are immutable.
Field Summary | |
protected PacketError |
error
XMPP error tag |
protected java.util.Vector |
extensions
extensions associated with this packet. |
protected JID |
fromAddress
JID for the originator of the packet |
protected java.lang.String |
identifier
unique identifier for the packet |
protected JID |
toAddress
JID for recipient of the packet |
protected java.lang.String |
type
Subtype of the packet(defined based on the final packet type) |
Constructor Summary | |
PacketBuilder()
|
Method Summary | |
void |
addExtension(Extension e)
Add an extension to this object |
abstract Packet |
build()
build will create a packet based on the information in
the subclassed builder |
void |
delExtension(Extension e)
Remove an extension from this object |
PacketError |
getError()
get the error tag |
java.lang.String |
getErrorCode()
get the error code number |
java.lang.String |
getErrorText()
get the error textual description |
java.util.Vector |
getExtensionVector()
Returns a copy of the Vector of Extension objects |
JID |
getFromAddress()
get the sender address |
java.lang.String |
getIdentifier()
get the message identifier. |
JID |
getToAddress()
get the current recipient |
java.lang.String |
getType()
get the message type. |
abstract void |
reset()
reset is a method implemented by children to reset their
data. |
protected void |
resetBase()
resetBase resets all information in this base class. |
void |
setError(PacketError error)
set the error tag |
void |
setErrorCode(java.lang.String errorCode)
Deprecated. - use setError() instead |
void |
setErrorText(java.lang.String errText)
Deprecated. - use setError() instead |
void |
setFromAddress(JID from)
set the sender address |
void |
setIdentifier(java.lang.String id)
Set the message identifier. |
void |
setToAddress(JID to)
set the current recipient |
void |
setType(java.lang.String type)
set the message type |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JID toAddress
protected JID fromAddress
protected java.lang.String identifier
protected java.lang.String type
protected PacketError error
protected java.util.Vector extensions
Constructor Detail |
public PacketBuilder()
Method Detail |
public abstract void reset()
reset
is a method implemented by children to reset their
data.
protected final void resetBase()
resetBase
resets all information in this base class.
public JID getToAddress()
public void setToAddress(JID to)
public JID getFromAddress()
public void setFromAddress(JID from)
public java.lang.String getIdentifier()
public void setIdentifier(java.lang.String id)
id
- string value of the identifier.public java.lang.String getType()
public void setType(java.lang.String type)
type
- a value of type 'String'public java.lang.String getErrorCode()
public void setErrorCode(java.lang.String errorCode)
public java.lang.String getErrorText()
public void setErrorText(java.lang.String errText)
public PacketError getError()
public void setError(PacketError error)
public void addExtension(Extension e)
e
- an Extension
valuepublic void delExtension(Extension e)
e
- an Extension
valuepublic java.util.Vector getExtensionVector()
Vector
value, or null if no extensionspublic abstract Packet build() throws java.lang.InstantiationException
build
will create a packet based on the information in
the subclassed builder
Packet
value on success
java.lang.InstantiationException
- if insufficient information was
provided to construct a packet.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |