The HORB command can take -conf option, like;
horb -conf sample.conf
where sample.conf is a configuration file.
See examples/config/all.conf for an example.
A configuration file is separated in four parts, 1) global configuration, 2) HORB servers configuration, and 3) autostart objects configuration, and 4) ACL configuration.
Each line in a configuration file has a key and a value conbined by '='.
debug=true
Blank characters such as space or tab is not allowed around '='. Lines begins with ';' or '#' are comments.
Value must be one of them.
BOOLEAN 'true' or 'false'
STRING a string
NUMBER a integer number
Keys are case insensitive.
If there is not a HORB server configuration in a configuration file or no -conf option is given to the HORB command, only one HORB server is started by a HORB command. Multiple HORB servers can be started from a configuration file.
Each key is a conbination is 'horbServer', server number rounded by [], and a subkey, for example:
horbServer[0].port=1990
horbServer[1].port=1991
Server number begins with zero. The above example starts two HORB servers in a HORB process, one for port 1990 and the other for port 1991.
Here is an example that starts two HORB servers in a HORB process.
horbServer[0].port=8887 horbServer[1].port=8888
Arbitrary number of objects can be started automatically as daemon objects. Those become accessible immediately from clients.
Each key is a conbination is 'object', object number rounded by [], and a subkey, for example:
object[0].className=horb.examples.clientServer.Server
object[1].className=horb.examples.clientServer.Server
Object number begins with zero and it has meaning only in this configuration file.
This example starts two daemon objects. Object[0] is a class, while Object[1] is an interface.
object[0].className=horb.examples.clientServer.Server object[0].objectID=myServer1 object[0].port=0 object[1].className=horb.examples.interfaceCall.Server object[0].implementation=horb.examples.interfaceCall.Server_Impl object[0].objectID=myServer20 object[0].port=0
If you want to start only one object as a daemon object, you can use -start option of the HORB command.
horb -start horb.examples.clientServer.Server myServer
HORB equips very strong security features. One of them is Distributed Access Control List described in the next section. ACL Configuration part specifies the sources of ACL and their properties.
Each key is a conbination is 'accessControl', ACL number rounded by [], and a subkey, for example:
accessControl[0].source=/usr/local/lib/horb/acl/department.acl
accessControl[1].source=horb://master.etl.go.jp/SystemACLMaster#SECTION_ACL
ACL number begins with zero and ACL files are read in the system in this order.
file:///usr/local/lib/horb/acl/department.acl
/usr/local/lib/horb/acl/department.acl
If STRING begins with "horb:", local ACL server downloads the specified ACL file from the specified ACL master server.
horb://master.etl.go.jp/SystemACLMaster#SECTION_ACL
In this example, ACL master server is master.etl.go.jp. Object name
is always SystemACLMaster. Ref part of the URL, SECTION_ACL, is ACL name
at the master side. This Ref port must be same as the local ACL name.
Here is an example using three ACL files.
accessControl.refreshInterval=3600 accessControl[0].name=USERLIST_ACL accessControl[0].soruce=horb://master.etl.go.jp/SystemACLMaster#USERLIST_ACL accessCtonrol[0].redistributable=true accessControl[1].name=DEPARTMENT_ACL accessControl[1].source=horb://cs.etl.go.jp/SystemACLMaster#DEPARTMENT_ACL accessControl[1].redistributable=true accessControl[2].name=LOCAL_ACL accessControl[2].source=/usr/local/lib/horb/acl/local.acl accessControl[2].redistributable=false
HORB servers might be started in your program instead of from a configuration file. See examples/multiServer for an example.