Chapter 60. Basic Configuration Options (External Component)
Prev |  | Next

# Chapter 60. Basic Configuration Options (External Component)

Artur Hefczyc <artur.hefczyc@tigase.net> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: http://tigase.net :Date: 2010-04-06 21:18

As for all Tigase components you can load it and configure it via ////<<initPropertiesGuide,////init.properties file described in details in ////<<4xconfiguration,////another guide. This document describes how to load the component and set the initial configuration to accept or initiate connections for an external component.

First thing to do is to specify the component class and the component name which must be unique within the Tigase installation. The most commonly name used is ext and the class is tigase.server.ext.ComponentProtocol.

Following 2 lines in the ////<<initPropertiesGuide,////init.properties will load the component during the server startup time:

    --comp-name-1 = ext
    --comp-class-1 = tigase.server.ext.ComponentProtocol

While this would load the component there is no additional configuration provided to the component would be practically useless. It is possible to add necessary parameters (external domains, passwords) during run-time via ad-hoc commands but this is generally a good practise to provide some initial parameters in the configuration file too.

There are two additional properties used for setting initial configuration for external components connections: ////<<initProperties_external,////--external and ////<<initProperties_bind-ext-hostnames,////--bind-ext-hostnames.

These two properties are very well described on page under the given links, therefore I will focus on practical and working examples here.

## Simple Case

The most common scenario is to connect an external component which works for a specific, given domain to the main server. The component authenticates with a defined password and the external component connects to a TCP/IP port the server listens on.

For example lat’s say our server works for a virtual domain: devel.tigase.org. We want it to listen on port 5270 for incoming connections from an external component working for a domain: muc.devel.tigase.org. The authentication password for the domain is muc-secret.

For such a scenario we need 3 lines in the init.properties file:

    --comp-name-1 = ext
    --comp-class-1 = tigase.server.ext.ComponentProtocol
    --external = muc.devel.tigase.org:muc-secret:listen:5270

Prev |  | Next
Chapter 59. External Component Configuration | Home | More External Components/Domains