Class: EndpointManager

base.EndpointManager()

The most basic version of this transition engine is an endpoint manager. This

especially useful for uploaders or other types of processes that use a backend servrer conversation in order to expose validated endpoints to the user facing services (web servers)

NOTE: all the base classes in /lib return the class and do not return an instance. Explore the applications and the reader will find that the descendant modules export instances. The classes provided by copious-transitions must be extended by an application.

Constructor

new EndpointManager()

Source:

Methods

initialize(conf, db)

Checks for the transition_endpoint field on the configuration object (conf).

If the transition_endpoint field is an object, this assumes that the object is a configuration that can be passed to initialize_endpoint_services.

Parameters:
Name Type Description
conf object
db object
Source:

initialize_endpoint_services(conf) → {object}

Creates a transition endpoint based on the class determined by configuration. The field endpoint_module (i.e. conf.transition_endpoint.endpoint_module) provides the name of the module to require if it is supplied. If it is not mentioned, then the default transition endpoint will be used.

(Applications seeking to supply an endpoint server for transition processing should overrided the default.)

An instance of the class will be created. The creation of this class will result in a listening server on a tls port.

Once the class is created and no error has been encountered, the transition handler and the mime handler may be set. (Note: the user processes is not handled through the endpoint server.)

Any version of this method should call upon the transion processor for using the endpoint transition. Also, it should call upon the mime handler to access static assets. The methods called will be the following:

  • endpoint_transition
  • static_asset_handler

In the supplied handlers, a server id is required to be included in the message object coming from a message relay client. The message object will be passed on to the contractual module handling the use case (transition or mime).

Finally, the results are passed back to the message hanlder the called the transition/mime handler. The message handler will handle the client message response.

Parameters:
Name Type Description
conf object
Source:
Returns:
Type
object

set_contractual_filters(trans_processor, user_processor, mime_processor)

Give the enpoint to the contractual

Parameters:
Name Type Description
trans_processor object
user_processor object
mime_processor object
Source:

set_ws(web_sockets)

Accepts a reference to the application supplied web socket server manager and sets the web_sockets field to it.

Parameters:
Name Type Description
web_sockets object

the reference to the application supplied web socket server manager.

Source: