Class ServiceInfoPropertiesConfigureEvent

java.lang.Object
eu.cloudnetservice.driver.event.Event
eu.cloudnetservice.wrapper.event.ServiceInfoPropertiesConfigureEvent
All Implemented Interfaces:
eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder, eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder.Mutable<ServiceInfoPropertiesConfigureEvent>, eu.cloudnetservice.driver.document.property.DocPropertyHolder, eu.cloudnetservice.driver.document.property.DocPropertyHolder.Mutable<ServiceInfoPropertiesConfigureEvent>

public final class ServiceInfoPropertiesConfigureEvent extends eu.cloudnetservice.driver.event.Event implements eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder.Mutable<ServiceInfoPropertiesConfigureEvent>
An event that is called when the properties of the service that is associated with the current wrapper instance are prepared. The properties that are appended to this event are copied into the service snapshot that gets published.

If you want to receive a notification about the publication of a new service info snapshot instance, listen to the ServiceInfoSnapshotPublishEvent instead.

Since:
4.0
  • Nested Class Summary

    Nested classes/interfaces inherited from interface eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder

    eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder.Mutable<S>

    Nested classes/interfaces inherited from interface eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder.Mutable

    eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder.Mutable.WithDirectModifier<S>

    Nested classes/interfaces inherited from interface eu.cloudnetservice.driver.document.property.DocPropertyHolder

    eu.cloudnetservice.driver.document.property.DocPropertyHolder.Mutable<S>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final eu.cloudnetservice.driver.service.ServiceInfoSnapshot
     
    private final eu.cloudnetservice.driver.document.Document.Mutable
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServiceInfoPropertiesConfigureEvent(eu.cloudnetservice.driver.document.Document.Mutable propertyDocument, @NonNull eu.cloudnetservice.driver.service.ServiceInfoSnapshot lastServiceInfo)
    Constructs a new service properties configure event.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull eu.cloudnetservice.driver.service.ServiceInfoSnapshot
    Get the last service info of this wrapper.
    eu.cloudnetservice.driver.document.Document.Mutable

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder

    propertyAbsent, propertyPresent, readProperty, readPropertyOrDefault, readPropertyOrGet, readPropertyOrThrow, readPropertyOrThrow

    Methods inherited from interface eu.cloudnetservice.driver.document.property.DefaultedDocPropertyHolder.Mutable

    removeProperty, writeProperty, writePropertyIfAbsent, writePropertyIfAbsent, writePropertyIfPresent, writePropertyIfPresent
  • Field Details

    • propertyDocument

      private final eu.cloudnetservice.driver.document.Document.Mutable propertyDocument
    • lastServiceInfo

      private final eu.cloudnetservice.driver.service.ServiceInfoSnapshot lastServiceInfo
  • Constructor Details

    • ServiceInfoPropertiesConfigureEvent

      public ServiceInfoPropertiesConfigureEvent(@NonNull eu.cloudnetservice.driver.document.Document.Mutable propertyDocument, @NonNull @NonNull eu.cloudnetservice.driver.service.ServiceInfoSnapshot lastServiceInfo)
      Constructs a new service properties configure event.
      Parameters:
      propertyDocument - the target document, can be preconfigured with properties.
      lastServiceInfo - the last published service info, for reference.
      Throws:
      NullPointerException - if the given property document or last service info is null.
  • Method Details

    • propertyHolder

      @NonNull public eu.cloudnetservice.driver.document.Document.Mutable propertyHolder()
      Specified by:
      propertyHolder in interface eu.cloudnetservice.driver.document.property.DocPropertyHolder
      Specified by:
      propertyHolder in interface eu.cloudnetservice.driver.document.property.DocPropertyHolder.Mutable<ServiceInfoPropertiesConfigureEvent>
    • lastServiceInfo

      @NonNull public @NonNull eu.cloudnetservice.driver.service.ServiceInfoSnapshot lastServiceInfo()
      Get the last service info of this wrapper.
      Returns:
      the last service info published by this wrapper.