Skip to main content

JxtaBidi and Rendezvous questions

3 replies [Last post]
deco.af
Offline
Joined: 2011-05-05

Hi guys,
Is there anyway to know if the another end of a JxtaBidipipe has failed or has closed the connection? I've tried to use the PipeStateListener but it never seens to trigger the PipeStateListener.PIPE_CLOSED_EVENT or PipeStateListener.PIPE_CLOSED_EVENT.
Actually, I'm trying to detect if a peer has left the network in an abrut way. I've also tried to use a RendezvousListener at my rendezvous peer, however it trigger the CLIENTFAILED event only after 20 minutes thanks to default rendezvous lease time. Is there anyway to customize this lease time? If yes, this is recommendable?
Thanks!

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #0027cc}

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
deco.af
Offline
Joined: 2011-05-05

Ok, for the bidipipe check the method isBound() was enough. However, I'm still trying to figure out how to configure the default lease time...

deco.af
Offline
Joined: 2011-05-05

Anyone?

henno_b
Offline
Joined: 2010-09-03

I have a project where close interaction between complex sets of peers is required, so i also need to know ASAP when a remote peer goes off-line. I did this by creating "buddy triangles" among all peers, which are sets of three peers that are interconnected by BiPi (well, actually I use JXTAsockets but that's just a wrapper) On each of the three sockets between three peers, heartbeat signals are exchanged that contain the status of the third peer. So, if one of the peers goes off-line, both other peers loose the heartbeat almost simultaneously, and tell each other about it by sending a different status for the third socket. The two remaining peers then take the required action to rearrange the exzchange scheme. It's rather complex but very reliable. Took more than a year to implement properly, though.
Have fun.