Re: Why are the header classes final?

"M. Rangnathan" <[email protected]>
Newsgroups gmane.comp.voip.nist-sip
Message-ID <[email protected]>
Well, Asterisk seems to have a bug. The quotes should not matter.  I can 
see no good reason for not making the class final. However, there is 
also no good reason to make that class final so I  just remove the final 
keyword. :-)

Its quite simple you see...


Ranga

[email protected] wrote:

> On Wed, 8 Nov 2006 at 20:53, Jeroen van Bemmel wrote:
>
>> They are not all final, but in any case the public interfaces of this 
>> library are in javax.sip (and javax.sdp). The design is such that an 
>> application would only deal with those packages.
>
>
> So why is gov.nist.javax.sip.header.Contact final if not all the
> headers are?  Like I said, I'm new to Java so I don't know the
> motivations for using final.
>
>> Which need do you have that it cannot be done using the public API?
>
>
> Well, we're trying to send a Response.MOVED_TEMPORARILY to Asterix
> boxes, and we were told on the Asterix mailing list that Asterix
> wouldn't recognize it unless the form of the Contact header
> in the response was:
>
>     Contact: Transfer <uri>
>
> I tried just using Transfer as the DisplayName, but that produces:
>
>     Contact: "Transfer" <uri>
>
> and that doesn't seem to be good enough.  Now, I'm not personally
> convinced that even getting rid of the quotes is going to fix the
> problem with Asterix, but I need to run the experiment.  So I was
> going to subclass Contact and change the toString so that there
> were no quotes around Transfer, and use my custom header in 
> constructing the response.
>
> --David
> _______________________________________________
> nist-sip mailing list
> [email protected]
> http://www-x.antd.nist.gov/mailman/listinfo/nist-sip
>


-- 
M. Ranganathan 

Advanced Networking Technologies Division,
National Institute of Standards and Technology (NIST),
100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. 
tel:301 975 3664 , fax:301 590 0932 http://w3.antd.nist.gov/
Advanced Networking Technologies For the People!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.