This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I've just started my adventure with jsr-82 so this sollution may not be the best.
StreamConnection is just an interface with a few important methods like openInputStream, openOutputStream etc.
You can try to identify the class implementing this intefrace and find out if it exposes any methods that suit you requirements eg connection endpoints.
Sending message thread can open input stream(using the same StreamConnection) and read the notfication from message receiver.
Of course message receiver must send the notification by write the output stream(created from the same StreamConnection).
Hope this will help somehow.
Joined: Jul 09, 2009
My problem is solved. I used a method to solve it.
While sending message ,senders conncetion URL was appended to the message to be sent ..that is it can be considered as a header appended to the message to be send .
On the receiving end i stripped the message to get the senders address.
It is done as follows
After registering service in the SDDB ie following code is used to get connection URL to this particular service ,which is then assigned to a string sender
// For storing Senders Address in a variable and appending it while sending messages.
ServiceRecord rb= LocalDevice.getLocalDevice().getRecord(myNotifier);
// gets senders connection URL
This is appended with message to be sent delimited by a caharacter. ~
argument passed to message sending thread