Introduction

09 March 2013

JLCF Component Model

The following sections define the basic elements of JLCF.

Component

Components are the elementary building blocks of an application. Each component implements part of the application and formalizes the functionality it provides (through offered Interfaces) and the functionality it requires (through required interfaces (Receptacles) ).

component

All component-to-component communication must be done via their Receptacles and Interfaces.


Interface

Components offer functionality through one or more Interfaces. This functionality can be used by another component or by a user of the framework. A JLCF Interface is a plain Java interface.

Receptacle

A Receptacle is an interface requirement. Components require functionality through receptacles. During the instantiation of a component composition, Receptacles are connected by the framework to Interfaces in order to specify the provider of the functionality a component requires.

Properties

Each component can have one or more properties. These are name / value pairs that are specified externally and are passed to the component by the framework during its instantiation.

Component Interaction Patterns

Components interact through their Interfaces and Receptacles using normal request / response synchronous method calls. Asynchronous calls between components may be implemented as 2 interactions between components, for example, ComponentA may call ComponentB, which will immediately return, will process the request and will later reply at an interface provided by ComponentA.

In addition, the framework provides the ability for one component to provide a callback reference when calling another component. The callback can be obtained on the target component and used to provide asynchronously one or more replies. Callbacks are further explained in the next sections.

interaction patterns

Interceptors

An interceptor is a construct that is placed in receptacles and can intercept calls between components. An Interceptor can be used in order to intercept and change the target interface arguments or return data. Each receptacle may contain a chain of interceptors,which intercept the call one after the other.

Callback

A callback is an interaction pattern provided by the framework where a component may provide a callback address when calling another component. The Callback, which is a reference to a component interface, can be obtained from the target component and used to asynchronously provide one or more replies to the caller component.

Application Description

The application description is the configuration of the application in terms of a component composition,expressed in an xml document. This is a central concept of JLCF, all components and their interconnection are specified centrally in a configuration file. The framework is able to instantiate an application through an application description file which is provided by the framework user.


Distribution

The JLCF component mode is not a distributed component model. That is, it does not natively provide any mechanism interact with a JLCF Component based application running at another JVM locally or remotely. This part is intentionally left out and delegated to the application as there are many other frameworks and middleware that perform this task very well.

If there is a need to have communication between 2 remote JLCF applications, the communication between the boundary components of the 2 applications is done outside of the framework using any normal middleware or framework that is capable of doing this. This can be done either with interceptors or by having a proxy component that communicates with the remote side. These patterns are explained in more detail in the documentation and the examples provided with JLCF.

Dynamic Reconfiguration

While the application is running as a composition of components described in an application description, it is possible to instruct the framework to replace a component implementation with an alternative one. The application will continue to run and the framework will try to perform this reconfiguration transparently to the rest of the application.

At the current version, the framework only supports replacing one component at a time. If several components need to be replaced at runtime, several requests must be made to the framework sequentially.


Please see the Examples and the documentation for more details.