This document is the specification for the AllJoyn Java API.

Overview

AllJoyn is a device-to-device communication protocol which enables mobile devices to support peer-to-peer applications such as multi-player gaming and social networking.

AllJoyn is designed as a backwards-compatible extension of DBus, a standard protocol for inter-application communication in the Linux desktop environment. It offers the following features:

This document describes the Java language binding for the AllJoyn API. It covers the following topics:

Type Signatures

AllJoyn uses the same type signatures that are used by the DBus protocol. The type signature is made up of type codes. Type code is an ASCII character that represents a standard data type.

The following table summarizes the AllJoyn types.
Conventional NameCodeASCIIDescription
INVALID0NULNot a valid type code, used to terminate signatures
BYTE121'y'8-bit unsigned integer
BOOLEAN98'b'Boolean value, 0 is FALSE and 1 is TRUE. Everything else is invalid.
INT16110'n'16-bit signed integer
UINT16113'q'16-bit unsigned integer
INT32105'i'32-bit signed integer
UINT32117'u'32-bit unsigned integer
INT64120'x'64-bit signed integer
UINT64116't'64-bit unsigned integer
DOUBLE100'd'IEEE 754 double
STRING115's'UTF-8 string (must be valid UTF-8). Must be nul terminated and contain no other nul bytes.
OBJECT_PATH111'o'Name of an object instance
SIGNATURE103'g'A type signature
ARRAY97'a'Array
STRUCT114, 40, 41'r','(',')'Struct
VARIANT118'v'Variant type (the type of the value is part of the value itself)
DICT_ENTRY101, 123, 125'e','{','}'Entry in a dict or map (array of key-value pairs)

Four of the types are container types: STRUCT, ARRAY, VARIANT, and DICT_ENTRY. All other types are a common basic data types.

When specifying a STRUCT or DICT_ENTRY, 'r' and 'e' should not be used. Instead use ASCII characters '(', ')', '{', and '}' to mark the beginning and ending of a container.

Note:
Not all of the data types supported by AllJoyn are available in Java.
@see org.alljoyn.bus.annotation.Signature org.alljoyn.bus.annotation.Signature for a list of which Java types are compatible with AllJoyn types.

Message

A message is a unit of communication via the AllJoyn protocol. A message can send an receive any number of values.

Signals

A signal is an outbound value that is transmitted on the bus.