Class EventManager

java.lang.Object
ai.djl.serving.wlm.util.EventManager

public final class EventManager extends Object
A class manages model server events.
  • Method Details

    • getInstance

      public static EventManager getInstance()
      Returns a singleton EventManager instance.
      Returns:
      ths EventManager instance
    • addListener

      public void addListener(ModelServerListener listener)
      Adds the listener to the EventManager.
      Parameters:
      listener - the ModelServerListener
    • onModelDownloading

      public void onModelDownloading(ModelInfo<?,?> model)
      Invoked when model downloading started.
      Parameters:
      model - the model
    • onModelDownloaded

      public void onModelDownloaded(ModelInfo<?,?> model, Path downloadPath)
      Invoked when model downloading finished.
      Parameters:
      model - the model
      downloadPath - the model download directory
    • onModelConverting

      public void onModelConverting(ModelInfo<?,?> model, String type)
      Invoked when model conversion started.
      Parameters:
      model - the model
      type - the conversion type
    • onModelConverted

      public void onModelConverted(ModelInfo<?,?> model, String type)
      Invoked when model conversion finished.
      Parameters:
      model - the model
      type - the conversion type
    • onModelConfigured

      public void onModelConfigured(ModelInfo<?,?> model)
      Invoked when model properties configuration finished.
      Parameters:
      model - the model
    • onModelLoading

      public void onModelLoading(ModelInfo<?,?> model, ai.djl.Device device)
      Invoked when model loading start.
      Parameters:
      model - the model
      device - the device to load the model
    • onModelLoaded

      public void onModelLoaded(ModelInfo<?,?> model)
      Invoked when model loading finished.
      Parameters:
      model - the model
    • onAdapterLoading

      public void onAdapterLoading(ModelInfo<?,?> model, Path adapterPath)
      Invoked when adapter loading start.
      Parameters:
      model - the model
      adapterPath - the adapter path
    • onAdapterLoaded

      public void onAdapterLoaded(ModelInfo<?,?> model, Adapter adapter)
      Invoked when adapter loading finished.
      Parameters:
      model - the model
      adapter - the adapter