|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.servlet.connectionMethods.ConnectionMethodManager
This class maintains a set of ConnectionMethods. Each ConnectionMethod is associated with an identification string (symbolic name). This ID string is used to retrieve a ConnectionMethod.
This class does not monitor the creation of ConnectionMethods. If you create one, you are responsible for adding it. These public methods are the only things that modify the set of ConnectionMethods managed by this class. (Note that this is different than the ServletManager, which is responsible for creating the Servlets it manages.)
ConnectionMethod
Field Summary | |
static java.lang.String |
APACHE
|
static java.lang.String |
BIND_ADDR
|
static java.lang.String |
CGI
|
static java.lang.String |
CLIENT_TIMEOUT
|
static java.lang.String |
CONNECTION
|
static java.lang.String |
CONNECTION_METHOD
|
static java.lang.String |
ENHYDRADIRECTOR
|
static java.lang.String |
ENHYDRADIRECTOR_CONNECTION
|
static java.lang.String |
HTTP
|
static java.lang.String |
HTTP_CONNECTION
|
static java.lang.String |
HTTPS
|
static java.lang.String |
HTTPS_CONNECTION
|
static java.lang.String |
IIS
|
protected static org.apache.log4j.Logger |
logger
The logging channel. |
static java.lang.String |
NUM_THREADS
|
static java.lang.String |
PORT
|
static java.lang.String |
QUEUE_SIZE
|
static java.lang.String |
RMI
|
static java.lang.String |
SERVER_HOST
|
static java.lang.String |
SERVER_PORT
|
static java.lang.String |
THREAD_TIMEOUT
|
static java.lang.String |
TYPE
|
static java.lang.String |
WAI
|
Constructor Summary | |
ConnectionMethodManager()
Create a new, empty, ConnectionMethodManager. |
Method Summary | |
void |
add(java.lang.String connectionID,
ConnectionMethod cm)
Add a ConnectionMethod to the set. |
protected void |
addConnectionMethod(Config connectionConfig,
java.lang.String id)
This function will try to retrieve a Class object for the given connection method. |
void |
createConnectionSection(Config config)
Asks each connection method to write itself out to the config file |
void |
delete(java.lang.String connectionID)
Remove a ConnectionMethod from the set. |
ConnectionMethod |
get(java.lang.String connectionID)
Look up a ConnectionMethod from the set, by its identifier string. |
java.util.Hashtable |
getDefaultConnectionMethods()
Return the hashtable of 'default' connection methods plus any additional connection methods found in the conf file maked as ConnectionMethod. |
java.lang.String[] |
getIDs()
Get all the names of the ConnectionMethods currently in the set. |
java.lang.String |
getUniqueName()
Generate a unique name that is not currently in the table. |
void |
initConnectionMethods(Config config)
Parse the Connection section of the config file and attempt to create all specified connection types. |
java.lang.String |
toString()
Returns a multi-line list of the contents of this manager, connection methods and channels. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String PORT
public static final java.lang.String BIND_ADDR
public static final java.lang.String NUM_THREADS
public static final java.lang.String QUEUE_SIZE
public static final java.lang.String THREAD_TIMEOUT
public static final java.lang.String CLIENT_TIMEOUT
public static final java.lang.String SERVER_HOST
public static final java.lang.String SERVER_PORT
public static final java.lang.String CONNECTION_METHOD
public static final java.lang.String CONNECTION
public static final java.lang.String TYPE
public static final java.lang.String APACHE
public static final java.lang.String CGI
public static final java.lang.String HTTP
public static final java.lang.String HTTPS
public static final java.lang.String IIS
public static final java.lang.String RMI
public static final java.lang.String WAI
public static final java.lang.String ENHYDRADIRECTOR
public static final java.lang.String HTTP_CONNECTION
public static final java.lang.String HTTPS_CONNECTION
public static final java.lang.String ENHYDRADIRECTOR_CONNECTION
protected static org.apache.log4j.Logger logger
Constructor Detail |
public ConnectionMethodManager()
Method Detail |
public void initConnectionMethods(Config config) throws ConnectionMethodException
config
- The config object representating the config file
ConnectionMethodException
- if a specified connection
method does not exist or the connection method fails
to initialize itself properly.protected void addConnectionMethod(Config connectionConfig, java.lang.String id) throws ConnectionMethodException
connectionConfig
- The portion of the config file relevant to
this connection methodid
- The id associated with this connection method
ConnectionMethodException
- if a specified connection
method does not exist or the connection method fails to initialize
itself properly.public void add(java.lang.String connectionID, ConnectionMethod cm) throws ConnectionMethodException
connectionID
- The name to use to refer to the ConnectionMethod.cm
- The ConnectionMethod to store.
ConnectionMethodException
- If the ID is already in use.public ConnectionMethod get(java.lang.String connectionID)
connectionID
- The symbolic name to look up.
public java.lang.String[] getIDs()
public java.util.Hashtable getDefaultConnectionMethods()
public void delete(java.lang.String connectionID) throws ConnectionMethodException
connectionID
- The name of the ConnectionMethod to remove.
ConnectionMethodException
- If the ID is not found.public java.lang.String getUniqueName()
public void createConnectionSection(Config config) throws ConfigException, KeywordValueException
config
- The config file
ConfigException
KeywordValueException
public java.lang.String toString()
toString
in class java.lang.Object
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |