All Superinterfaces:
org.mule.runtime.api.lifecycle.Disposable, org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable

@Experimental @MinMuleVersion("4.5.0") public interface SourceHandler extends org.mule.runtime.api.lifecycle.Startable, org.mule.runtime.api.lifecycle.Stoppable, org.mule.runtime.api.lifecycle.Disposable
Offers management and lifecycle control over a message source created through the ExtensionsClient.

NOTE: Experimental feature. Backwards compatibility not guaranteed.

Since:
1.5.0
  • Field Summary

    Fields inherited from interface org.mule.runtime.api.lifecycle.Disposable

    PHASE_NAME

    Fields inherited from interface org.mule.runtime.api.lifecycle.Startable

    PHASE_NAME

    Fields inherited from interface org.mule.runtime.api.lifecycle.Stoppable

    PHASE_NAME
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Completely disposes the source and all its allocated resources.
    void
    Starts the source, which means it will start producing messages.
    void
    Stops the source, which means it will stop producing messages.
  • Method Details

    • start

      void start() throws org.mule.runtime.api.exception.MuleException
      Starts the source, which means it will start producing messages.

      Calling this method on an already started instance has no effect.

      Specified by:
      start in interface org.mule.runtime.api.lifecycle.Startable
      Throws:
      org.mule.runtime.api.exception.MuleException - if it fails to start
      IllegalStateException - if dispose() has already been invoked
    • stop

      void stop() throws org.mule.runtime.api.exception.MuleException
      Stops the source, which means it will stop producing messages. It can be restarted by invoking start() again.

      Calling this method on an already stopped instance has no effect.

      Specified by:
      stop in interface org.mule.runtime.api.lifecycle.Stoppable
      Throws:
      org.mule.runtime.api.exception.MuleException - if it fails to stop
      IllegalStateException - if dispose() has already been invoked
    • dispose

      void dispose()
      Completely disposes the source and all its allocated resources. It can't be restarted, a new instance needs to be created. Invoking this method on an already disposed instance has no effect.
      Specified by:
      dispose in interface org.mule.runtime.api.lifecycle.Disposable