Set the specified connector in the service, if it is not already present. @param connector The connector instance to add
(Connector connector)
| 525 | * @param connector The connector instance to add |
| 526 | */ |
| 527 | public void setConnector(Connector connector) { |
| 528 | Service service = getService(); |
| 529 | boolean found = false; |
| 530 | for (Connector serviceConnector : service.findConnectors()) { |
| 531 | if (connector == serviceConnector) { |
| 532 | found = true; |
| 533 | break; |
| 534 | } |
| 535 | } |
| 536 | if (!found) { |
| 537 | service.addConnector(connector); |
| 538 | } |
| 539 | } |
| 540 | |
| 541 | /** |
| 542 | * Get the service object. Can be used to add more connectors and few other global settings. |