StreamLink Architecture

StreamLink provides an object oriented API that allows applications to access RTTP functionality without needing to understand the details of the protocol itself. It is supplied as an SDK containing the API and an underlying software library. There is an SDK for each type of client technology that can access the Caplin Platform.

Using the appropriate StreamLink SDK, you can build applications in JavaScript, Java, Java for Android, . NET, Silverlight, and Objective-C on iOS. The following table shows which StreamLink SDK is used for which client technology:

Client Application technology Streamlink sdk
JavaScript/Ajax/HTML StreamLink JS
Objective-C on iOS StreamLink iOS
Java StreamLink Java
Java on the Android platform. StreamLink Android
.NET applications  StreamLink.NET
Silverlight applications StreamLink Silverlight

The StreamLink code is divided into four layers:

 

The API User layer

The API User Layer defines interfaces that developers using StreamLink must implement as concrete classes in the client code.

The most important of these interfaces are the Listeners which define callback methods to handle events returned by StreamLink. For example, SubscriptionListeners handle the data (images and updates) received from Liberator when the client has subscribed to a particular item. The actual implementations of such callbacks depend upon what the client code needs to do with the received data.

There is also a Logger interface, whose implementation enables the client to record StreamLink activity in an appropriate manner.

The CredentialsProvider interface is for supplying login information to the Liberator. The implementation of a CredentialsProvider could obtain this information from a database, a web site, or from a single signon system.

 

The API Classes

The API Classes layer contains the public classes and methods that client code uses to initiate and control interactions with StreamLink.

The main class is called StreamLink; every client must create an instance of this class to use the functionality provided by StreamLink. There are also Subscription classes for setting up subscriptions to data, and Command classes used to send commands to Liberator. Commands include, Create (to create data items), Publish (to send updates to data items), and Delete (to delete data items).

The Status classes allow a client to obtain information about the status of RTTP connections and Liberator's data services. (For an explanation of data services see the Caplin DataSource Overview.)

 

Subscription Management and Command Management

This layer is internal to StreamLink. It implements the functionality of the StreamLink API; managing subscriptions, implementing the commands issued from the API User Layer, making calls on the RTTP protocol layer, and handling data and status information received from RTTP for onward transmission to the callback methods defined in the API User Layer.

 

The Protocol layer

This layer is also internal to StreamLink. It manages the connections to the Liberator server, and implements the RTTP protocol that handles bi-directional communication with Liberator.