edu.ou.kmi.buddyspace.utils
Class History

java.lang.Object
  |
  +--edu.ou.kmi.buddyspace.utils.History

public class History
extends java.lang.Object

History provides logging and storing of messages, etc.


Field Summary
protected static int BUF_LEN
           
 
Constructor Summary
History()
           
 
Method Summary
static java.lang.String getCurrentTimeStamp()
          Returns current time-stamp in textual form
static java.lang.String getMessages(JID myJID, JID peerJID)
          Loads whole history for given JID to JID communication
static java.util.Date getTime(XDelay delay)
          Converts XDelay into Date
static java.lang.String getTimeStamp(XDelay delay)
          Converts XDelay into String
static void storeIncomingMessage(Message packet, java.lang.String name)
          Stores message.
static void storeMessage(JID fromJID, JID toJID, java.lang.String senderNick, Message packet, boolean incoming)
          Stores message.
static void storeMessage(JID myJID, JID peerJID, java.lang.String name, java.lang.String subject, java.lang.String body)
          Stores message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUF_LEN

protected static int BUF_LEN
Constructor Detail

History

public History()
Method Detail

storeMessage

public static void storeMessage(JID myJID,
                                JID peerJID,
                                java.lang.String name,
                                java.lang.String subject,
                                java.lang.String body)
Stores message.

Parameters:
myJID - identifies the local user; i.e. history directory
peerJID - identifies the history file (e.g. jid of peer in chat)
name - is nickname of person who sent the message
subject - is message subject
body - is message body

getMessages

public static java.lang.String getMessages(JID myJID,
                                           JID peerJID)
Loads whole history for given JID to JID communication

Parameters:
myJID - identifies the local user; i.e. history directory
peerJID - identifies the history file (e.g. jid of peer in chat)

storeIncomingMessage

public static void storeIncomingMessage(Message packet,
                                        java.lang.String name)
Stores message.

Parameters:
packet - is message packet
name - is nickname of person who sent the message

storeMessage

public static void storeMessage(JID fromJID,
                                JID toJID,
                                java.lang.String senderNick,
                                Message packet,
                                boolean incoming)
Stores message.

Parameters:
fromJID - is sender's JID
toJID - is receiver's JID
senderNick - is sender's nickname
packet - is message packet
incoming - is true if received message, false for sent one

getCurrentTimeStamp

public static java.lang.String getCurrentTimeStamp()
Returns current time-stamp in textual form


getTime

public static java.util.Date getTime(XDelay delay)
Converts XDelay into Date


getTimeStamp

public static java.lang.String getTimeStamp(XDelay delay)
Converts XDelay into String