JxtaBiDiServer and Output Pipe compatibility

"Glenn" <[email protected]> Tue, 20 Sep 2005 12:18:11 -0400 (EDT)
Newsgroups gmane.comp.java.jxta.user
Message-ID <[email protected]>

Is there any way to distinguish when a pipe advertisement refers to a bidi pipe or a 'regular' pipe.

When using a JxtaBidiServer I remote publish a pipe advertisement i and a client peer that uses JxtaBiDiPipe can locate and send/receive information from the server peer.  Unfortunately clients looking for a pipe advertisement (who will connect using an OutputPipe) can discover and attempt to use the pipe.  This behavior results in the following NullPointerException in the Server Peer:

java.lang.NullPointerException
        at net.jxta.util.JxtaBiDiPipe.lightweightOutputPipe(JxtaBiDiPipe.java:981)
        at net.jxta.util.JxtaServerPipe.processMessage(JxtaServerPipe.java:434)
        at net.jxta.util.JxtaServerPipe.accept(JxtaServerPipe.java:231)
        at com.sarnoff.test.bidi.server.MessengerServiceImpl$ServerThread.run(MessengerServiceImpl.java:168)

Using a JxtaBidiPipe to connect with a server with an InputPipe works as expected - the server can receive the message, but is obviously unable to successfully send a response.

I understand an InputPipe is not compatible with a JxtaBidiServer, I'm just hoping there is a way to distinguish between the two in a pipe advertisement, to avoid the issue.

Glenn

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!