NIST SIP Parser and Stack (v1.2) API

gov.nist.javax.sip.stack
Class MessageLogList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.TreeSet
                    |
                    +--gov.nist.javax.sip.stack.MessageLogList
All Implemented Interfaces:
Cloneable, Collection, Serializable, Set, SortedSet

public class MessageLogList
extends TreeSet

This class stores a sorted list messages for logging.

Version:
JAIN-SIP-1.1
Author:
M. Ranganathan
, Marc Bednarek This code is in the public domain.
See Also:
Serialized Form

Constructor Summary
MessageLogList(Comparator comp)
          Constructor.
MessageLogList(String callId, Comparator comp)
          Constructor given callId and a comparator.
 
Method Summary
 boolean add(Object obj)
          Add a comparable object to the messgageLog
 void addDescription(String description)
          set a descriptive string for this log (for id purposes).
 String flush()
          Get an XML String for this message list.
 
Methods inherited from class java.util.TreeSet
addAll, clear, clone, comparator, contains, first, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

MessageLogList

public MessageLogList(Comparator comp)
Constructor.

Parameters:
comp - comparator for sorting the logs

MessageLogList

public MessageLogList(String callId,
                      Comparator comp)
Constructor given callId and a comparator.

Parameters:
callId - is the call id for which to store the log.
comp - is the comparator to sort the log records.
Method Detail

addDescription

public void addDescription(String description)
set a descriptive string for this log (for id purposes).

Parameters:
description - is the decriptive string to add.

add

public boolean add(Object obj)
Add a comparable object to the messgageLog

Specified by:
add in interface Set
Overrides:
add in class TreeSet
Parameters:
obj - is the comparable object to add to the message log.

flush

public String flush()
Get an XML String for this message list. If the log is being stored on a file, commit the log to the file.

Returns:
a string containing the enitre log that we have gathered. This is sorted in an order that is dictated by the comparator.

NIST SIP Parser and Stack (v1.2) API

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Get the latest distribution.
Submit a bug report or feature request.