| java.lang.Object com.sun.midp.i3test.TestCase javax.microedition.sip.SipHeaderBaseTest javax.microedition.sip.TestFromHeader
TestFromHeader | public class TestFromHeader extends SipHeaderBaseTest (Code) | | RFC3261, p. 37; BNF: p. 230
From = ( "From" / "f" ) HCOLON from-spec
from-spec = ( name-addr / addr-spec )
( SEMI from-param )
from-param = tag-param / generic-param
tag-param = "tag" EQUAL token
The From header field indicates the logical identity of the initiator
of the request, possibly the user's address-of-record. Like the To
header field, it contains a URI and optionally a display name. It is
used by SIP elements to determine which processing rules to apply to
a request (for example, automatic call rejection). As such, it is
very important that the From URI not contain IP addresses or the FQDN
of the host on which the UA is running, since these are not logical
names.
The From header field allows for a display name. A UAC SHOULD use
the display name "Anonymous", along with a syntactically correct, but
otherwise meaningless URI (like sip:thisis@anonymous.invalid), if the
identity of the client is to remain hidden.
Usually, the value that populates the From header field in requests
generated by a particular UA is pre-provisioned by the user or by the
administrators of the user's local domain. If a particular UA is
used by multiple users, it might have switchable profiles that
include a URI corresponding to the identity of the profiled user.
Recipients of requests can authenticate the originator of a request
in order to ascertain that they are who their From header field
claims they are (see Section 22 for more on authentication).
The From field MUST contain a new "tag" parameter, chosen by the UAC.
See Section 19.3 for details on choosing a tag.
For further information on the From header field, see Section 20.20.
Examples:
From: "Bob" ;tag=a48s
From: sip:+12125551212@phone2net.com;tag=887s
From: Anonymous ;tag=hyh8
|
Method Summary | |
void | Test1() Body of the test 1. | void | Test2() Body of the test 2. | void | Test4() Body of the test 4. | void | Test5() Body of the test 5. | public void | runTests() |
Test1 | void Test1()(Code) | | Body of the test 1.
Test for From header field: setName()/getName().
|
Test2 | void Test2()(Code) | | Body of the test 2.
Test for From header field: getValue()/getHeaderValue().
|
Test4 | void Test4()(Code) | | Body of the test 4.
Test for From header field: getParameterNames()/getParameter().
|
Test5 | void Test5()(Code) | | Body of the test 5.
Test for From header field: setParameter()/removeParameter().
|
runTests | public void runTests()(Code) | | Run the tests
|
Methods inherited from com.sun.midp.i3test.TestCase | public void assertEquals(Object expected, Object actual)(Code)(Java Doc) public void assertEquals(String message, Object expected, Object actual)(Code)(Java Doc) public void assertEquals(int expected, int actual)(Code)(Java Doc) public void assertEquals(String message, int expected, int actual)(Code)(Java Doc) public void assertFalse(boolean condition)(Code)(Java Doc) public void assertFalse(String message, boolean condition)(Code)(Java Doc) public void assertNotNull(Object object)(Code)(Java Doc) public void assertNotNull(String message, Object object)(Code)(Java Doc) public void assertNotSame(Object expected, Object actual)(Code)(Java Doc) public void assertNotSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertNull(Object object)(Code)(Java Doc) public void assertNull(String message, Object object)(Code)(Java Doc) public void assertSame(Object expected, Object actual)(Code)(Java Doc) public void assertSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertTrue(String message, boolean condition)(Code)(Java Doc) public void assertTrue(boolean condition)(Code)(Java Doc) public void declare(String testName)(Code)(Java Doc) public void fail()(Code)(Java Doc) public void fail(String message)(Code)(Java Doc) protected SecurityToken getSecurityToken()(Code)(Java Doc) protected boolean getVerbose()(Code)(Java Doc) public void info(String s)(Code)(Java Doc) abstract public void runTests() throws Throwable(Code)(Java Doc)
|
|
|