org.jabber.jabberbeans.serverside
Class LogBuilder

java.lang.Object
  |
  +--org.jabber.jabberbeans.serverside.LogBuilder
All Implemented Interfaces:
java.io.Serializable

public class LogBuilder
extends java.lang.Object
implements java.io.Serializable

A LogBuilder 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.

See Also:
Serialized Form

Field Summary
protected  java.lang.String content
          A Stringholding the loggable message.
protected  JID fromAddress
          JID for the originator of the packet
protected  java.lang.String identifier
          unique identifier for the packet
protected  java.lang.String type
          Subtype of the packet(defined based on the final packet type)
 
Constructor Summary
LogBuilder()
           
 
Method Summary
 Packet build()
          build will create a packet based on the information in the subclassed builder
 java.lang.String getContent()
          get the log content.
 JID getFromAddress()
          get the sender address
 java.lang.String getIdentifier()
          get the message identifier.
 java.lang.String getType()
          get the message type.
 void reset()
          reset is a method implemented by children to reset their data.
 void setContent(java.lang.String value)
          set the log content.
 void setFromAddress(JID from)
          set the sender address
 void setIdentifier(java.lang.String id)
          Set the message identifier.
 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

fromAddress

protected JID fromAddress
JID for the originator of the packet


identifier

protected java.lang.String identifier
unique identifier for the packet


type

protected java.lang.String type
Subtype of the packet(defined based on the final packet type)


content

protected java.lang.String content
A Stringholding the loggable message.

Constructor Detail

LogBuilder

public LogBuilder()
Method Detail

reset

public void reset()
reset is a method implemented by children to reset their data.


getFromAddress

public JID getFromAddress()
get the sender address

Returns:
a value of type 'JID'.

setFromAddress

public void setFromAddress(JID 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.

Returns:
a value of type 'String'

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.

Parameters:
id - string value of the identifier.

getType

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

Returns:
a value of type 'String'
See Also:
Jabber Protocol Site

setType

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

Parameters:
type - a value of type 'String'
See Also:
Jabber Protocol Site

getContent

public java.lang.String getContent()
get the log content.

Returns:
a value of type 'String'
See Also:
Jabber Protocol Site

setContent

public void setContent(java.lang.String value)
set the log content.

Parameters:
value - a value of type 'String'
See Also:
Jabber Protocol Site

build

public Packet build()
build will create a packet based on the information in the subclassed builder

Returns:
a Packet value on success