SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Jibby Lala wrote: thanks for reply and welcoming Ernest Friedman-Hill
although messageImpl is remoteobject but that is instantiating in client like this:
The "message" class could contain just a String to hold the message text, or it could include fancier stuff like a list of client names to send a private chat message to, icons, etc. Message is just a plain old Java class though -- it's not remote. It also needs to be totally self contained. It knows nothing about Callbacks, and nothing about ChatServers. On the contrary, it's the ChatServer and Client implementations that call methods on Messages, extract data from them, and operate on them. Messages need to be sent back and forth over the wire so they should not include references to any other objects or any machine-dependent paths or resources.
Hug your destiny! And hug this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|