|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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 java.lang.String |
errorCode
Error code of a packet of type="error" |
protected java.lang.String |
errorText
Error Textual Description of a packet of type="error" |
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 |
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 |
setErrorCode(java.lang.String errorCode)
set the error type number |
void |
setErrorText(java.lang.String errText)
set the error textual description |
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 |
|
Field Detail |
protected JID toAddress
protected JID fromAddress
protected java.lang.String identifier
protected java.lang.String type
protected java.lang.String errorCode
protected java.lang.String errorText
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)
user
- a value of type 'JID'public JID getFromAddress()
public void setFromAddress(JID from)
user
- a value of type 'JID'.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)
type
- new error typepublic java.lang.String getErrorText()
public void setErrorText(java.lang.String errText)
text
- new error descriptionpublic 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 builderPacket
value on success
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |