in bindings/servicemix-http/src/main/java/org/apache/servicemix/http/HttpConfiguration.java [831:945]
public boolean load() {
File f = null;
InputStream in = null;
if (rootDir != null) {
// try to find the property file in the workspace folder
f = new File(rootDir, CONFIG_FILE);
if (!f.exists()) {
f = null;
}
}
if (f == null) {
// find property file in classpath if it is not available in
// workspace
in = this.getClass().getClassLoader().getResourceAsStream(CONFIG_FILE);
if (in == null) {
return false;
}
}
try {
if (f != null) {
properties.load(new FileInputStream(f));
} else {
properties.load(in);
}
} catch (IOException e) {
throw new RuntimeException("Could not load component configuration", e);
}
if (properties.getProperty(componentName + ".jettyThreadPoolSize") != null) {
jettyThreadPoolSize = Integer.parseInt(properties.getProperty(componentName
+ ".jettyThreadPoolSize"));
}
if (properties.getProperty(componentName + ".jettyClientThreadPoolSize") != null) {
jettyClientThreadPoolSize = Integer.parseInt(properties
.getProperty(componentName + ".jettyClientThreadPoolSize"));
}
if (properties.getProperty(componentName + ".jettyClientPerProvider") != null) {
jettyClientPerProvider = Boolean.valueOf(properties.getProperty(componentName + ".jettyClientPerProvider"))
.booleanValue();
}
if (properties.getProperty(componentName + ".jettyConnectorClassName") != null) {
jettyConnectorClassName = properties.getProperty(componentName + ".jettyConnectorClassName");
}
if (properties.getProperty(componentName + ".streamingEnabled") != null) {
streamingEnabled = Boolean.valueOf(properties.getProperty(componentName + ".streamingEnabled"))
.booleanValue();
}
if (properties.getProperty(componentName + ".maxConnectionsPerHost") != null) {
maxConnectionsPerHost = Integer.parseInt(properties.getProperty(componentName
+ ".maxConnectionsPerHost"));
}
if (properties.getProperty(componentName + ".maxTotalConnections") != null) {
maxTotalConnections = Integer.parseInt(properties.getProperty(componentName
+ ".maxTotalConnections"));
}
if (properties.getProperty(componentName + ".keystoreManagerName") != null) {
keystoreManagerName = properties.getProperty(componentName + ".keystoreManagerName");
}
if (properties.getProperty(componentName + ".authenticationServiceName") != null) {
authenticationServiceName = properties.getProperty(componentName + ".authenticationServiceName");
}
if (properties.getProperty(componentName + ".jettyManagement") != null) {
jettyManagement = Boolean.valueOf(properties.getProperty(componentName + ".jettyManagement"))
.booleanValue();
}
if (properties.getProperty(componentName + ".connectorMaxIdleTime") != null) {
connectorMaxIdleTime = Integer.parseInt(properties.getProperty(componentName
+ ".connectorMaxIdleTime"));
}
if (properties.getProperty(componentName + ".soLingerTime") != null) {
soLingerTime = Integer.parseInt(properties.getProperty(componentName
+ ".soLingerTime"));
}
if (properties.getProperty(componentName + ".consumerProcessorSuspendTime") != null) {
consumerProcessorSuspendTime = Integer.parseInt(properties
.getProperty(componentName + ".consumerProcessorSuspendTime"));
}
if (properties.getProperty(componentName + ".providerExpirationTime") != null) {
providerExpirationTime = Integer.parseInt(properties
.getProperty(componentName + ".providerExpirationTime"));
}
if (properties.getProperty(componentName + ".clientConnectTimeout") != null) {
clientConnectTimeout = Integer.parseInt(properties
.getProperty(componentName + ".clientConnectTimeout"));
}
if (properties.getProperty(componentName + ".maxConnectionsPerAddress") != null) {
maxConnectionsPerAddress = Integer.parseInt(properties
.getProperty(componentName + ".maxConnectionsPerAddress"));
}
if (properties.getProperty(componentName + ".retryCount") != null) {
retryCount = Integer.parseInt(properties.getProperty(componentName + ".retryCount"));
}
if (properties.getProperty(componentName + ".proxyHost") != null) {
proxyHost = properties.getProperty(componentName + ".proxyHost");
}
if (properties.getProperty(componentName + ".proxyPort") != null) {
proxyPort = Integer.parseInt(properties.getProperty(componentName + ".proxyPort"));
}
if (properties.getProperty(componentName + ".wantHeadersFromHttpIntoExchange") != null) {
wantHeadersFromHttpIntoExchange = Boolean
.valueOf(properties.getProperty(componentName + ".wantHeadersFromHttpIntoExchange"))
.booleanValue();
}
if (properties.getProperty(componentName + ".preemptiveAuthentication") != null) {
preemptiveAuthentication = Boolean.valueOf(properties.getProperty(componentName + ".preemptiveAuthentication")).booleanValue();
}
if (properties.getProperty(componentName + ".useHostPortForAuthScope") != null) {
useHostPortForAuthScope = Boolean.valueOf(properties.getProperty(componentName + ".useHostPortForAuthScope")).booleanValue();
}
if (properties.getProperty(componentName + ".serverGracefulTimeout") != null) {
serverGracefulTimeout = Integer.parseInt(properties.getProperty(componentName + ".serverGracefulTimeout"));
}
return true;
}