|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object PageBoxLib.APIImpl
Class of the PageBox API.
Changes:
alexis.grandemange@pagebox.net
Copyright (c) 2002-2004 Alexis Grandemange
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License lesser.txt should be included in the distribution.
Nested Class Summary | |
(package private) class |
APIImpl.ExtensionImpl
Extension wrapper. |
(package private) class |
APIImpl.LogImpl
Logging class provided to PageBoxAPI users. |
Field Summary | |
(package private) ActiveNaming |
activeNaming
Active naming handle |
(package private) java.util.HashMap |
allowedExtensions
Allowed extensions Key: extension name Value: True |
(package private) java.util.HashMap |
allowedResources
Allowed resources Key: resource name Value: True |
static java.util.Hashtable |
APIs
Map of APIImpl instances Key: APIKey object Value: APIImpl object Hashtable used for synchronization. |
(package private) java.lang.String |
archDir
Archive root directory |
private java.util.TreeMap |
archives
Archives currently installed Key: archive name Value: Archive object |
(package private) java.lang.String |
archName
Archive name |
(package private) java.lang.String |
dbName
Database name |
(package private) Deployer |
deployer
Deploy Web service invoker |
(package private) Log |
log
Logging object |
private java.util.ArrayList |
pool
Connection pool. |
(package private) Querier |
querier
Deploy Web service invoker |
(package private) RuleHandler.Rule |
rule
Memory representation of rules.xml |
(package private) java.lang.String |
subUrl
URL of the DeployIF web service of the controlling PageBox |
(package private) TokenCallbackImpl |
tcbi
Token implementation handle |
(package private) static java.util.HashMap |
tcbis
Map of TokenCallbackImpl objects Key: working directory of a PageBox Value: TokenCallbackImpl object |
(package private) UsageIF |
usageProbe
Probe to collect resource usage data |
private java.lang.String |
workdir
Directory where XML and log files are defined |
Constructor Summary | |
private |
APIImpl(java.lang.String wd,
java.lang.String archDir,
java.lang.String archName)
Constructor. |
Method Summary | |
(package private) static APIImpl |
getAPI(java.lang.String archDir)
APIImpl Factory. |
(package private) java.lang.String[] |
getClones()
Retrieves the path of this archive clones. |
(package private) java.sql.Connection |
getConnection()
Get a connection from the connection pool. |
(package private) ExtensionIF |
getExtension(java.lang.String name,
java.lang.String parmClass,
java.lang.Object parm)
Get an extension provided by the PageBox. |
(package private) LogIF |
getLog()
Returns a Logging object. |
(package private) ResourceInfo |
getResource(java.lang.String name)
Get a resource.provided by the PageBox. |
(package private) ResourceUsage |
getResourceUsage()
Returns resource (CPU, memory) on this PageBox instance. |
(package private) void |
init(java.lang.String wd,
java.lang.String archDir,
java.lang.String archName)
Initialize environment.. |
void |
initialize()
rules.xml parsing. |
(package private) void |
relConnections()
Front end to release connections. |
(package private) static void |
relConnections(java.lang.String archDir)
Static front end to release connections. |
(package private) void |
relConns()
Releases the connection pool. |
(package private) static void |
relInactiveConnections(java.lang.String wd)
Static front end to release inactive connections. |
(package private) void |
relInactiveConns()
Release inactive connections of an APIImpl instance. |
private void |
restorePbArchs()
Restore the installed archive map from PbArchives.xml. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.util.Hashtable APIs
static java.util.HashMap tcbis
private java.lang.String workdir
Log log
private java.util.TreeMap archives
private java.util.ArrayList pool
java.lang.String dbName
java.lang.String archDir
java.lang.String archName
java.util.HashMap allowedExtensions
java.util.HashMap allowedResources
Deployer deployer
Querier querier
RuleHandler.Rule rule
TokenCallbackImpl tcbi
ActiveNaming activeNaming
java.lang.String subUrl
UsageIF usageProbe
Constructor Detail |
private APIImpl(java.lang.String wd, java.lang.String archDir, java.lang.String archName)
wd
- work directory of the controlling PageBoxarchDir
- archive directoryarchName
- archive nameMethod Detail |
static APIImpl getAPI(java.lang.String archDir)
archDir
- directory where the archive is definedstatic void relConnections(java.lang.String archDir)
archDir
- directory where the archive is definedfinal void init(java.lang.String wd, java.lang.String archDir, java.lang.String archName)
wd
- work directory of the controlling PageBoxarchDir
- archive directoryarchName
- archive namevoid relConnections()
LogIF getLog()
public void initialize()
private void restorePbArchs()
java.sql.Connection getConnection()
void relConns()
java.lang.String[] getClones()
ResourceInfo getResource(java.lang.String name)
ExtensionIF getExtension(java.lang.String name, java.lang.String parmClass, java.lang.Object parm)
name
- extension nameparmClass
- class of the parmparm
- extension constructor parameter
ResourceUsage getResourceUsage()
void relInactiveConns()
static void relInactiveConnections(java.lang.String wd)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |