You can configure bean by using following format:
beanName (class: className, active: activeValue, exportable: exportableValue) { # scope of bean properties }
where beanName
is name under which you want to configure bean.
beanName
must be wrapped in ''
, if beanName
contains characters like =:,[]#+-*/
and is recommended, if beanName
is numeric only.
Inside block between (
and )
you can define:
class
which will be used as a bean, in example above we set class asclassName
. (default: if you try to configure bean under name which has default class assigned with it in Tigase framework then this assigned class will be used. In other case you need to pass name of class to use as a bean)active
(boolean) whether you want the bean to be active or not (beans withactive
set tofalse
are not loaded). (default: true)exportable
(boolean) defines if this bean should be exported and available for use for beans in inner scopes. This is advanced option in most cases it is recommended to omit this field in configuration. (default: false)
Spaces between beanName
and block between ()
is optional as well as space between block ()
and block {}
.
It is recommended that properties of bean would be placed in separate lines with indentation and first property will be placed
in new line.
Important
Usage of ()
block is very important. When this block is used in configuration it automatically sets active
property of bean definition for bean for which it is used to to true
. This is done due to fact that default value of active
is true
.
If you omit it in configuration, you will set bean configuration but it may remain inactive
. In this state bean will not be loaded and as a result will not be used by Tigase XMPP Server.