|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.manifoldcf.core.database.BaseTable
org.apache.manifoldcf.crawler.connectors.webcrawler.CookieManager
public class CookieManager
This class manages the database table into which we write cookies. The data resides in the database, as well as in cache (up to a certain point). The result is that there is a memory limited, database-backed repository of cookies that we can draw on.
| Nested Class Summary | |
|---|---|
protected static class |
CookieManager.CookiesCacheClass
Cache class for robots. |
protected static class |
CookieManager.CookiesDescription
This is the object description for a session key object. |
protected static class |
CookieManager.CookiesExecutor
This is the executor object for locating cookies session objects. |
protected static class |
CookieManager.DynamicCookieSet
This is a set of cookies, built dynamically. |
| Field Summary | |
|---|---|
static java.lang.String |
_rcsid
|
protected static java.lang.String |
commentField
|
protected static java.lang.String |
commentURLField
|
protected static CookieManager.CookiesCacheClass |
cookiesCacheClass
|
protected static java.lang.String |
discardField
|
protected static java.lang.String |
domainField
|
protected static java.lang.String |
domainSpecifiedField
|
protected static java.lang.String |
expirationDateField
|
protected static java.lang.String |
keyField
|
protected static java.lang.String |
nameField
|
protected static java.lang.String |
ordinalField
|
protected static java.lang.String |
pathField
|
protected static java.lang.String |
pathSpecifiedField
|
protected static java.lang.String |
portBlankField
|
protected static java.lang.String |
portField
|
protected static java.lang.String |
portSpecifiedField
|
protected static java.lang.String |
secureField
|
protected static java.lang.String |
valueField
|
protected static java.lang.String |
versionField
|
protected static java.lang.String |
versionSpecifiedField
|
| Fields inherited from class org.apache.manifoldcf.core.database.BaseTable |
|---|
dbInterface, tableName |
| Constructor Summary | |
|---|---|
CookieManager(org.apache.manifoldcf.core.interfaces.IThreadContext tc,
org.apache.manifoldcf.core.interfaces.IDBInterface database)
Constructor. |
|
| Method Summary | |
|---|---|
protected static java.lang.String |
booleanToString(boolean value)
Convert a boolean to a boolean string. |
void |
deinstall()
Uninstall the manager. |
protected static java.lang.String |
getCookiesCacheKey(java.lang.String sessionKey)
Construct a global key which represents an individual session. |
void |
install()
Install the manager. |
protected static java.lang.String |
portsToString(int[] ports)
Convert a port array to a string. |
LoginCookies |
readCookies(java.lang.String sessionKey)
Read cookies currently in effect for a given session key. |
protected LoginCookies |
readCookiesUncached(java.lang.String sessionKey)
Read cookies from database, uncached. |
protected static boolean |
stringToBoolean(java.lang.String value)
Convert a boolean string to a boolean. |
protected static int[] |
stringToPorts(java.lang.String value)
Convert a string to a port array. |
void |
updateCookies(java.lang.String sessionKey,
LoginCookies cookies)
Update cookes that are in effect for a given session key. |
| Methods inherited from class org.apache.manifoldcf.core.database.BaseTable |
|---|
addTableIndex, analyzeTable, beginTransaction, constructDistinctOnClause, constructOffsetLimitClause, constructRegexpClause, constructSubstringClause, endTransaction, getDatabaseCacheKey, getDBInterface, getMaxInClause, getMaxOrClause, getTableIndexes, getTableName, getTableSchema, getTransactionID, makeTableKey, noteModifications, performAddIndex, performAlter, performCreate, performDelete, performDrop, performInsert, performLock, performModification, performQuery, performQuery, performRemoveIndex, performUpdate, prepareRowForSave, readRow, reindexTable, signalRollback |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String _rcsid
protected static CookieManager.CookiesCacheClass cookiesCacheClass
protected static final java.lang.String keyField
protected static final java.lang.String ordinalField
protected static final java.lang.String domainSpecifiedField
protected static final java.lang.String domainField
protected static final java.lang.String nameField
protected static final java.lang.String valueField
protected static final java.lang.String pathSpecifiedField
protected static final java.lang.String pathField
protected static final java.lang.String versionSpecifiedField
protected static final java.lang.String versionField
protected static final java.lang.String commentField
protected static final java.lang.String secureField
protected static final java.lang.String expirationDateField
protected static final java.lang.String discardField
protected static final java.lang.String commentURLField
protected static final java.lang.String portBlankField
protected static final java.lang.String portSpecifiedField
protected static final java.lang.String portField
| Constructor Detail |
|---|
public CookieManager(org.apache.manifoldcf.core.interfaces.IThreadContext tc,
org.apache.manifoldcf.core.interfaces.IDBInterface database)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
tc - is the thread context.database - is the database handle.
org.apache.manifoldcf.core.interfaces.ManifoldCFException| Method Detail |
|---|
public void install()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public void deinstall()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public LoginCookies readCookies(java.lang.String sessionKey)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
sessionKey - is the session key.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
public void updateCookies(java.lang.String sessionKey,
LoginCookies cookies)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
sessionKey - is the session key.cookies - are the cookies to write into the database.
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected static java.lang.String getCookiesCacheKey(java.lang.String sessionKey)
sessionKey - is the session key.
protected LoginCookies readCookiesUncached(java.lang.String sessionKey)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
sessionKey - is the session key.
org.apache.manifoldcf.core.interfaces.ManifoldCFException
protected static boolean stringToBoolean(java.lang.String value)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected static java.lang.String booleanToString(boolean value)
protected static int[] stringToPorts(java.lang.String value)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected static java.lang.String portsToString(int[] ports)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||