# Programming with the ALE and ALEPC APIs

# Introduction and Roadmap

The following sections describe the scope and organization of this document, Programming with the ALE and ALEPC APIs:

- Document Scope and Audience
- Guide to This Document
- Related Documentation
- EPCglobal Standards Compliance
- Using RFID Samples to Develop Applications

## Document Scope and Audience

This programming guide describes how to use the BEA implementation of the ALE API specification to develop applications that create EPC tag-reading requests in the form of Event Cycle Specifications (ECSpecs). The guide also describes how to use the BEA ALEPC API to develop applications that create EPC tag-writing requests in the form of Programming Cycle Specifications (PCSpecs).

The ALE API is defined by The Application Level Events (ALE) Specification Version 1.0 and by the extensions to that specification provided by BEA. ECSpecs are defined by the EPCglobal ALE specification. The ALEPC API is a BEA-defined interface for writing tag data.

The guide documents the API defined by the specification and the value-added extensions provided by BEA. A prerequisite for using this programming guide is a thorough understanding of the ALE specification, which in addition to defining the API provides necessary background information.

Although the intended audience for this guide is primarily application programmers, administrators might find the general descriptions of the ALE interface useful.

## Guide to This Document

- This chapter, Introduction and Roadmap, describes the organization of this document.
- Reading and Writing Tags provides a general overview of how tags are read and written through the ALE API. The chapter introduces the concepts and terminology used throughout this guide.
- Asynchronous Notification Mechanisms describes supported mechanisms for delivering reports.
- Reading Tags by Using the ALE API describes the methods available for reading tag data.
- Writing Tags by Using the ALEPC API describes the methods available for writing tag data.
- Sample Java Applications describes how to set up, run, and work with the bundled examples, which are an optional part of the installation process. You can use these applications as a starting point for developing your own applications.

## Related Documentation

This document is a part of the WebLogic RFID Edge Server documentation set. The other documents are:

- Installing WebLogic RFID Edge Server describes how to install and configure WebLogic RFID Edge Server.
- Using the RFID Edge Server Administration Console is online help that describes how to use the RFID Administration Console GUI to configure ECSpecs, ECReports, RFID devices, filters, and workflows.
- Using the Reader Simulator describes how to use the reader simulator software included with RFID Server. The Reader Simulator minimally simulates a ThingMagic Mercury4 RFID reader.
- RFID Reader Reference describes how to configure the RFID devices supported by the RFID Server.
- RFID Workflow Reference describes how to configure and use the workflow modules included with the WebLogic RFID Edge Server.
- ALE and ALEPC Javadoc provides reference documentation for the ALE and ALEPC packages that are provided with WebLogic RFID Edge Server.
- The Application Level Events (ALE) Specification Version 1.0
- EPCglobal EPC Tag Data Standard Version 1.1 rev 1.27

## EPCglobal Standards Compliance

WebLogic RFID Edge Server is compliant with all relevant EPCglobal standards:

- WebLogic RFID Edge Server works with RFID readers that implement the following protocols:

- EPCglobal Class 0, Class 0+, and Class 1 RF Protocols
- EPCglobal UHF Class 1 Gen 2 Tag Protocol (ISO 18000-6C)
- ISO 15693 RF Interface protocol
- ISO 18000-6B RF Interface protocol

- WebLogic RFID Edge Server supports EPC Tag Data Standard Version 1.1 rev 1.27. This standard governs the bit-level encoding of object identity and other information onto RFID tags. It also specifies a URI-based syntax for exchange of tag data between software application components, and a second URI-based syntax for the description of filtering patterns.
- WebLogic RFID Edge Server includes components that collect and filter tag data as defined within the EPCglobal Architecture Framework. WebLogic RFID Edge Server fully implements the The Application Level Events (ALE) Specification Version 1.0, which is the standard interface to filtering and collection as defined by EPCglobal (replacing earlier "Savant" specifications). WebLogic RFID Edge Server provides extensions in the areas of reader management, application integration, and tag writing.

## Using RFID Samples to Develop Applications

If you install the RFID Sample Code component, the following programming samples are installed by default in the `RFID_EDGE_HOME/samples` directory, where `RFID_EDGE_HOME` represents the product installation directory. You can modify these sample applications and use them as a starting point for developing your own applications`.`

Sample Java Applications provides procedures for setting up your development environment, as well as instructions for compiling, running, and working with some of the sample applications.

- `ImmediateProgramSample`

An example of how to use the ALEPC API to program an Electronic Product Code (EPC) value into a tag using a specified logical reader. The programming cycle specification is read from an XML file, and the programming cycle reports are printed as XML.

- `ImmediateSample`

An example of how to use the ALE API to retrieve a list of Electronic Product Code (EPC) tags from a specified logical reader. The event cycle specification is read from an XML file, and the event cycle reports are printed as XML.

- `JMSSamples`

Vendor-specific JMS examples for:

- BEA
- IBM
- Sun
- JBoss
- TIBCO

- `NonXMLSample`

An example of how to use the ALE API to retrieve a list of EPC tags from a specified tag reader. The `immediate()` method of the ALE client interface is used to perform the tag read operation.

- `PollingSample`

An example of how to define an event cycle specification (ECSpec) and use it to poll() the Edge Server for tag updates.

- `ProgrammingSample`

An example of how to define a programming cycle specification (PCSpec) by reading it from an XML-formatted file, how to administer an EPC cache in the Edge Server, and how to invoke tag programming operations.

- `SubscribeSample`

An example of how to define an event cycle specification (ECSpec) by reading it from an XML-formatted file, and how to set up a handler that subscribes to event cycle completion notifications.

- `Workflow`

XML samples for use with the examples provided in the Configuring and Using Workflows section of the RFID Workflow Reference manual.