Configuration

File configuration

The most common way to configure essential is through the essential.properties file. You can set properties in this file like in every other property file.

Example:

authentication.handler = org.example.AuthenticationHandler
default.consumer = org.example.Consumer

List of configurable properties

Properties with a star (*) mark a wildcard.

Deserialization properties:

  • io.consumer: class path of the default consumer to use for deserialization
  • io.xml.in.*: properties of the XML to Object deserialization process
  • io.json.in.*: properties of the JSON to Object deserialization process

Serialization properties:

  • io.producer: class path of the default producer to use for serialization
  • io.xml.out.*: properties of the Object to XML serialization process
  • io.json.out.*: properties of the Object to JSON serialization process

Phase properties:

  • phase.flow: class path of the phase flow to use when performing a request
  • authentication.handler: class path of the authentication handler to use during authentication phase

Programmatic configuration

The controller can also be configured by supplying a configuration object during the controller instantiation process. For example, you can use the controller configuration to set the default producer to your custom implementation:

Configuration config = new Configuration();
config.setDefaultProducer(MyProducer.class);
Controller controller = Controller.getInstance("my.resource.implementations", config);