CVS: beepcore-java GettingStarted.txt,1.2,1.3

Huston Franklin <[email protected]> Fri, 13 Sep 2002 19:13:45 -0700
Newsgroups gmane.network.beep.beepcore.java.cvs
Message-ID <[email protected]>
Update of /cvsroot/beepcore-java/beepcore-java
In directory usw-pr-cvs1:/tmp/cvs-serv18020

Modified Files:
	GettingStarted.txt 
Log Message:
cleanup

Index: GettingStarted.txt
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/GettingStarted.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** GettingStarted.txt	25 Apr 2001 07:06:05 -0000	1.2
--- GettingStarted.txt	14 Sep 2002 02:13:42 -0000	1.3
***************
*** 47,57 ****
  Session using:
  
!   Session session = AutomatedTCPSessionCreator.initiate(host, port,
!                                                         new ProfileRegistry());
  
  From a listener's role you can listen for new Sessions using:
  
    while (true) {
!       AutomatedTCPSessionCreator.listen(port, profileReg);
    }
  
--- 47,57 ----
  Session using:
  
!   Session session = TCPSessionCreator.initiate(host, port,
!                                                new ProfileRegistry());
  
  From a listener's role you can listen for new Sessions using:
  
    while (true) {
!       TCPSessionCreator.listen(port, profileReg);
    }
  
***************
*** 90,108 ****
  ------------------
  
! The abstraction for the data of a message is a DataStream. Before
! sending a message one of the DataStream types (StringDataStream,
! ByteDataStream, etc.) must be created.
  
!   DataStream dataStream =
!       new StringDataStream("<attach endpoint=\"[email protected]\"/>");
  
  NOTE: BEEP has a flow control mechanism for Channels that makes it
  possible to have multiple channels on one connection. The flow control
! is tied into the DataStream so that as an application reads the data
! it notifies Channel that more data may be received. Because of this
! the application MUST either read all of the data in the received
! messages or call close on the DataStreams for the messages to allow
! more data to be sent on the Channel. If this is not done the Channel
! will stall once the window for the Channel is full and no more
  messages will be received on that Channel.
  
--- 90,108 ----
  ------------------
  
! The abstraction for the data of a message is an
! OutputDataStream. Before sending a message one of the OutputDataStream
! types (StringDataStream, ByteDataStream, etc.) must be created.
  
!   OutputDataStream dataStream =
!       new StringOutputDataStream("<attach endpoint=\"[email protected]\"/>");
  
  NOTE: BEEP has a flow control mechanism for Channels that makes it
  possible to have multiple channels on one connection. The flow control
! is tied into the InputDataStream so that as an application reads the
! data it notifies Channel that more data may be received. Because of
! this the application MUST either read all of the data in the received
! messages or call close on the InputDataStreams for the messages to
! allow more data to be sent on the Channel. If this is not done the
! Channel will stall once the window for the Channel is full and no more
  messages will be received on that Channel.
  
***************
*** 125,130 ****
  
  A reply must be sent for each request. This may be a RPY, ERR, or an
! ANS/NUL set. They are sent using the coresponding methods on Channel
! (sendRPY, etc.).
  
  ANS messages are a mechanism for sending multiple messages as a reply
--- 125,130 ----
  
  A reply must be sent for each request. This may be a RPY, ERR, or an
! ANS/NUL set. They are sent using the coresponding methods on
! MessageMSG (sendRPY, etc.).
  
  ANS messages are a mechanism for sending multiple messages as a reply
***************
*** 139,143 ****
  startChannel callback in StartChannelListener).
  
!   channel.setDataListener(this);
  
  Basic Server
--- 139,143 ----
  startChannel callback in StartChannelListener).
  
!   channel.setMessageListener(this);
  
  Basic Server
***************
*** 153,157 ****
                                echo.getStartChannelListener());
    while (true) {
!       AutomatedTCPSessionCreator.listen(port, reg);
    }
  
--- 153,157 ----
                                echo.getStartChannelListener());
    while (true) {
!       TCPSessionCreator.listen(port, reg);
    }
  
***************
*** 166,170 ****
  
        try {
!           message.getChannel().sendRPY(message.getDataStream());
        } catch (BEEPException e) {
            throw new BEEPError(BEEPError.CODE_REQUESTED_ACTION_ABORTED,
--- 166,170 ----
  
        try {
!           message.sendRPY(message.getDataStream());
        } catch (BEEPException e) {
            throw new BEEPError(BEEPError.CODE_REQUESTED_ACTION_ABORTED,
***************
*** 178,194 ****
  (see example Bing)
  
!   Session session = AutomatedTCPSessionCreator.initiate(host, port,
!                                                         new ProfileRegistry());
    Channel channel = session.startChannel(EchoProfile.ECHO_URI);
  
    Reply reply = new Reply();
!   channel.sendMSG(new StringDataStream("Hello"), reply);
  
!   DataStream ds = reply.getNextReply().getDataStream();
!   InputStream is = ds.getInputStream();
  
!   int replyLength = 0;
!   while (ds.isComplete() == false || is.available() > 0) {
!       is.read();
        ++replyLength;
    }
--- 178,193 ----
  (see example Bing)
  
!   Session session = TCPSessionCreator.initiate(host, port,
!                                                new ProfileRegistry());
    Channel channel = session.startChannel(EchoProfile.ECHO_URI);
  
    Reply reply = new Reply();
!   channel.sendMSG(new StringOutputDataStream("Hello"), reply);
  
!   InputStream is =
!       reply.getNextReply().getDataStream().getInputStream();
  
!   // Read the data in the reply
!   while (is.read() != -1) {
        ++replyLength;
    }



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf