Class AnnotationExampleApplication

java.lang.Object
org.j7m.middleware.examples.annotation.AnnotationExampleApplication

@J7mApplication(group="org.j7m.examples", name="annotation-first", version="1.0.0") public final class AnnotationExampleApplication extends Object
Annotation-first application entry point used by the examples and demo.

The class receives only the safe public ApplicationContext and a business service. It does not receive registry maps, transport internals, or classloader controls. Its Startup hook participates in the same deterministic lifecycle order shown by the full annotation-first lifecycle example.

  • Constructor Details

    • AnnotationExampleApplication

      @Inject public AnnotationExampleApplication(@CurrentApplication org.j7m.middleware.application.api.ApplicationContext applicationContext, AnnotationSimpleService simpleService)
      Creates the application from injected public capabilities.
      Parameters:
      applicationContext - safe application context
      simpleService - simple service
  • Method Details

    • start

      public void start()
      Starts application-owned state in the startup lifecycle phase.

      The hook is invoked after injection has completed. It performs only local state changes so startup output cannot leak secrets or internal runtime handles.

    • applicationCoordinate

      public String applicationCoordinate()
      Returns the application coordinate visible through the safe context.
      Returns:
      application coordinate string
    • greet

      public String greet(String name)
      Returns a greeting from the injected service.
      Parameters:
      name - caller name
      Returns:
      greeting
    • started

      public boolean started()
      Returns whether the startup hook ran.
      Returns:
      startup state