Class Backend.Environment

java.lang.Object
com.codename1.backend.Backend.Environment
Enclosing class:
Backend

public static final class Backend.Environment extends Object
What an Backend.Application is built from.
  • Method Details

    • registerTool

      public void registerTool(McpTool tool)
      Publishes an @McpTool on this server's MCP endpoint. Generated code calls this while it builds the beans; the tool belongs to this server only, so a server started later in the same process does not serve a tool bound to a bean that has been destroyed.
    • registerGauge

      public void registerGauge(String name, String description, String unit, Gauge.Source source)
      Publishes a managed attribute as a gauge of this server's: added when the server starts and removed when it stops. Generated code calls this.
    • registerManaged

      public void registerManaged(ManagedBean bean)
      Registers a managed bean with this server. Generated code calls this.
    • getConfig

      public Config getConfig()
    • getDataSource

      public DataSource getDataSource()
      The pool, or null when this server has no database.
    • getEntityManager

      public EntityManager getEntityManager()
      The entity manager, or null when the build generated no entities.