org.jabber.jabberbeans.Extension
Class XDelayBuilder

java.lang.Object
  |
  +--org.jabber.jabberbeans.Extension.XDelayBuilder

public class XDelayBuilder
extends java.lang.Object
implements ExtensionBuilder

A XDelay extension handles jabber:x:delay packets. These are used to represent any type of delay in the path of a message or presence packet - for instance, from messages sent offline, or messages sent through transports from a third-party system.

Version:
$Revision: 1.1.1.1 $
Author:
David Waite <dwaite@jabber.com>, $Author: lucky $

Field Summary
private  java.lang.String content
          content holds a string describing why the packet was delayed
private  JID fromAddress
          fromAddress is the party causing the delay
private  java.lang.String stamp
          stamp is the time stamp from when the message was delayed
 
Constructor Summary
XDelayBuilder()
          construct a new XDelayBuilder object
 
Method Summary
 Extension build()
          build a new XDelay Extension based on the current builder state
 java.lang.String getContent()
          get the content describing why the message was delayed
 JID getFromAddress()
          get the address of the delaying party
 java.lang.String getStamp()
          get the timestamp of when the packet was delayed
 void reset()
          reset the builder to a default state, for reuse
 void setContent(java.lang.String txt)
          set the content describing why the message was delayed
 void setFromAddress(JID from)
          set the address of the delaying party
 void setStamp(java.lang.String stamp)
          set the timestamp of when the packet was delayed
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

fromAddress

private JID fromAddress
fromAddress is the party causing the delay

stamp

private java.lang.String stamp
stamp is the time stamp from when the message was delayed

content

private java.lang.String content
content holds a string describing why the packet was delayed
Constructor Detail

XDelayBuilder

public XDelayBuilder()
construct a new XDelayBuilder object
Method Detail

reset

public void reset()
reset the builder to a default state, for reuse
Specified by:
reset in interface ExtensionBuilder

getFromAddress

public JID getFromAddress()
get the address of the delaying party
Returns:
JID of the party which delayed the message.

setFromAddress

public void setFromAddress(JID from)
set the address of the delaying party
Parameters:
from - JID of the party which delayed the message.

getStamp

public java.lang.String getStamp()
get the timestamp of when the packet was delayed
Returns:
String holding the ISO date stamp

setStamp

public void setStamp(java.lang.String stamp)
set the timestamp of when the packet was delayed
Parameters:
stamp - String holding the ISO date stamp

getContent

public java.lang.String getContent()
get the content describing why the message was delayed
Returns:
String holding text content

setContent

public void setContent(java.lang.String txt)
set the content describing why the message was delayed
Parameters:
txt - String holding text content

build

public Extension build()
                throws java.lang.InstantiationException
build a new XDelay Extension based on the current builder state
Specified by:
build in interface ExtensionBuilder
Returns:
XDelay Extension
Throws:
java.lang.InstantiationException - if there is not sufficient information to construct a full XDelay object.