|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.adt.topology.handler.ConfigurationHandler
public abstract class ConfigurationHandler
The ConfigurationHandler abstract class specifies the interface that must be implemented in order to parse a file or directory on the file system and return a list of providers that are regeistered to handle this type of artifact. All provider implementations must implement a provider-specific ConfigurationHandler class, though it is also possible to create a ConfigurationHandler that parses a given location and delegates the detection of providers to the provider-specific ConfigurationHandlers that are registered with TopologyService.
TopologyServiceFactory.getRegisteredConfigurationHandlers()
Field Summary | |
---|---|
protected static TopologyServiceLogger |
logger
|
Constructor Summary | |
---|---|
ConfigurationHandler()
|
Method Summary | |
---|---|
protected java.lang.String |
getInstanceName(java.lang.String providerType,
java.lang.String location)
A helper method to build a default instance name to be displayed when the configuration is loaded. |
protected java.lang.String |
getNameFromLocation(java.lang.String location)
A helper method to build a default name from a location. |
ProviderInfo[] |
getProviders(java.lang.String location)
Parses through the specified location and returns required provider types that must be instantiated to handle the contained files. |
protected static void |
logInfo(java.lang.String string)
Helper method to log an informational message. |
protected static void |
logWarning(java.lang.String string)
Helper method to log a warning message. |
protected static void |
logWarning(java.lang.String string,
java.lang.Exception e)
Helper method to a log an exception along with a warning message. |
abstract ProviderInfo[] |
parseLocation(java.lang.String location)
Method implemented by a ConfigurationHandler implementation to parse through the specified location to determine if the location contains data relevant to the provider type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static TopologyServiceLogger logger
Constructor Detail |
---|
public ConfigurationHandler()
Method Detail |
---|
public abstract ProviderInfo[] parseLocation(java.lang.String location) throws TopologyHandlerException
location
- the location to parse in the form of a file or directory
TopologyHandlerException
public final ProviderInfo[] getProviders(java.lang.String location) throws TopologyHandlerException
location
- the location to parse in the form of a file or directory
TopologyHandlerException
protected java.lang.String getInstanceName(java.lang.String providerType, java.lang.String location)
providerType
- the provider typelocation
- the location
protected java.lang.String getNameFromLocation(java.lang.String location)
location
- the location
protected static void logInfo(java.lang.String string)
string
- the message to logprotected static void logWarning(java.lang.String string)
string
- the message to logprotected static void logWarning(java.lang.String string, java.lang.Exception e)
string
- the message to loge
- the Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |