| HEADER | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
MGL Connection is the core of MGL client & server. General scheme of MGL client & server work.
Client Server --------------------- ------------------------------- [1.] opens the session 2. opens the connection -> opens the connection 3. sends the command -> receives the command and calls corresponding function [4.] sends the command -> the function receives parameters parameters 5. recieves answer state <- the function or server sends ( ok / error ) answer state ( ok / error ) 6. receives the answer <- the functions sends the answer 7. closes the connection if the session - is not opened -> closes the connection - is opened [8.] close the session -> closes the connectionNote. If the session is open, the close connection command really doesn't close the connection. The connection will be closed by the close session command. It is used to speed up data transfer, when series of requests to the server is occured.
| Field Summary | |
final static int | ACCELERATOR |
final static int | DB_DEFAULT_FIELDS |
final static int | DB_DESCRIPTION |
final static int | DB_ENTRIES_SET_BY_AC |
final static int | DB_ENTRIES_SET_BY_ID |
final static int | DB_ENTRY_BY_AC |
final static int | DB_ENTRY_BY_ID |
final static int | DB_ENTRY_VERSIONS |
final static int | DB_EXECUTE_QUERY |
final static int | DB_GENENET_DESCRIPTION |
final static int | DB_GENENET_LIST_ID |
final static int | DB_GENENET_SCHEME |
final static int | DB_LIST |
final static int | DB_LIST_ID |
final static int | DB_REMOVE_ENTRY |
final static int | DB_SET |
final static int | DB_SIZE |
final static int | DB_WRITE_ENTRIES_SET |
final static int | DB_WRITE_ENTRY |
final static int | DISCONNECT |
final static int | ERROR |
final static int | OKThe OK (all correct message). |
| Method Summary | |
final static synchronized String | readStringUTF(InputStream inputstream)Reads in a string from the specified data input stream. |
final static synchronized void | writeStringUTF(OutputStream outputstream, String s)Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner. |
| Field Detail |
public final static int ACCELERATOR
public final static int DB_DEFAULT_FIELDS
public final static int DB_DESCRIPTION
public final static int DB_ENTRIES_SET_BY_AC
public final static int DB_ENTRIES_SET_BY_ID
public final static int DB_ENTRY_BY_AC
public final static int DB_ENTRY_BY_ID
public final static int DB_ENTRY_VERSIONS
public final static int DB_EXECUTE_QUERY
public final static int DB_GENENET_DESCRIPTION
public final static int DB_GENENET_LIST_ID
public final static int DB_GENENET_SCHEME
public final static int DB_LIST
public final static int DB_LIST_ID
public final static int DB_REMOVE_ENTRY
public final static int DB_SET
public final static int DB_SIZE
public final static int DB_WRITE_ENTRIES_SET
public final static int DB_WRITE_ENTRY
public final static int DISCONNECT
public final static int ERROR
public final static int OK
| Method Detail |
public final static synchronized String readStringUTF(InputStream inputstream)
throws java.io.IOException
The first two bytes are read as if by
readInt. This value gives the number of
following bytes that are in the encoded string, not
the length of the resulting string. The following bytes are then
interpreted as bytes encoding characters in the UTF-8 format
and are converted into characters.
This method blocks until all the bytes are read, the end of the stream is detected, or an exception is thrown.
public final static synchronized void writeStringUTF(OutputStream outputstream, String s)
throws java.io.IOException
First, 4 bytes are written to the output stream as if by the
writeInt method giving the number of bytes to
follow. This value is the number of bytes actually written out,
not the length of the string. Following the length, each character
of the string is output, in sequence, using the UTF-8 encoding
for the character.
| Association Links |
to Class java.io.DataInputStream
to Class java.io.DataOutputStream
| FOOTER | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||