RE: Piggyback data API deprecated.
"Wladimir Araujo" <[email protected]> Mon, 26 Jul 2004 09:28:51 -0400
| Newsgroups | gmane.network.beep.beepcore.java.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
------_=_NextPart_001_01C47314.7DA6C328
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
These methods have been deprecated, yes. For you to piggyback
data you can do the following:
send it with (Session):
public Channel startChannel(String profile, boolean
base64Encoding,
String data)
throws BEEPException, BEEPError;
you'll get it on the other side with (Channel):
public void startChannel(Channel channel, String
encoding, String data)
throws StartChannelException;
There was (is), however, a problem with the SessionImpl start-up
(processStartChannel). I had submitted a fix a while ago, but I don't
know the status of where it went. I am attaching my previous message
with the fix. The detail is that you must send back some data (using
setStartChannel). That solved my problem. Maybe you can improve the fix
in the case no reply is sent.
I hope it helps. Detail: I still use the deprecated methods.
Cheers,
Wladimir de Lara Araujo Filho
Juniper Networks, Inc.
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of
Greg Wilkins
Sent: Sunday, July 25, 2004 10:49 PM
To: [email protected]
Subject: [Beepcore-java-users] Piggyback data API deprecated.
The setStartData and getStartData methods have been deprecated, but I=20
can't see how to avoid their use to receive a piggyback reply?
You can send piggyback data with an arg to startChannel.
You can receive piggyback data with a RequestHandler and send a reply=20
normally.
But I can't see how to receive this reply without using getStartData
after the startChannel?
I'm also seeing a problem that after using piggyback data, the channel
does not appear to work. But I think this is a bug in 0.9.08 that has
been discussed in the "PiggyBacked data, MessageListener and=20
RequestHandler" thread.
regards
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=3D4721&alloc_id=3D10040&op=3Dclick
_______________________________________________
Beepcore-java-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/beepcore-java-users
------_=_NextPart_001_01C47314.7DA6C328
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Subject: PiggyBacked data, MessageListener and RequestHandler (simple fix)
Content-Transfer-Encoding: quoted-printable
Disposition-Notification-To: "Wladimir Araujo" <[email protected]>
x-mimeole: Produced By Microsoft Exchange V6.5.6944.0
Date: Wed, 11 Feb 2004 11:32:45 -0400
Message-ID: <[email protected]>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: PiggyBacked data, MessageListener and RequestHandler (simple fix)
Thread-Index: AcPwtEuAyeQ1BTtZQ0G32BcxPJTJeg==
From: "Wladimir Araujo" <[email protected]>
To: "Beepcore \(E-mail\)" <[email protected]>
Hi,
Since I did not hear from anybody in this respect, I'm adding this =
simple fix. The piggybacked stuff remains there and the TCPSession is =
recreated afterwards. This only works if =
StartChannelListener.startChannel() calls channel.setStartData() to send =
back a piggybacked reply, otherwise the session will die if the new =
channel does not reply to the piggybacked message. The patch is below.
Cheers,
--- SessionImpl.java.new Wed Feb 11 10:21:28 2004
+++ SessionImpl.java.old Wed Feb 11 10:24:09 2004
@@ -1321,7 +1321,7 @@
=20
fireChannelStarted(ch);
=20
- if (ch.getState() !=3D ChannelImpl.STATE_TUNING) {
+ if (p.data =3D=3D null && ch.getState() !=3D =
ChannelImpl.STATE_TUNING) {
this.enableIO();
}
}
Wladimir de Lara Araujo Filho
Juniper Networks, Inc.
------_=_NextPart_001_01C47314.7DA6C328--
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click