|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISession
ISession This interface defines the methods necessary to identify and manipulate a database session. All mechanics of primitive access are left to the implementation.
| Method Summary | |
|---|---|
boolean |
connect()Method to connect to database will be implementation specific, but will in all cases require username and password. |
ISession |
createNewSession()Creates a new session |
boolean |
disconnect()Method to break and discard connection to database. |
java.util.ArrayList |
getAttributes()Implementations should include a ArrayList that holds all attributes needed for establishing a connection to the database - accessed with this method. |
java.util.ArrayList |
getErrorMessage()Returns a list of errors for the session |
java.lang.String |
getPassword() |
java.lang.String |
getServerName() |
java.lang.Object |
getSessionID()Implementations should include an Object that identifies an established database connection accessed and mutated with the following methods. |
boolean |
getSetBusy()Returns true if the session is not busy and the busy flag is set |
java.lang.String |
getUserName() |
boolean |
isBusy()Returns true if the session is busy |
boolean |
isConnected()Method to test an existing connection for state. |
boolean |
isTemporary()Returns if the session is a temporary one |
boolean |
isValidConnection()Method to test whether the connection is valid. |
boolean |
reconnect()Method to reconnect to database will be implementation specific, but will in all cases require username and password. |
void |
setAttributes(java.util.ArrayList attributes)Set the attributes for the session |
void |
setBusy(boolean busy)Sets/Reset the busy flag for the session |
void |
setSessionID(java.lang.Object sessionID)Sets the session id object for the session |
void |
setTemporary()Sets the session to be a temporary one which may not have a long life span. |
| Method Detail |
|---|
boolean connect()
throws java.lang.Exception
true if the session connectedjava.lang.Exception - for an error while connecting
boolean reconnect()
throws java.lang.Exception
true if reconnect was successfuljava.lang.Exception - for an error while reconnectingboolean disconnect()
true if disconnectedboolean isConnected()
true if session is connectedboolean isValidConnection()
true if connection is validjava.util.ArrayList getAttributes()
ArrayList that holds all attributes needed for establishing a connection to the database - accessed with this method.void setAttributes(java.util.ArrayList attributes)
attributes - the session attributesjava.lang.Object getSessionID()
void setSessionID(java.lang.Object sessionID)
sessionID -java.util.ArrayList getErrorMessage()
boolean isBusy()
boolean getSetBusy()
void setBusy(boolean busy)
busy -boolean isTemporary()
void setTemporary()
ISession createNewSession()
java.lang.String getServerName()
java.lang.String getPassword()
java.lang.String getUserName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||