-
Notifications
You must be signed in to change notification settings - Fork 17
Messaging containers
Messaging containers are an important concept of the xdi2-messaging-container and xdi2-transport components. They are the primary mechanism for operating on data behind an XDI endpoint, and they are responsible for executing messages and producing message results.
A messaging container can be mounted by the endpoint registry of the xdi2-transport-http component and exposed as an XDI endpoint that can receive and process XDI messages.
Some messaging containers have an owner, which is expressed as an XDI number such as =!:uuid:1111.
The by far most important messaging container is the GraphMessagingContainer, which can expose a native XDI graph from the xdi2-core component.
- xdi2.messaging.container.MessagingContainer: A MessagingContainer can process XDI messages and produce a result graph.
- xdi2.messaging.container.AddressHandler: An AddressHandler can execute an XDI operation against an address.
- xdi2.messaging.container.StatementHandler: A StatementHandler can execute an XDI operation against a statement given in a cross-reference.
- xdi2.messaging.container.ExecutionContext: MessagingContainers as well as Interceptors and Contributors can use the ExecutionContext to store and share state.
This diagram shows how the xdi2-transport component executes an XDI message envelope against a messaging container to produce an XDI message result.
Several hook methods such as before() and after() are provided that can be overridden by subclasses.
The primary mechanism within a messaging container to execute XDI operations is via the AddressHandler and StatementHandler interfaces, which are called depending on whether a given XDI operation applies to an XDI address or XDI statement.
Contributors can also handle XDI operations and typically add special functionality to certain parts of an XDI graph.
Interceptors can be attached at all important points to influence the overall execution process.
Source: XDI2.vsd
This work is licensed under a Creative Commons Attribution 4.0 International License.