See the Oracle GlassFish Server 3.1 Add-On Component Development Guide for complete details.
GlassFish Server has a highly modular architecture that enables you to add new types of containers that handle many application types, not just Java EE. GlassFish Server defines a service provider interface (SPI), which container developers implement. The GlassFish Server framework then invokes the container's implementation of the SPI to detect, deploy, and manage applications of the new type.
For more information, see Chapter 7, Adding Container Capabilities, in Oracle GlassFish Server 3.1 Add-On Component Development Guide.