Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Referenceable Interface

 
Ramu Ramaiah
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can somebody explain the purpose of Referenceable interface and it's significance?

Thanks,
Ramu
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The API can. What didn't you understand about what the API says?
 
dhwani mathur
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok,i do not have much idea.
Referenceable Interface is implemented by a object,it provides a reference to itself.
Objects which are not bound to the " naming system " can implement it ,and main "significance of Referenceable interface" is what the "object actualy references to" can be found. Please refer to the below shown link i hope you wil get some information atleast.
http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/Referenceable.html
 
dhwani mathur
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok,i do not have much idea.
Referenceable Interface is implemented by a object,it provides a reference to itself.
Objects which are not bound to the " naming system " can implement it ,and main "significance of Referenceable interface" is what the "object actualy references to" can be found. Please refer to the below shown link i hope you wil get some information atleast.
http://java.sun.com/j2se/1.4.2/docs/api/javax/naming/Referenceable.html
 
Ramu Ramaiah
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have gone through the Interface description in Java API documentation. I did not understand the whole picture, what is the significance of the interface.

The documentation says "This interface is implemented by an object that can provide a Reference to itself". If an object wants to provide a reference to itself, one can always have a object of the same type as a member and store a this reference right? Why should we have to implement this interface?
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't return an ordinary object reference to itself, it returns a javax.naming.Reference.

Basically, if you're not doing stuff using the javax.naming package, then this interface is not relevant to you. I have not used javax.naming, so I can't help further.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic