Class ServiceImpl

java.lang.Object
io.github.simplex.api.ExecutableService
io.github.simplex.impl.ServiceImpl
All Implemented Interfaces:
IService, Runnable

public class ServiceImpl extends ExecutableService
  • Field Details

    • plugin

      private final Main plugin
  • Constructor Details

    • ServiceImpl

      public ServiceImpl(Main plugin)
  • Method Details

    • start

      public reactor.core.publisher.Mono<Void> start()
      Description copied from interface: IService
      The actual start method for the service. This should be overridden by subclasses, and should include all the required code necessary to execute when the service is queued.
      Returns:
      An encapsulated Mono object representing the start method for the service.
    • stop

      public reactor.core.publisher.Mono<Void> stop()
      Description copied from interface: IService
      The actual end method for the service. This should be overridden by subclasses, and should include all the required code necessary to execute when the service is stopped.
      Returns:
      An encapsulated Mono object representing the end method for the service.
    • getPlugin

      public Main getPlugin()
      Returns:
      The plugin which was defined in the constructor. This should be an instance of your main plugin class.
    • getParentPool

      public reactor.core.publisher.Mono<ServicePool> getParentPool()
      Returns:
      The ServicePool which this service is executing on.