Skip to main content

when jxtabidpipe failed with some reasons.how to capture the event

2 replies [Last post]
jianglinji
Offline
Joined: 2007-07-15
Points: 0

when the pipe resign or stop connecting,how to find it leave.
thanks in advance!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jimbosi
Offline
Joined: 2007-06-14
Points: 0

the methods for this are available in the jxta API:
http://jsourcery.com/api/jxta.org/jxta/2.4.1/net/jxta/util/JxtaBiDiPipe....

when connecting you can either use a pipe messenger event to notify you of a connection or you can use the "connect" method with a timeout, which blocks until the pipe is either connected or the timeout expires.

You can also call the "isBound()" method at any time to check if the pipe is bound to a remote peer.

jianglinji
Offline
Joined: 2007-07-15
Points: 0

thanks for your answer.
but the situation is that pipe have connected.so the connect timeout is no use.and the a pipe messenger event only have three type:connected ,failed,closed. i need the event,disconnected but not closed.

the method isBound ,i have not tested.but form Socket doc ,the method isBound seem not the solution to the problem.