Cling Core

Working with UPnP devices and services requires significant infrastructure. Cling Core is a Java UPnP library that implements this infrastructure, it offers clean and natural APIs for any developer who wants to implement either UPnP services or control points.

The main features of Cling Core are:

Fine-grained and safe APIs

Cling Core is not just a thin layer on top of the low-level UPnP protocol, it offers rich and natural APIs for developers. Every UPnP header, every message, and every piece of metadata is exposed as a type-safe API with as few type casting and string-lookups as possible. Much of the API is thread-safe, thus simplifying the pervasively multi-threaded environment in which UPnP operates.

Modular design and extensive SPIs

Almost all functionality of Cling Core can be overridden or replaced with custom code. Subsystems such as network transport, message parsing, and even individual aspects of the UPnP protocol implementation (such as discovery, control, eventing) offer SPIs for extension and customization.

Specification compliance

Many vendors who implement UPnP software violate the UPnP device architecture (UDA) specification in one way or another. Cling Core's goal is to implement and respect every detail of the UDA specification. Currently, Cling Core is targeting UDA 1.0, with preparations already made for future UDA 1.1 compliance.

Complete implementation

Cling Core does not take any shortcuts, no parts of the specification are omitted just because they are difficult to implement.

Full support for Android

All features of Cling Core are supported on Android (see manual, platform level 7/Android 2.1 required). Use Cling to write UPnP/DLNA Android clients or even server applications. The full source code of the UPnPBrowser example application of the manual can be found here. You can see the application in action in this video.

Getting Started

If you are using Maven, add the following information to your pom.xml:

<repositories>
    <repository>
        <id>teleal-repo</id>
        <url>http://teleal.org/m2</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.teleal.cling</groupId>
        <artifactId>cling-core</artifactId>
        <version>1.0.5</version>
    </dependency>
</dependencies>

Continue reading the Cling Core User Manual, the first chapter explains how to implement a UPnP service and a control point. This chapter also contains instructions for using Cling Core without Maven in a standalone console application.

Cling Core is Free Software, distributed under the terms of the GNU Lesser General Public License.

org.teleal.cling:cling-core:1.0.5

New Java Persistence with Hibernate Training Course available!
Creative Commons License