gov.nist.javax.sip.header
クラス SIPObject

java.lang.Object
  上位を拡張 gov.nist.core.GenericObject
      上位を拡張 gov.nist.javax.sip.header.SIPObject
すべての実装されたインタフェース:
java.io.Serializable
直系の既知のサブクラス:
CallIdentifier, Challenge, Credentials, MediaRange, ProductToken, Protocol, RequestLine, SIPHeader, StatusLine

public abstract class SIPObject
extends GenericObject

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

バージョン:
JAIN-SIP-1.1 $Revision: 1.4 $ $Date: 2004/09/13 15:12:27 $
作成者:
M. Ranganathan
This code is in the public domain.
関連項目:
直列化された形式

メソッドの概要
 java.lang.Object clone()
          Generic clone method.
 void dbgPrint()
          Debug function
 java.lang.String debugDump()
          An introspection based string formatting method.
 java.lang.String debugDump(int indent)
          Formatter with a given starting indentation (for nested structs).
abstract  java.lang.String encode()
          Encode the header into a String.
 boolean equals(java.lang.Object other)
          An introspection based equality predicate for SIPObjects.
 boolean match(java.lang.Object other)
          An introspection based predicate matching using a template object.
 void merge(java.lang.Object mergeObject)
          Recursively override the fields of this object with the fields of a new object.
 void replace(Match regexp, GenericObject replacement)
          Do a find and replace of objects based on regular expression matching of fields.
 void replace(Match regexp, GenericObjectList replacement)
          Do a recursive find and replace of objects pointed to by this object based on regular expression pattern matching.
 void replace(java.lang.String objectText, GenericObject replacement, boolean matchSubstring)
          Do a recursive find and replace of objects pointed to by this object.
 void replace(java.lang.String objectText, GenericObjectList replacement, boolean matchSubstring)
          Do a find and replace of objects.
 java.lang.String toString()
           
 
クラス gov.nist.core.GenericObject から継承されたメソッド
getClassFromName, getMatcher, isMySubclass, setMatcher
 
クラス java.lang.Object から継承されたメソッド
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

メソッドの詳細

clone

public java.lang.Object clone()
Generic clone method. For any object in the object (like SIPHeaders) that are cloneable clone the object and add it to the returned List. Strings and wrappers of basic types are cloned by creating new objects. For other objects, if there is a clone method, then this is invoked and the cloned object appears in the result. Otherwise, this just copies the object reference over. NOTE that this method cannot be moved to the superclass because the superclass is in a different package (and we need to access protected fields from here).

オーバーライド:
クラス GenericObject 内の clone
戻り値:
Object
導入されたバージョン:
1.0

merge

public void merge(java.lang.Object mergeObject)
Recursively override the fields of this object with the fields of a new object. This is useful when you want to genrate a template and override the fields of an incoming SIPMessage with another SIP message that you have already generated.

オーバーライド:
クラス GenericObject 内の merge
パラメータ:
mergeObject - is the replacement object. The override obect must be of the same class as this object. Set any fields that you do not want to override as null in the mergeOject object.

dbgPrint

public void dbgPrint()
Debug function


encode

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

定義:
クラス GenericObject 内の encode
戻り値:
String

equals

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

オーバーライド:
クラス GenericObject 内の equals
パラメータ:
other - the other object to test against.
戻り値:
true if the objects are euqal and false otherwise

match

public boolean match(java.lang.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.

オーバーライド:
クラス GenericObject 内の match
パラメータ:
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 java.lang.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.

オーバーライド:
クラス GenericObject 内の debugDump
戻り値:
String

debugDump

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

オーバーライド:
クラス GenericObject 内の debugDump
パラメータ:
indent - int to set
戻り値:
String

replace

public void replace(java.lang.String objectText,
                    GenericObject replacement,
                    boolean matchSubstring)
             throws java.lang.IllegalArgumentException
Do a recursive find and replace of objects pointed to by this object.

オーバーライド:
クラス GenericObject 内の replace
パラメータ:
objectText - is the canonical string representation of the object that we want to replace.
replacement - is the object that we want to replace it with.
matchSubstring - a boolean which tells if we should match a substring of the target object A replacement will occur if a portion of the structure is found with matching encoded text as objectText and with the same class as replacement. (i.e. if matchSubstring is true an object is a candidate for replacement if objectText is a substring of candidate.encode() && candidate.class.equals(replacement.class) otherwise the match test is an equality test.)
例外:
java.lang.IllegalArgumentException - on null args and if replacementObject does not derive from GenericObject or GenericObjectList
導入されたバージョン:
v1.0

replace

public void replace(java.lang.String objectText,
                    GenericObjectList replacement,
                    boolean matchSubstring)
             throws java.lang.IllegalArgumentException
Do a find and replace of objects.

オーバーライド:
クラス GenericObject 内の replace
パラメータ:
objectText - Canonical string representation of the portion we want to replace.
replacement - object we want to replace this portion with. A replacement will occur if a portion of the structure is found with the matching encoded text as objectText and with the same class as the replacement.
matchSubstring - is true if we want to match the encoded text of a candidate object as a substring of the encoded target text. ( match occurs is objectText is a substring of the encoded text of an object with the same class as replacement.)
例外:
java.lang.IllegalArgumentException - on null args and if replacementObject does not derive from GenericObject or GenericObjectList
導入されたバージョン:
v1.0

replace

public void replace(Match regexp,
                    GenericObjectList replacement)
             throws java.lang.IllegalArgumentException
Do a recursive find and replace of objects pointed to by this object based on regular expression pattern matching.

オーバーライド:
クラス GenericObject 内の replace
パラメータ:
regexp - regular expression for the object we want to find. This is generated using a regular expression matching package such as the apache regexp package.
replacement - object we want to replace this portion with. A replacement will occur if a portion of the structure is found with a match of the encoded text with objectText and with the same class as replacement.
例外:
java.lang.IllegalArgumentException
導入されたバージョン:
v1.0

replace

public void replace(Match regexp,
                    GenericObject replacement)
             throws java.lang.IllegalArgumentException
Do a find and replace of objects based on regular expression matching of fields.

オーバーライド:
クラス GenericObject 内の replace
パラメータ:
regexp - is the match expression (i.e. implementation of the Match interface) for the object that we want to replace.
replacement - is the object that we want to replace it with. A replacement will occur if a portion of the structure is found that matches according to the given regexp and if the class of the replaced field matches the replacement.
例外:
java.lang.IllegalArgumentException

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString