Danube can be started with the MultiThreadServerSocketService class, by supplying it with a port and reference to HTTPServerConnectionHandler (via a property called connectionHandler). Its create() and start() methods should both be called. Also connection handler of HTTPServerConnectionHandler should point to a Selector . For Selector a list of Prefix and Pattern objects should be supplied in the components property. Each of the Matcher s can additionally point to "second level" Selector s, a ReadOnlyFileConnectionHandler or MVCConnectionHandler .

For ReadOnlyFileConnectionHandler a filePath (the location where files are stored) needs to be supplied along with uriPath (ie. the prefix value stripped from the current request URI). This is needed later when used with Pattern matcher.

MVCConnectionHandler has only two references that need to be populated: controller and view. See integrations for suitable controller and view implementations.

For example, the controller property can be a reference to an instance of DanubeFlowExecutionManager , while view can point to FreeMarkerViewAdapter . DanubeFlowExecutionManager should be configured in the typical way that FlowExecutionManager is normally configured, while FreeMarkerViewAdapter should be supplied with a path to templates stored in the location pointed to by the templatesLocation property.

  TODO: Supply an example code that does what is explained in here.