Interface SourceHandler
- 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_NAMEFields inherited from interface org.mule.runtime.api.lifecycle.Startable
PHASE_NAMEFields inherited from interface org.mule.runtime.api.lifecycle.Stoppable
PHASE_NAME -
Method Summary
-
Method Details
-
start
void start() throws org.mule.runtime.api.exception.MuleExceptionStarts the source, which means it will start producing messages.Calling this method on an already started instance has no effect.
- Specified by:
startin interfaceorg.mule.runtime.api.lifecycle.Startable- Throws:
org.mule.runtime.api.exception.MuleException- if it fails to startIllegalStateException- ifdispose()has already been invoked
-
stop
void stop() throws org.mule.runtime.api.exception.MuleExceptionStops the source, which means it will stop producing messages. It can be restarted by invokingstart()again.Calling this method on an already stopped instance has no effect.
- Specified by:
stopin interfaceorg.mule.runtime.api.lifecycle.Stoppable- Throws:
org.mule.runtime.api.exception.MuleException- if it fails to stopIllegalStateException- ifdispose()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:
disposein interfaceorg.mule.runtime.api.lifecycle.Disposable
-