Subject: [SIP] JAIN SIP - some other issues

From: Chris Harris <[email-masked]>
Date: Fri, 17 Nov 2000 12:21:50 +0000

A couple of other issues which need to be resolved are as follows:

The equals() methods are currently over-ridden e.g. AcceptHeader has a
method public boolean equals(AcceptHeader acceptHeader). Is this
over-riding desirable, or would the original signature public boolean
equals(object obj) be preferable?

The JainSipFactory has replaced the JainIPFactory due to the number of
SIP-specific create methods needed with interfaces. The JainSipFactory
defines a generic createJainSipObject(...) method that takes a String
(which is appended to the path name to give the fully qualified class
name of the object to be created). This method throws a
JainSipPeerUnavailableException if the class specified is not found.
This exception extends JainSipException, and is therefore a checked
exception.

The question is whether the other create methods in the factory e.g.
createAcceptHeader(...) should catch this exception (assume the JAIN SIP
implementation will contain an AcceptHeader implementation), or throw
it. I think it is reasonable to assume that an implementation will
provide all the classes needed (otherwise they will fail the TCK), but
the user may set the path name of the factory to a non-existent
implementation, say com.nosuchcompany, or the implementation they wish
to use may not be in the classpath. This would suggest that all create
methods in the factory should throw the JainSipPeerUnavailableException.

However, this will place a large burden on the application, since it
will have to catch this exception every time it tries to create a header
or message. My suggestion is to create a JainSipRuntimeException, and
have JainSipPeerUnavailableException extend it. Would this be considered
a reasonable solution?

Regards,
Chris Harris

_______________________________________________
SIP mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/sip