AO Net Path Space

project: alphamanagement: previewpackaging: developmental
java: >= 7semantic versioning: 2.0.0license: LGPL v3

Manages allocation of a path space between components.

Features

  • Identifies conflicting spaces.
  • Very fast lookups even when managing a large number of spaces.
  • Supports several types of spaces:
    • Wildcard spaces:
      • /path/* - wildcard space - matches all resources in one path depth only.
      • /path/*/* - multi-level wildcard space - matches all resources at the given path depth only.
      • /path/*/*/* - any number of levels allowed.
    • Unbounded spaces - Allows other sub-spaces to be allocated:
      • /path/** - unbounded space - matches all resources at or below one path depth.
      • /path/*/** - multi-level unbounded space - matches all resources at or below the given path depth.
      • /path/*/*/** - any number of levels allowed.
    • Greedy spaces - Like unbounded spaces, but do not allow other sub-spaces to be allocated:
      • /path/*** - greedy space - matches all resources at or below one path depth.
      • /path/*/*** - multi-level greedy space - matches all resources at or below the given path depth.
      • /path/*/*/*** - any number of levels allowed.
  • Small footprint, minimal dependencies - not part of a big monolithic package.
  • Java 1.7 implementation:
    • Android compatible.
    • Java EE 6+ compatible.

Motivation

Managing the URL path space is central to web application development. When components are developed independently and combined into a single URL space, as well as underlying implementation space (such as Java Servlet paths), it is important that each component occupy a well-defined space without unexpectedly overlapping other components. The goal is to reliably identify conflicts within an application's URL or implementation space instead of unintentionally having overlapping components or access rules.

SemanticCMS Core Controller uses this project to manage which requests are passed along for direct processing by the local Servlet container. This layer of allocating the servlet space is important because resources from /META-INF/resources/ within all project JAR files are merged into a single space with the potential to inadvertently overlap. Explicit reservation of servlet space through the controller helps identify these conflicts early in the module development and integration phases.