API Reference exampple v0.9.1


Exampple is a XMPP Component framework to develop solutions based on SOA 2.0. This framework let you to create different services connected to a XMPP server and provide more functionality to your environment.

Client is a simple state machine inside of a process which helps us to create a client connection to a XMPP Server. The dynamic of the connection is contained inside of the client when we perform the connection and then we can send different kind of stanzas to the server.

This exception is triggered when a check is not satisfied. Usually we could add our own message inside. If we are not adding it, it is filled with a predefined text.

Component is letting us to connect to a XMPP server as a XMPP Component. This module aims create a connection as a process letting us handle the connection easily. By default, using the configuration it's starting using the module name as registerd name for the process.

Router implements the dynamic to define the flow where a stanza will be following for find the controller and function where it should be attended.

Conn is a module to store the information related to a XMPP request. Conn has the following information inside

ConnCase is used for tests. When a test is using this module we have available the start of the Exampple behaviours, DummyTcpComponent server and the different asserts.

Starts the handling of the stanza. This task is launched by Exampple.Router.Task.Monitor and it is using the Exampple.Router to route the stanza to the correct controller.

The monitor starts a task to attend the incoming request, when the task is launched a timer is set. The timer is cancelled when the task is terminated. If the task crashes, the monitor receives a message and replies with an error. In case of timeout the request is returning a timeout and the task is terminated.

TCP client which is in use to abstract all of the connectivity aspects for TCP.

TLS client which is in use to abstract all of the connectivity aspects for TLS.

XML-RPC let us to create method calls and responses. It works in both directions, encoding/decoding requests and encoding/decoding responses.

Process a stream chunk by chunk to obtain a XML document. The stream is initiated passing a PID where the information from the chunks are going to be received.

Xmlel is a struct data which is intended to help with the parsing of the XML elements.

Envelope helps to create a function to be stored inside of the Exampple.Router.Conn which will be in use when a response will be processed.

Help defining an error module which have all of the information of errors and a function for raise them correctly.

JID stands for Jabber Identification. This is de Identification the XMPP network provide for all of the users, servers and components which can be connected and reachable inside of the XMPP protocol.

To use Jabber-RPC you will need to add this module into your router in this way

Provides functions to create stanzas.

Using Xdata gives the functionality to create and validate forms. You can use Xdata to define your own form, create a sent and/or validate the form against the rules you defined giving the facilities to translate it directly to stanzas or XML string.

Module to help us to format correctly the date-times. Most of the times the date-time should appears in ISO-8601 format with a timezone or in UTC. These helpers add the timestamp removing the microseconds and milliseconds and adding even letting us to add some seconds to the specific time.

Mix Tasks

Prints all namespaces for the router.

Prints all routes for the router.