001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.apache.servicemix.http;
018
019 import java.io.File;
020 import java.io.FileInputStream;
021 import java.io.FileOutputStream;
022 import java.io.IOException;
023 import java.io.InputStream;
024 import java.util.Properties;
025
026 import org.mortbay.jetty.nio.SelectChannelConnector;
027
028 /**
029 * Class to hold the configuration for the Jetty instance used by an HTTP
030 * endpoint.
031 *
032 * @author gnodet
033 * @org.apache.xbean.XBean element="configuration"
034 * description="configuration for the Jetty instance used by an HTTP endpoint"
035 */
036 public class HttpConfiguration implements HttpConfigurationMBean {
037
038 public static final String DEFAULT_JETTY_CONNECTOR_CLASS_NAME = SelectChannelConnector.class.getName();
039 public static final String MAPPING_DEFAULT = "/jbi";
040 public static final String CONFIG_FILE = "component.properties";
041
042 private String rootDir;
043 private String componentName = "servicemix-http";
044 private Properties properties = new Properties();
045 private boolean streamingEnabled;
046 private String jettyConnectorClassName = DEFAULT_JETTY_CONNECTOR_CLASS_NAME;
047 private transient Object keystoreManager;
048 private transient Object authenticationService;
049
050 /**
051 * The JNDI name of the AuthenticationService object
052 */
053 private String authenticationServiceName = "java:comp/env/smx/AuthenticationService";
054
055 /**
056 * The JNDI name of the KeystoreManager object
057 */
058 private String keystoreManagerName = "java:comp/env/smx/KeystoreManager";
059
060 /**
061 * The maximum number of threads for the Jetty thread pool. It's set to 255
062 * by default to match the default value in Jetty.
063 */
064 private int jettyThreadPoolSize = 255;
065
066 /**
067 * The maximum number of threads for the jetty client thread pool. It's set
068 * to 16 to match the default value in Jetty.
069 */
070 private int jettyClientThreadPoolSize = 16;
071
072 /**
073 * Configuration to switch from shared jetty client for all
074 * HttpProviderEndpoints to jetty client per HttpProviderEndpoint. It's
075 * default value is false.
076 */
077 private boolean jettyClientPerProvider;
078
079 /**
080 * Maximum number of concurrent requests to the same host.
081 */
082 private int maxConnectionsPerHost = 65536;
083
084 /**
085 * Maximum number of concurrent requests.
086 */
087 private int maxTotalConnections = 65536;
088
089 /**
090 * If true, use register jetty mbeans
091 */
092 private boolean jettyManagement;
093
094 /**
095 * If the component is deployed in a web container and uses a servlet
096 * instead of starting its own web server.
097 */
098 private boolean managed;
099
100 /**
101 * When managed is true, this is the servlet mapping used to access the
102 * component.
103 */
104 private transient String mapping = MAPPING_DEFAULT;
105
106 /**
107 * Jetty connector max idle time (default value in jetty is 30000msec)
108 **/
109 private int connectorMaxIdleTime = 30000;
110
111 /**
112 * HttpConsumerProcessor continuation suspend time (default value in
113 * servicemix is 60000msec)
114 */
115 private int consumerProcessorSuspendTime = 60000;
116
117 /**
118 * Number of times a given HTTP request will be tried until successful. If
119 * streaming is enabled, the value will always be 0.
120 */
121 private int retryCount = 3;
122
123 /**
124 * Proxy hostname. Component wide configuration, used either for http or
125 * https connections. Can be overriden on a endpoint basis.
126 */
127 private String proxyHost;
128
129 /**
130 * Proxy listening port. Component wide configuration, used either for http
131 * or https connections. Can be overriden on a endpoint basis.
132 */
133 private int proxyPort;
134
135 /**
136 * This field is used to decide if the http provider processor can copy the
137 * http headers from the http response into the exchange as property. Be
138 * careful if the headers will be used for a new http reuquest, it leads to
139 * an error.
140 */
141 private boolean wantHeadersFromHttpIntoExchange;
142
143 /**
144 * @return Returns the rootDir.
145 * @org.apache.xbean.Property hidden="true"
146 */
147 public String getRootDir() {
148 return rootDir;
149 }
150
151 /**
152 * @param rootDir The rootDir to set.
153 */
154 public void setRootDir(String rootDir) {
155 this.rootDir = rootDir;
156 }
157
158 /**
159 * @return Returns the componentName.
160 * @org.apache.xbean.Property hidden="true"
161 */
162 public String getComponentName() {
163 return componentName;
164 }
165
166 /**
167 * @param componentName The componentName to set.
168 */
169 public void setComponentName(String componentName) {
170 this.componentName = componentName;
171 }
172
173 /**
174 * @return the mapping
175 */
176 public String getMapping() {
177 return mapping;
178 }
179
180 /**
181 * @param mapping the mapping to set
182 */
183 public void setMapping(String mapping) {
184 if (!mapping.startsWith("/")) {
185 mapping = "/" + mapping;
186 }
187 if (mapping.endsWith("/")) {
188 mapping = mapping.substring(0, mapping.length() - 1);
189 }
190 this.mapping = mapping;
191 }
192
193 /**
194 * @return the managed
195 */
196 public boolean isManaged() {
197 return managed;
198 }
199
200 /**
201 * @param managed the managed to set
202 */
203 public void setManaged(boolean managed) {
204 this.managed = managed;
205 }
206
207 /**
208 * @return the jettyManagement
209 */
210 public boolean isJettyManagement() {
211 return jettyManagement;
212 }
213
214 /**
215 * @param jettyManagement the jettyManagement to set
216 */
217 public void setJettyManagement(boolean jettyManagement) {
218 this.jettyManagement = jettyManagement;
219 }
220
221 /**
222 * Gets the authentication service being used.
223 *
224 * @return the authenticationService object
225 */
226 public Object getAuthenticationService() {
227 return authenticationService;
228 }
229
230 /**
231 * Directly sets the authenitcation service object to be used for
232 * authentication. This object takes precedence over the JNDI name specified
233 * by <code>setAuthenticationServiceName</code>.
234 *
235 * @param authenticationService the authenticationService object
236 * @org.apache.xbean.Property description=
237 * "the authentication service object. This property takes precedence over
238 * <code>authenticationServiceName</code>."
239 */
240 public void setAuthenticationService(Object authenticationService) {
241 this.authenticationService = authenticationService;
242 }
243
244 /**
245 * Gets the JNDI name of the authentication service object.
246 *
247 * @return a string representing the JNDI name for the authentication
248 * service object.
249 */
250 public String getAuthenticationServiceName() {
251 return authenticationServiceName;
252 }
253
254 /**
255 * Sets the JNDI name of the authentication service object.
256 *
257 * @param authenticationServiceName a string representing the JNDI name for
258 * the authentication service object.
259 * @org.apache.xbean.Property description="the JNDI name of the authentication service object. The default is java:comp/env/smx/AuthenticationService."
260 */
261 public void setAuthenticationServiceName(String authenticationServiceName) {
262 this.authenticationServiceName = authenticationServiceName;
263 save();
264 }
265
266 /**
267 * Gets the object used as the keystore manager.
268 *
269 * @return the keystoreManager object
270 */
271 public Object getKeystoreManager() {
272 return keystoreManager;
273 }
274
275 /**
276 * Directly sets the keystore manager object to be used for authentication.
277 * This object takes precedence over the JNDI name specified by
278 * <code>setKeystoreManagerName</code>.
279 *
280 * @param keystoreManager the keystoreManager object
281 * @org.apache.xbean.Property
282 * description="the keystore object. This property takes precedence over
283 * <code>keystoreManagerName</code>."
284 */
285 public void setKeystoreManager(Object keystoreManager) {
286 this.keystoreManager = keystoreManager;
287 }
288
289 /**
290 * Gets the JNDI name of the keystore manager object.
291 *
292 * @return a string representing the JNDI name for the keystore manager
293 * object.
294 */
295 public String getKeystoreManagerName() {
296 return keystoreManagerName;
297 }
298
299 /**
300 * Sets the JNDI name of the keystore manager object.
301 *
302 * @param keystoreManagerName a string representing the JNDI name for the
303 * keystore manager object.
304 * @org.apache.xbean.Property description="the JNDI name of the keystore manager object. The default is java:comp/env/smx/KeystoreManager."
305 */
306 public void setKeystoreManagerName(String keystoreManagerName) {
307 this.keystoreManagerName = keystoreManagerName;
308 save();
309 }
310
311 /**
312 * Determines if client-side requests use HTTP streaming.
313 *
314 * @return true if client-side requests use streaming
315 */
316 public boolean isStreamingEnabled() {
317 return streamingEnabled;
318 }
319
320 /**
321 * Sets whether or not client-side requests use HTTP streaming.
322 *
323 * @param streamingEnabled Set to true to enable client-side HTTP streaming.
324 * @org.apache.xbean.Property
325 * description="Specifies if client-side requests use HTTP streaming."
326 */
327 public void setStreamingEnabled(boolean streamingEnabled) {
328 this.streamingEnabled = streamingEnabled;
329 save();
330 }
331
332 /**
333 * Returns the name of the class implementing the Jetty connector used by an
334 * HTTP endpoint.
335 *
336 * @return a string representing the classname of the Jetty conector being
337 * used
338 */
339 public String getJettyConnectorClassName() {
340 return jettyConnectorClassName;
341 }
342
343 /**
344 * Sets the classname of the Jetty connector used by an HTTP endpoint.
345 *
346 * @param jettyConnectorClassName a String representing the classname of the
347 * Jetty connector to use.
348 * @org.apache.xbean.Property
349 * description="the classname of the Jetty connector used by the endpoint"
350 */
351 public void setJettyConnectorClassName(String jettyConnectorClassName) {
352 this.jettyConnectorClassName = jettyConnectorClassName;
353 save();
354 }
355
356 /**
357 * Gets the number of maximum number of threads in the server-side
358 * threadpool.
359 *
360 * @return an integer representing the maximum number of threads in the
361 * server-side threadpool
362 */
363 public int getJettyThreadPoolSize() {
364 return jettyThreadPoolSize;
365 }
366
367 /**
368 * Sets the maximum number of threads in the server-side thread pool. The
369 * default is 255 to match Jetty's default setting.
370 *
371 * @param jettyThreadPoolSize an integer representing the maximum number of
372 * threads in the server-side thread pool
373 * @org.apache.xbean.Property description="the maximum number of threads in the server-side threadpool. The default setting is 255."
374 */
375 public void setJettyThreadPoolSize(int jettyThreadPoolSize) {
376 this.jettyThreadPoolSize = jettyThreadPoolSize;
377 save();
378 }
379
380 /**
381 * Get the maximum number of threads in the client-side thread pool.
382 *
383 * @return an int representing the maximum number of threads in the
384 * client-side thread pool.
385 */
386 public int getJettyClientThreadPoolSize() {
387 return jettyClientThreadPoolSize;
388 }
389
390 /**
391 * Sets the maximum number of threads in the client-side thread pool.
392 *
393 * @param jettyClientThreadPoolSize an int specifiying the maximum number of
394 * threads available in the client-side thread pool
395 * @org.apache.xbean.Property description="the maximum number of threads in the client-side threadpool. The default setting is 16."
396 */
397 public void setJettyClientThreadPoolSize(int jettyClientThreadPoolSize) {
398 this.jettyClientThreadPoolSize = jettyClientThreadPoolSize;
399 save();
400 }
401
402 /**
403 * Determines if each HTTP provider endpoint uses its own Jetty client. The
404 * default is for all HTTP provider endpoints to use a shared Jetty client.
405 *
406 * @return true if HTTP providers use individual Jetty clients
407 */
408 public boolean isJettyClientPerProvider() {
409 return jettyClientPerProvider;
410 }
411
412 /**
413 * Specifies whether each HTTP provider endpoint uses its own Jetty client.
414 * The default behavior is that all HTTP provider endpoints use a shrared
415 * Jetty client.
416 *
417 * @param jettyClientProvider <code>true</code> if HTTP providers are to use
418 * individual Jetty clients
419 * @org.apache.xbean.Property description="Specifies if HTTP provider endpoints share a Jetty client or use per-endpoint Jetty clients. The default setting is
420 * <code>false</code> meaning that all provider
421 * endpoints use a shared Jetty client."
422 */
423 public void setJettyClientPerProvider(boolean jettyClientPerProvider) {
424 this.jettyClientPerProvider = jettyClientPerProvider;
425 save();
426 }
427
428 /**
429 * Gets the maximum number of concurent requests allowed from a particular
430 * host.
431 *
432 * @return an int representing the maximum number of connections
433 */
434 public int getMaxConnectionsPerHost() {
435 return maxConnectionsPerHost;
436 }
437
438 /**
439 * Sets the maximum number of connections allowed from a particular host.
440 * The default is 65536.
441 *
442 * @param maxConnectionsPerHost an int specifying the max number of
443 * connecitons
444 * @org.apache.xbean.Property description="the maximum number of concurent connections allowed from a host. The default is 65536."
445 */
446 public void setMaxConnectionsPerHost(int maxConnectionsPerHost) {
447 this.maxConnectionsPerHost = maxConnectionsPerHost;
448 save();
449 }
450
451 /**
452 * Gets the maximum number of concurent connections allowed to an endpoint.
453 *
454 * @return an int representing the total number of allowed concurrent
455 * connections
456 */
457 public int getMaxTotalConnections() {
458 return maxTotalConnections;
459 }
460
461 /**
462 * Sets the maximum number of total concurrent connections allowed to an
463 * endpoint.
464 *
465 * @param maxTotalConnections an int specifying the total number of
466 * concurrent connections allowed to an endpoint
467 * @org.apache.xbean.Property description="the maximum number of total concurent connections allowed to an endpoint. The default is 65536."
468 */
469 public void setMaxTotalConnections(int maxTotalConnections) {
470 this.maxTotalConnections = maxTotalConnections;
471 save();
472 }
473
474 /**
475 * Gets the amount of time, in milliseconds, that a connection will sit idle
476 * before timing out.
477 *
478 * @return an int representing the number of milliseconds before an idle
479 * connection will timeout
480 */
481 public int getConnectorMaxIdleTime() {
482 return connectorMaxIdleTime;
483 }
484
485 /**
486 * Sets the amount of time, in milliseconds, that a connection will sit idle
487 * before timing out. The default is 30000.
488 *
489 * @param connectorMaxIdleTime an int specifying the number of milliseconds
490 * that a connection will sit idle before timing out
491 * @org.apache.xbean.Property description="the number of miliseconds a connection will be idle before timing out. The default is 30000."
492 */
493 public void setConnectorMaxIdleTime(int connectorMaxIdleTime) {
494 this.connectorMaxIdleTime = connectorMaxIdleTime;
495 save();
496 }
497
498 /**
499 * Gets the number of milliseconds passed to the <code>susspend</code>
500 * method of the Jetty <code>Continuation</code> object used to process
501 * requests.
502 *
503 * @return an int representing the number of milliseconds the Jetty
504 * <code>Continuation</code> object will susspend the processing of
505 * the current request
506 */
507 public int getConsumerProcessorSuspendTime() {
508 return consumerProcessorSuspendTime;
509 }
510
511 /**
512 * Sets the number of milliseconds passed to the <code>susspend</code>
513 * method of the Jetty <code>Continuation</code> object used to process
514 * requests. The <code>Continuation</code> object is used to optimize
515 * connection resources when the endpoint is under heavy load. The default
516 * is 60000.
517 *
518 * @param consumerProcessorSuspendTime an int representing the number of
519 * milliseconds the Jetty <code>Continuation</code> object will
520 * susspend the processing of the current request
521 * @org.apache.xbean.Property description="the number of miliseconds Jetty will susspend the processing of a request. The default is 60000."
522 */
523 public void setConsumerProcessorSuspendTime(int consumerProcessorSuspendTime) {
524 this.consumerProcessorSuspendTime = consumerProcessorSuspendTime;
525 save();
526 }
527
528 /**
529 * Gets the number of times a request will be tried before an error is
530 * created.
531 *
532 * @return an int representing the number of times a request will be
533 * attempted before an error is raised
534 */
535 public int getRetryCount() {
536 return retryCount;
537 }
538
539 /**
540 * Sets the number of times a request will be tried before an error is
541 * created. The default is 3. If streaming is enabled, the value will always
542 * be 0.
543 *
544 * @param retryCount an int representing the number of times a request will
545 * be attempted before an error is raised
546 * @org.apache.xbean.Property description="the number of times a request will be attempted without succees before an error is created. The default is 3. If streaming is enabled, the value will always be 0."
547 */
548 public void setRetryCount(int retryCount) {
549 this.retryCount = retryCount;
550 save();
551 }
552
553 /**
554 * @return Returns the proxyHost.
555 */
556 public String getProxyHost() {
557 return this.proxyHost;
558 }
559
560 /**
561 * @param proxyHost The proxyHost to set.
562 * @org.apache.xbean.Property description="the default proxy host name used to send requests. This can be overridden by each endpoint."
563 */
564 public void setProxyHost(String proxyHost) {
565 this.proxyHost = proxyHost;
566 save();
567 }
568
569 /**
570 * @return Returns the proxyPort.
571 */
572 public int getProxyPort() {
573 return this.proxyPort;
574 }
575
576 /**
577 * @param proxyPort The proxyPort to set.
578 * @org.apache.xbean.Property description="the default proxy port used to send requests. This can be overridden by each endpoint."
579 */
580 public void setProxyPort(int proxyPort) {
581 this.proxyPort = proxyPort;
582 save();
583 }
584
585 /**
586 * Determines if the HTTP provider processor copies the HTTP headers from
587 * the HTTP response into the JBI exchange.
588 *
589 * @return <code>true</code> if the HTTP headers will be copied into the
590 * exchange
591 */
592 public boolean isWantHeadersFromHttpIntoExchange() {
593 return wantHeadersFromHttpIntoExchange;
594 }
595
596 /**
597 * Specifies if the HTTP provider processor copies the HTTP headers from the
598 * HTTP response into the JBI exchange. If the headers will be used for a
599 * new HTTP reuquest, setting this to <code>true</code> leads to an error.
600 *
601 * @param wantHeadersFromHttpIntoExchange <code>true</code> if the HTTP
602 * headers will be copied into the exchange
603 * @org.apache.xbean.Property description="Specifies if the HTTP provider will copy the HTTP request headers into the JBI exchange. The default is
604 * <code>false</code>."
605 */
606 public void setWantHeadersFromHttpIntoExchange(boolean wantHeadersFromHttpIntoExchange) {
607 this.wantHeadersFromHttpIntoExchange = wantHeadersFromHttpIntoExchange;
608 }
609
610 public void save() {
611 setProperty(componentName + ".jettyThreadPoolSize", Integer.toString(jettyThreadPoolSize));
612 setProperty(componentName + ".jettyClientThreadPoolSize", Integer.toString(jettyClientThreadPoolSize));
613 setProperty(componentName + ".jettyClientPerProvider", Boolean.toString(jettyClientPerProvider));
614 setProperty(componentName + ".jettyConnectorClassName", jettyConnectorClassName);
615 setProperty(componentName + ".streamingEnabled", Boolean.toString(streamingEnabled));
616 setProperty(componentName + ".maxConnectionsPerHost", Integer.toString(maxConnectionsPerHost));
617 setProperty(componentName + ".maxTotalConnections", Integer.toString(maxTotalConnections));
618 setProperty(componentName + ".keystoreManagerName", keystoreManagerName);
619 setProperty(componentName + ".authenticationServiceName", authenticationServiceName);
620 setProperty(componentName + ".jettyManagement", Boolean.toString(jettyManagement));
621 setProperty(componentName + ".connectorMaxIdleTime", Integer.toString(connectorMaxIdleTime));
622 setProperty(componentName + ".consumerProcessorSuspendTime", Integer
623 .toString(consumerProcessorSuspendTime));
624 setProperty(componentName + ".retryCount", Integer.toString(retryCount));
625 setProperty(componentName + ".proxyHost", proxyHost);
626 setProperty(componentName + ".proxyPort", Integer.toString(proxyPort));
627 setProperty(componentName + ".wantHeadersFromHttpIntoExchange", Boolean
628 .toString(wantHeadersFromHttpIntoExchange));
629 if (rootDir != null) {
630 File f = new File(rootDir, CONFIG_FILE);
631 try {
632 this.properties.store(new FileOutputStream(f), null);
633 } catch (Exception e) {
634 throw new RuntimeException("Could not store component configuration", e);
635 }
636 }
637 }
638
639 protected void setProperty(String name, String value) {
640 if (value == null) {
641 properties.remove(name);
642 } else {
643 properties.setProperty(name, value);
644 }
645 }
646
647 public boolean load() {
648 File f = null;
649 InputStream in = null;
650 if (rootDir != null) {
651 // try to find the property file in the workspace folder
652 f = new File(rootDir, CONFIG_FILE);
653 if (!f.exists()) {
654 f = null;
655 }
656 }
657 if (f == null) {
658 // find property file in classpath if it is not available in
659 // workspace
660 in = this.getClass().getClassLoader().getResourceAsStream(CONFIG_FILE);
661 if (in == null) {
662 return false;
663 }
664 }
665
666 try {
667 if (f != null) {
668 properties.load(new FileInputStream(f));
669 } else {
670 properties.load(in);
671 }
672 } catch (IOException e) {
673 throw new RuntimeException("Could not load component configuration", e);
674 }
675 if (properties.getProperty(componentName + ".jettyThreadPoolSize") != null) {
676 jettyThreadPoolSize = Integer.parseInt(properties.getProperty(componentName
677 + ".jettyThreadPoolSize"));
678 }
679 if (properties.getProperty(componentName + ".jettyClientThreadPoolSize") != null) {
680 jettyClientThreadPoolSize = Integer.parseInt(properties
681 .getProperty(componentName + ".jettyClientThreadPoolSize"));
682 }
683 if (properties.getProperty(componentName + ".jettyClientPerProvider") != null) {
684 jettyClientPerProvider = Boolean.valueOf(
685 properties.getProperty(componentName
686 + ".jettyClientPerProvider"))
687 .booleanValue();
688 }
689 if (properties.getProperty(componentName + ".jettyConnectorClassName") != null) {
690 jettyConnectorClassName = properties.getProperty(componentName + ".jettyConnectorClassName");
691 }
692 if (properties.getProperty(componentName + ".streamingEnabled") != null) {
693 streamingEnabled = Boolean.valueOf(properties.getProperty(componentName + ".streamingEnabled"))
694 .booleanValue();
695 }
696 if (properties.getProperty(componentName + ".maxConnectionsPerHost") != null) {
697 maxConnectionsPerHost = Integer.parseInt(properties.getProperty(componentName
698 + ".maxConnectionsPerHost"));
699 }
700 if (properties.getProperty(componentName + ".maxTotalConnections") != null) {
701 maxTotalConnections = Integer.parseInt(properties.getProperty(componentName
702 + ".maxTotalConnections"));
703 }
704 if (properties.getProperty(componentName + ".keystoreManagerName") != null) {
705 keystoreManagerName = properties.getProperty(componentName + ".keystoreManagerName");
706 }
707 if (properties.getProperty(componentName + ".authenticationServiceName") != null) {
708 authenticationServiceName = properties.getProperty(componentName + ".authenticationServiceName");
709 }
710 if (properties.getProperty(componentName + ".jettyManagement") != null) {
711 jettyManagement = Boolean.valueOf(properties.getProperty(componentName + ".jettyManagement"))
712 .booleanValue();
713 }
714 if (properties.getProperty(componentName + ".connectorMaxIdleTime") != null) {
715 connectorMaxIdleTime = Integer.parseInt(properties.getProperty(componentName
716 + ".connectorMaxIdleTime"));
717 }
718 if (properties.getProperty(componentName + ".consumerProcessorSuspendTime") != null) {
719 consumerProcessorSuspendTime = Integer.parseInt(properties
720 .getProperty(componentName + ".consumerProcessorSuspendTime"));
721 }
722 if (properties.getProperty(componentName + ".retryCount") != null) {
723 retryCount = Integer.parseInt(properties.getProperty(componentName + ".retryCount"));
724 }
725 if (properties.getProperty(componentName + ".proxyHost") != null) {
726 proxyHost = properties.getProperty(componentName + ".proxyHost");
727 }
728 if (properties.getProperty(componentName + ".proxyPort") != null) {
729 proxyPort = Integer.parseInt(properties.getProperty(componentName + ".proxyPort"));
730 }
731 if (properties.getProperty(componentName + ".wantHeadersFromHttpIntoExchange") != null) {
732 wantHeadersFromHttpIntoExchange = Boolean
733 .valueOf(properties.getProperty(componentName + ".wantHeadersFromHttpIntoExchange"))
734 .booleanValue();
735 }
736 return true;
737 }
738
739 }