|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.experlog.openeas.api.Session
public class Session
A web client session
Constructor Summary | |
---|---|
protected |
Session(Client s)
|
Method Summary | |
---|---|
void |
closeConnection(java.sql.Connection c,
java.lang.String dsn)
Send a database connection back to the pool (logical "close") |
void |
debug(java.lang.String msg)
|
static Session |
findClient(java.lang.String id)
Find an existing session given a session id. |
AppConfiguration |
getAppConfiguration()
Get the application configuration |
static Session |
getClient(java.lang.String id,
javax.servlet.http.HttpServletRequest req)
Find or create a session given a session id. |
java.lang.String |
getClientId()
Get the session Id (to recognize who is connected) |
java.sql.Connection |
getConnection(java.lang.String datasourcename)
Obtain a database connection from the pool |
Cookie |
getCookie()
Get the client info |
protected OpenClient |
getSession()
|
void |
logRequest(java.lang.String dsn,
java.lang.String request)
|
DbObject |
newDbObject(java.lang.String table,
java.sql.ResultSet rs)
|
void |
resetTimer()
|
java.lang.String |
sqlEncode(java.lang.String s)
|
java.lang.String |
sqlEncode(java.lang.String datasourcename,
java.lang.String s)
|
void |
trace(java.lang.String msg)
|
void |
updateDB(java.lang.String sql)
Issue a database update on the default datasource |
void |
updateDB(java.lang.String datasourcename,
java.lang.String sql)
Issue a database update on a specified datasource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Session(Client s)
Method Detail |
---|
protected OpenClient getSession()
public DbObject newDbObject(java.lang.String table, java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException
public AppConfiguration getAppConfiguration()
public Cookie getCookie()
public java.lang.String getClientId()
public static Session findClient(java.lang.String id)
public static Session getClient(java.lang.String id, javax.servlet.http.HttpServletRequest req) throws java.lang.Exception
java.lang.Exception
public java.sql.Connection getConnection(java.lang.String datasourcename) throws java.lang.Exception
datasourcename
-
java.lang.Exception
public void closeConnection(java.sql.Connection c, java.lang.String dsn) throws java.sql.SQLException
c
- the database connection to "close"dsn
- the datasource name
java.sql.SQLException
public void logRequest(java.lang.String dsn, java.lang.String request)
public void updateDB(java.lang.String sql) throws java.sql.SQLException, java.lang.Exception
sql
- the SQL (update or insert) request
java.sql.SQLException
java.lang.Exception
public void updateDB(java.lang.String datasourcename, java.lang.String sql) throws java.sql.SQLException, java.lang.Exception
datasourcename
- the data source namesql
- the SQL (update or insert) request
java.sql.SQLException
java.lang.Exception
public void debug(java.lang.String msg)
public void trace(java.lang.String msg)
public java.lang.String sqlEncode(java.lang.String s)
public java.lang.String sqlEncode(java.lang.String datasourcename, java.lang.String s)
public void resetTimer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |