Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jabber.jabberbeans
Class PacketBuilder  view PacketBuilder download PacketBuilder.java

java.lang.Object
  extended byorg.jabber.jabberbeans.PacketBuilder
Direct Known Subclasses:
InfoQueryBuilder, MessageBuilder, PresenceBuilder

abstract class PacketBuilder
extends java.lang.Object

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.

Since:
1.0
Version:
1.0

Field Summary
(package private)  java.lang.String errorText
           
(package private)  java.lang.String errorType
           
(package private)  User fromAddress
           
(package private)  java.lang.String identifier
           
(package private)  User toAddress
           
(package private)  java.lang.String type
           
 
Constructor Summary
PacketBuilder()
           
 
Method Summary
abstract  Packet build()
           
 java.lang.String getErrorText()
          get the error textual description
 java.lang.String getErrorType()
          get the error type number
 User getFromAddress()
          get the sender address
 java.lang.String getIdentifier()
          get the message identifier.
 User getToAddress()
          get the current recipient
 java.lang.String getType()
          get the message type.
abstract  void reset()
           
protected  void resetBase()
           
 void setErrorText(java.lang.String errText)
          set the error textual description
 void setErrorType(java.lang.String errorType)
          set the error type number
 void setFromAddress(User from)
          set the sender address
 void setIdentifier(java.lang.String id)
          Set the message identifier.
 void setToAddress(User 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

toAddress

User toAddress

fromAddress

User fromAddress

identifier

java.lang.String identifier

type

java.lang.String type

errorType

java.lang.String errorType

errorText

java.lang.String errorText
Constructor Detail

PacketBuilder

public PacketBuilder()
Method Detail

reset

public abstract void reset()

resetBase

protected final void resetBase()

getToAddress

public User getToAddress()
get the current recipient


setToAddress

public void setToAddress(User to)
set the current recipient


getFromAddress

public User getFromAddress()
get the sender address


setFromAddress

public void setFromAddress(User from)
set the sender address


getIdentifier

public java.lang.String getIdentifier()
get the message identifier. Note that a message identifier is created on the message if one isn't passed in here - read the built message if you would like to retrieve this (final) identifier.


setIdentifier

public void setIdentifier(java.lang.String id)
Set the message identifier. Note that if you do not set this, the message will generate one on creation.


getType

public java.lang.String getType()
get the message type. Will return null for default (being type=normal)


setType

public void setType(java.lang.String type)
set the message type


getErrorType

public java.lang.String getErrorType()
get the error type number


setErrorType

public void setErrorType(java.lang.String errorType)
set the error type number


getErrorText

public java.lang.String getErrorText()
get the error textual description


setErrorText

public void setErrorText(java.lang.String errText)
set the error textual description


build

public abstract Packet build()
                      throws java.lang.InstantiationException