NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sip.header
Class SIPObject

java.lang.Object
  extended bygov.nist.core.GenericObject
      extended bygov.nist.javax.sip.header.SIPObject
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
CallIdentifier, Challenge, Credentials, MediaRange, Protocol, RequestLine, SIPHeader, StatusLine

public abstract class SIPObject
extends gov.nist.core.GenericObject

Root class for all singleton objects in this package: specializes the gov.nist.sip.header.GenericObject class for SIPHeader related objects.

Version:
1.2 $Revision: 1.7 $ $Date: 2006/07/13 09:01:24 $
Author:
M. Ranganathan
See Also:
Serialized Form

Method Summary
 void dbgPrint()
          Debug function
 String debugDump()
          An introspection based string formatting method.
 String debugDump(int indent)
          Formatter with a given starting indentation (for nested structs).
abstract  String encode()
          Encode the header into a String.
 boolean equals(Object other)
          An introspection based equality predicate for SIPObjects.
 boolean match(Object other)
          An introspection based predicate matching using a template object.
 String toString()
           
 
Methods inherited from class gov.nist.core.GenericObject
clone, getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

dbgPrint

public void dbgPrint()
Debug function


encode

public abstract String encode()
Encode the header into a String.

Returns:
String

equals

public boolean equals(Object other)
An introspection based equality predicate for SIPObjects.

Parameters:
other - the other object to test against.
Returns:
true if the objects are euqal and false otherwise

match

public boolean match(Object other)
An introspection based predicate matching using a template object. Allows for partial match of two protocl Objects. You can set a generalized matcher (using regular expressions for example) by implementing the Match interface and registering it with the template.

Parameters:
other - the match pattern to test against. The match object has to be of the same type (class). Primitive types and non-sip fields that are non null are matched for equality. Null in any field matches anything. Some book-keeping fields are ignored when making the comparison.

debugDump

public String debugDump()
An introspection based string formatting method. We need this because in this package (although it is an exact duplicate of the one in the superclass) because it needs to access the protected members of the other objects in this class.

Returns:
String

debugDump

public String debugDump(int indent)
Formatter with a given starting indentation (for nested structs).

Parameters:
indent - int to set
Returns:
String

toString

public String toString()

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

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