Package Index

TrAP; the Transport Abstraction Package is a library that provides a message-based point-to-point link between two nodes using one or more transports, the exact type and implementation of which is abstracted away from the application. The main usefulness of such an abstraction level is that the application does not need to concern itself with managing different transports, types, keepalives and protocols, but can use an existing and tested codebase for it.

TrAP provides a number of features to ease development of applications, while keeping maximum flexibility:

  • Automatic Transport Detection: TrAP will automatically discover all potential transports, and select and use the most applicable transport, based on a user-customisable priority order.
  • Transport Handover: TrAP can seamlessly hand over between different transport types. It can use a common transport (such as HTTP) to perform initial connection, while it discovers others. The connection is fully usable while TrAP performs its work!
  • Transport Recovery: If a transport fails for any reason (network change, handover from mobile network to wifi), TrAP can fall back to a common transport and reconnect. While connectivity is briefly interrupted, no messages are lost.
  • Liveness Checking & Configuration: The liveness status of a TrAP connection can be inspected and changed at runtime. Fully customisable keepalives means that applications can have infrequent ones (for long lived connections) and frequent ones (when response time is critical).
  • Configurable Message Processing: TrAP can operate in synchronous and asynchronous modes, and allows full control over both incoming and outgoing message buffers. Memory footprint and message throughput can thus be tweaked depending on the application.
  • Cross-Language: TrAP supports Java, JavaScript, C++ and Objective-C, and goes as low as 32kb per connection (using a linked message buffer, and only one live transport at a time).

Trap works on a client/server model, and the high level API is generally based on sockets (albeit message-based, and not streaming). A server opens up a Trap Endpoint for "listening". The client connects to the server; by doing so, a new Endpoint object is generated on the server to hold the other end of the connection. The pair of endpoints can then communicate freely.

com.ericsson.research.transport
com.ericsson.research.transport.ssl
com.ericsson.research.transport.ws
com.ericsson.research.transport.ws.spi
com.ericsson.research.transport.ws.spi.util
com.ericsson.research.trap

The main API package for Trap.

com.ericsson.research.trap.auth Contains interfaces used for authenticating Trap sessions.
com.ericsson.research.trap.delegates Provides interfaces that allow Trap to give feedback to the application when events occur.
com.ericsson.research.trap.examples This package contains a set of examples on how to use Trap.
com.ericsson.research.trap.impl
com.ericsson.research.trap.impl.buffers
com.ericsson.research.trap.impl.http
com.ericsson.research.trap.impl.queues
com.ericsson.research.trap.nio
com.ericsson.research.trap.nio.impl.nio1
com.ericsson.research.trap.nio.impl.nio2
com.ericsson.research.trap.spi Interfaces for extending Trap with new transport, keepalive methods, protocols or additional methods.
com.ericsson.research.trap.spi.queues
com.ericsson.research.trap.spi.tomcat
com.ericsson.research.trap.spi.transports
com.ericsson.research.trap.spi.ws.netty
com.ericsson.research.trap.tests
com.ericsson.research.trap.utils A collection of compatibility utilities.
com.ericsson.research.trap.utils.impl