OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

sca-j message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: JAVA-46: Proposal for ServiceReference equals() method



Please find the attached proposal for JAVA-46 which adds a description on the equals() and hashCode() method to the ServiceReference. The proposal is based on the original discussions from the November face to face discussions and has been updated to reflect the recent API changes.


The changes are in section 8.3 and are shown below:


·        equals(Object anObject) - returns true if and only if anObject is:

·        a) a ServiceReference object

·        b) anObject relates to equivalent reference metadata as the ServiceReference

Note that “equivalent reference metadata” means that the anObject and the ServiceReference MUST have the same:

o       Domain URI

o       Service URI

o       Binding

o       Policy

In addition, for a callback ServiceReference, as the metadata also includes dynamic information (“EPR”) that cannot be compared, the equals() method MUST only return true if anObject is identically the same as the ServiceReference object.


·        hashCode() – returns the hash code value for the ServiceReference.

The exact value returned by the hashCode() method is implementation specific but it MUST obey the general contract defined for the hashCode() method in java.lang.Object.


I look forward to your thoughts and comments.





Mark Combellack| Software Developer| Avaya | Eastern Business Park | St. Mellons | Cardiff | CF3 5EA | Voice: +44 (0) 29 2081 7624 | mcombellack@avaya.com


sca-javacaa-1.1-spec-cd02-rev2 plus equals() method.doc

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]