| HEADER | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
biouml.modules.genenet.access.MGL_Connection | +--biouml.modules.genenet.access.MGL_Connection_Client
Provides access to the MGL server. The application (applet) should has only one MGL_ConnectionClient.
To provide more rapid access to the MGL server application can open the session using the function openSession While the session is opened, the connection (socket) is not closed, when disconnect function is called.
closeSession close the session, if the _sessionLevel = 0.
close close the session in any case.
Example:
MGL_ConectionClient connection = new MGL_ConnectionClient();
try
{
connection.openSession(); // _sessionLevel = 1
connection.openSession(); // _sessionLevel = 2
connection.connect(); // open the connection
...
connection.disconnect() // do nothing, because _sessionLevel > 0
connection.closeSession(); // _sessionLevel = 1
connection.closeSession(); // _sessionLevel = 0, close the connection
}
finally()
{
connection.close(); // close the connection in any case
// _sessionLevel = 0
}
| Field Summary | |
final static int | MGL_PORT |
| Fields inherited from class biouml.modules.genenet.access.MGL_Connection |
ACCELERATOR, DB_DEFAULT_FIELDS, DB_DESCRIPTION, DB_ENTRIES_SET_BY_AC, DB_ENTRIES_SET_BY_ID, DB_ENTRY_BY_AC, DB_ENTRY_BY_ID, DB_ENTRY_VERSIONS, DB_EXECUTE_QUERY, DB_GENENET_DESCRIPTION, DB_GENENET_LIST_ID, DB_GENENET_SCHEME, DB_LIST, DB_LIST_ID, DB_REMOVE_ENTRY, DB_SET, DB_SIZE, DB_WRITE_ENTRIES_SET, DB_WRITE_ENTRY, DISCONNECT, ERROR, OK |
| Constructor Summary | |
MGL_Connection_Client(String address, String dbCurrent)Constructs the MGL_Connection_Client with specified database NAME for transfer and text panel to display prompts. | |
MGL_Connection_Client(String address)Constructs the MGL_Connection_Client with text panel to display prompts. | |
| Method Summary | |
void | close()Closes the connection in any case. |
void | closeSession()Closes the session. |
void | connect()Opens the connection with the MGL server. |
void | disconnect()Close the connection. |
String | getDatabaseDescription()Returns the current database description. |
String | getDatabaseList()Returns a list of database NAMEs loaded on the MGL server. |
String | getDefaultFieldsDescription()Returns default fields description. |
String | getEntriesSetByAC(String ac)Returns the set of required entries by their accession numbers. |
String | getEntriesSetByID(String id)Returns the set of required entries by their identifiers. |
String | getEntryByAC(String ac)Returns the required entry by its accession number. |
String | getEntryByID(String id)Returns the required entry by its identifcator. |
DataInputStream | getGeneNetDescription()Recieves the GeneNet database description. |
DataInputStream | getGeneNetListID()Recieves the lists of identifiers for all tables from the GeneNet database description. |
DataInputStream | getGeneNetScheme(String id)Recieves the GeneNet scheme by its identifier and all entries listed in it. |
List | getListID()Returns the list of identificators for all entries in current database. |
int | getSize()Returns the number of entries in the database. |
void | openSession()Opens the session. |
String | removeEntry(String id)Removes the required entry by its identifcator. |
synchronized String | request(int command, String argument, boolean readAnswer)Opens the connection with the MGL server, sends request, reads the answer, check it, and close the connection. |
synchronized String | request(int command, String dbName, String argument, boolean readAnswer) |
void | setDatabase(String dbName)Set up for data transfer the required database. |
void | writeEntriesSet(String entries)Write the set of entries. |
void | writeEntry(String entry)Write the entry. |
| Methods inherited from class biouml.modules.genenet.access.MGL_Connection |
readStringUTF, writeStringUTF |
| Field Detail |
public final static int MGL_PORT
| Constructor Detail |
public MGL_Connection_Client(String address, String dbCurrent)
public MGL_Connection_Client(String address)
| Method Detail |
public void close()
public void closeSession()
public void connect()
throws java.io.IOException
public void disconnect()
public String getDatabaseDescription()
throws java.io.IOException
public String getDatabaseList()
throws java.io.IOException
public String getDefaultFieldsDescription()
throws java.io.IOException
public String getEntriesSetByAC(String ac)
throws java.io.IOException
public String getEntriesSetByID(String id)
throws java.io.IOException
public String getEntryByAC(String ac)
throws java.io.IOException
public String getEntryByID(String id)
throws java.io.IOException
public DataInputStream getGeneNetDescription()
throws java.io.IOException
public DataInputStream getGeneNetListID()
throws java.io.IOException
public DataInputStream getGeneNetScheme(String id)
throws java.io.IOException
public List getListID()
throws java.io.IOException
public int getSize()
throws java.io.IOException
public void openSession()
public String removeEntry(String id)
throws java.io.IOException
public synchronized String request(int command, String argument, boolean readAnswer)
throws java.io.IOException
public synchronized String request(int command, String dbName, String argument, boolean readAnswer)
throws java.io.IOException
public void setDatabase(String dbName)
throws java.io.IOException
public void writeEntriesSet(String entries)
throws java.io.IOException
public void writeEntry(String entry)
throws java.io.IOException
| Association Links |
to Class java.lang.String
to Class java.lang.String
| FOOTER | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||