← Prev in month ← Prev in thread

JAVA-46: Proposal for ServiceReference equals() method

From
Mark Combellack <>
Date
2009-02-09T11:37:14+00:00
ID
Thread
JAVA-46: Proposal for ServiceReference equals() method
Hi,

 

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.

 

Thanks,

 

Mark

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

 

sca-javacaa-1.1-spec-cd02-rev2 plus equals() method.doc
← Prev in month ← Prev in thread