

Public Methods | |
| void | send (Marshaller message) throws JonathanException |
| void | prepare (Marshaller m) throws JonathanException |
| boolean | direct () |
| ReplyInterface | prepareInvocation (Marshaller m) throws JonathanException |
| synchronized void | close () |
| void | finalize () |
Private Methods | |
| RTPCoder (Session_High next, int mtu) | |
Private Attributes | |
| Session_High | next_session |
| short | cur_sequence_no |
| int | current_timestamp |
| int | mtu |
| RTPHeader | rtp_header |
| int | max_length |
|
|
Definition at line 199 of file RTPProtocol.java. 00199 {
00200 this.next_session=next;
00201 this.mtu=mtu;
00202 cur_sequence_no=0;
00203 rtp_header=new RTPHeader();
00204 rtp_header.payload=INVOC_PAYLOAD;
00205 max_length=mtu-RTPHeader.length-4;
00206 }
|
|
|
Closes the session, letting the associated resources be released or reused. Sessions may have an exclusive access to a communication resource. It is thus very important to ensure that they are properly closed if they are no longer in use. Reimplemented from Session_High. Definition at line 233 of file RTPProtocol.java. 00233 {
00234 if (next_session != null) {
00235 next_session.close();
00236 next_session=null;
00237 }
00238 }
|
|
|
Return false if the prepare or prepareInvocation must be used, true otherwise.
A true return means that the target protocols headers are added when the message is sent, and not before. Invoking one of the
Reimplemented from Session_High. Definition at line 224 of file RTPProtocol.java. 00224 {
00225 return false;
00226 }
|
|
|
Definition at line 240 of file RTPProtocol.java. 00240 {
00241 close();
00242 }
|
|
|
Lets the target session write its own headers into the provided message (one-way case).
Protocols usually need to add headers in the front of messages before sending them down the net. It may be much more efficient to add these headers before the actual message is written. The
The
Reimplemented from Session_High. Definition at line 212 of file RTPProtocol.java. 00212 {
00213 // newt.prepare ?
00214 byte[] header = new byte[12];
00215 rtp_header.timestamp = current_timestamp++;
00216 rtp_header.sequence_no=cur_sequence_no++;
00217 rtp_header.marker=false;
00218 rtp_header.encode(header);
00219
00220 m.writeByteArray(header,0,12);
00221 }
|
|
|
Reimplemented from Session_High. Definition at line 228 of file RTPProtocol.java. 00228 {
00229 throw new InternalException("RTP session don't handle invocations.");
00230 }
|
|
|
Sends the message down the protocol stack. The sent message must have been prepared first, unless a call to direct returns true. It is the responsibility of the recipient of the message to close it.
Reimplemented from Session_High. Definition at line 208 of file RTPProtocol.java. 00208 {
00209 // assumes next_seesion is direct ?
00210 next_session.send(message);
00211 }
|
|
|
Definition at line 193 of file RTPProtocol.java. |
|
|
Definition at line 194 of file RTPProtocol.java. |
|
|
Definition at line 197 of file RTPProtocol.java. |
|
|
Definition at line 195 of file RTPProtocol.java. |
|
|
Definition at line 192 of file RTPProtocol.java. |
|
|
Definition at line 196 of file RTPProtocol.java. |
1.2.6 written by Dimitri van Heesch,
© 1997-2001