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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.jabber.jabberbeans.PacketBuilder
      extended byorg.jabber.jabberbeans.PresenceBuilder

public class PresenceBuilder
extends PacketBuilder

This class is an abstraction of presence packets - both incoming and outgoing. Incoming presence packets are notifications on a resource - they are sent by the remote client's server when that client has a status change. Outgoing presence packets are of two types. You send out your presence by sending a packet to the server with your new status. The second type is a subscribe request, where you request a remote user add you to their presence notifications.


Field Summary
(package private)  java.lang.String errorText
           
(package private)  java.lang.String errorType
           
private  java.util.Vector extensions
           
(package private)  User fromAddress
           
(package private)  java.lang.String identifier
           
private  int priority
           
private  java.lang.String stateShow
           
private  java.lang.String status
           
(package private)  User toAddress
           
(package private)  java.lang.String type
           
 
Constructor Summary
PresenceBuilder()
           
 
Method Summary
 void addExtension(PresenceExtension e)
           
 Packet build()
           
 java.util.Enumeration enumerateExtensions()
           
 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.
 int getPriority()
           
 java.lang.String getStateShow()
           
 java.lang.String getStatus()
           
 User getToAddress()
          get the current recipient
 java.lang.String getType()
          get the message type.
 void removeExtension(PresenceExtension e)
           
 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 setPriority(int priority)
           
 void setStateShow(java.lang.String state)
           
 void setStatus(java.lang.String status)
           
 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

status

private java.lang.String status

priority

private int priority

stateShow

private java.lang.String stateShow

extensions

private java.util.Vector extensions

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

PresenceBuilder

public PresenceBuilder()
Method Detail

reset

public void reset()
Specified by:
reset in class PacketBuilder

getStatus

public java.lang.String getStatus()

setStatus

public void setStatus(java.lang.String status)

getPriority

public int getPriority()

setPriority

public void setPriority(int priority)

getStateShow

public java.lang.String getStateShow()

setStateShow

public void setStateShow(java.lang.String state)

addExtension

public void addExtension(PresenceExtension e)

removeExtension

public void removeExtension(PresenceExtension e)

enumerateExtensions

public java.util.Enumeration enumerateExtensions()

build

public Packet build()
             throws java.lang.InstantiationException
Specified by:
build in class PacketBuilder

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