|
jxDBCon 0.9z | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourceforge.jxdbcon.postgresql.NetProtocol
The NetProtocol encapsulates the common things of the socket based Backend/Frontend protocols. COPY IN / COPY OUT behaviour can be controlled by setting the member values. If set to null the data is silently discarded.
Field Summary | |
protected InputStream |
copyInStream
The InputStream for COPY IN data. |
protected OutputStream |
copyOutStream
The OutputStream for COPY OUT data. |
protected DataInputStream |
in
The inputstream for reading from the backend. |
protected Object |
lock
The lock. |
protected String |
messageEncoding
The encoding to use to decode backend messages. |
protected DataOutputStream |
out
The OutputStream for writing to the backend. |
protected Socket |
socket
The Socket for communication with the backend. |
Fields inherited from interface org.sourceforge.jxdbcon.postgresql.PGConstants |
AUTH_REQ_CRYPT, AUTH_REQ_KRB4, AUTH_REQ_KRB5, AUTH_REQ_MD5, AUTH_REQ_OK, AUTH_REQ_PASSWORD, AUTH_REQ_SCM, NUMERIC_DSCALE_MASK, NUMERIC_NAN, NUMERIC_NEG, NUMERIC_POS, NUMERIC_SIGN_MASK, PG_VERSION_STR, PG_VERSION_STR1, TRIGGER_TYPE_BEFORE, TRIGGER_TYPE_DELETE, TRIGGER_TYPE_INSERT, TRIGGER_TYPE_ROW, TRIGGER_TYPE_UPDATE |
Fields inherited from interface org.sourceforge.jxdbcon.postgresql.PGInfoKeys |
FORCECLIENTENC, OPTIONS, PROTOVERSION, SETTIMEZONE, STRICTSCHEMA, TTY, USEASYNC, USECLIENTENC, USEDBENC, USESSL |
Fields inherited from interface org.sourceforge.jxdbcon.InfoKeys |
CATALOG, DESCRIPTION, DRIVER, HOST, PASSWORD, PORT, SUBDRIVER, USER |
Constructor Summary | |
NetProtocol()
|
Method Summary | |
protected void |
connectSocket(Properties info)
Connect to the backend, set the socket, in and out members. |
protected void |
limString(int size,
byte[] ba)
Write a fixed length String to the stream. |
protected byte[] |
readCString()
Read a C-style 0 terminated string (as bytes). |
void |
setCopyInStream(InputStream in)
Accessor function for COPY IN |
void |
setCopyOutStream(OutputStream out)
Accessor function for COPY OUT |
void |
setMessageEncoding(String messageEncoding)
Accessor function for messageEncoding. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.sourceforge.jxdbcon.postgresql.PGProtocol |
close, connect, exec, requestCancel |
Field Detail |
protected InputStream copyInStream
protected OutputStream copyOutStream
protected DataInputStream in
protected Object lock
protected String messageEncoding
protected DataOutputStream out
protected Socket socket
Constructor Detail |
public NetProtocol()
Method Detail |
protected void connectSocket(Properties info) throws IOException, UnknownHostException
IOException
UnknownHostException
protected final void limString(int size, byte[] ba) throws IOException
size
- The string length.ba
- The string value.
IOException
protected final byte[] readCString() throws IOException
IOException
public void setCopyInStream(InputStream in)
setCopyInStream
in interface PGProtocol
public void setCopyOutStream(OutputStream out)
setCopyOutStream
in interface PGProtocol
public void setMessageEncoding(String messageEncoding)
setMessageEncoding
in interface PGProtocol
|
jxDBCon 0.9z | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |