Java API for DTN Reference Implementation
=========================================

Introduction
------------
Java API for DTN Reference Implementation offers Java developers
a native way to interact with the DTN Reference Implementation.
The lowest level class offered by the API is the BPAAC class,
which maps closely to the dtn_api.h functions. The BundleObjects
class provides classes that map closely to the dtn_types.h.

The API also provides higher level classes on top of BPAAC to
be used by application developers who do not wish to use the lower
level functions directly. The architecture of these higher level
classes follows closely the architecture of the Java BP-RI
implementation (http://irg.cs.ohiou.edu/ocp/bundling.html).

The code stack is shown in Figure 1 below.

+---------------+ +-----------------------+
| BundleObjects | |  Client Application   |
|               | |       +---------------+ --- BundleApplication
|               | |       | ------------------- ApplicationAgent
|               | |       | +-------------+
|               | |       | | NativeAgent |
|               | +-------+ +-------------+
|               | +-----------------------+
|               | |       BPAAC.java      |
+---------------+ +-----------------------+
+-----------------------------------------+
|                BPAAC.c                  |
+-----------------------------------------+
----------------------------------------------- dtn_api
+-----------------------------------------+
|      DTN Reference Implementation       |
+-----------------------------------------+
          Figure 1: Code stack

Installation
------------

1. Modify make.config and set:
   a) JAVAPATH to the path of your Java installation
   b) TOPDIR to the path of this software tree
   c) DTNDIR to the path of your DTN2 installation
   e) SYSTEM to "linux" or "mac"
2. make

This creates the files for use in Java projects:
java/dtn/api/nativeapi.jar, contains only the minimal mapping between the DTN2 API and Java
java/dtn/api/BPAAC.so, library needed by the jar files
java/dtn/api/nativeagent/nativeagent.jar, contains the nativeapi.jar and the higher level classes
