jxDBCon 0.9z

org.sourceforge.jxdbcon.postgresql
Class IntProtocol

java.lang.Object
  |
  +--org.sourceforge.jxdbcon.postgresql.IntProtocol

public class IntProtocol
extends Object

The IntProtocol is used by the IntConnection.

Version:
$Revision: 1.2 $
Author:
Keve Müller

Nested Class Summary
(package private)  class IntProtocol.CommentQuery
           
(package private)  class IntProtocol.ConnectQuery
           
(package private)  class IntProtocol.FunctionCallQuery
           
(package private)  class IntProtocol.ProcResponse
           
(package private) static class IntProtocol.Query
           
(package private) static class IntProtocol.Response
          Abstract base class for the messages sent by the backend.
(package private) static class IntProtocol.Type
           
(package private)  class IntProtocol.TypeResponse
           
 
Field Summary
protected  DataInputStream in
          The inputstream for reading from the backend.
protected  DataOutputStream out
          The OutputStream for writing to the backend.
 
Constructor Summary
(package private) IntProtocol(DataInputStream in, DataOutputStream out)
           
 
Method Summary
 IntProtocol.Response dispatch(int ch)
          Identify the message by the transmitted first character.
(package private)  IntProtocol.Response readFirst()
          Read the first/next response/query from the backend.
(package private)  byte[] readString()
          Low level communication function for reading a variable length byte[].
(package private)  void sendCommentAck()
           
(package private)  void sendConnectAck()
           
(package private)  void sendError(byte[] errMsg)
           
(package private)  void sendFuncResult(long retType, byte[][] resBuf)
           
(package private)  void sendProcCall(long funcOid)
           
(package private)  void sendTypeQuery(long oid)
           
(package private)  void writeString(byte[] buf)
          Low level communication function for writing a variable length byte[].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

protected DataInputStream in
The inputstream for reading from the backend.


out

protected DataOutputStream out
The OutputStream for writing to the backend.

Constructor Detail

IntProtocol

IntProtocol(DataInputStream in,
            DataOutputStream out)
Method Detail

dispatch

public IntProtocol.Response dispatch(int ch)
Identify the message by the transmitted first character.

Returns:
null if the character code does not map to a valid message, else the message instance

readFirst

IntProtocol.Response readFirst()
                         throws IOException
Read the first/next response/query from the backend.

Throws:
EOFException - if the end of the stream was found
IOException - if any other IO problem occured

readString

byte[] readString()
            throws IOException
Low level communication function for reading a variable length byte[].

IOException

sendCommentAck

void sendCommentAck()
              throws IOException
IOException

sendConnectAck

void sendConnectAck()
              throws IOException
IOException

sendError

void sendError(byte[] errMsg)
         throws IOException
IOException

sendFuncResult

void sendFuncResult(long retType,
                    byte[][] resBuf)
              throws IOException
IOException

sendProcCall

void sendProcCall(long funcOid)
            throws IOException
IOException

sendTypeQuery

void sendTypeQuery(long oid)
             throws IOException
IOException

writeString

void writeString(byte[] buf)
           throws IOException
Low level communication function for writing a variable length byte[].

IOException

jxDBCon 0.9z

Copyright © 2001,2002 Keve Müller; see LICENSE file for details.