Class InMemorySource


  • public class InMemorySource
    extends Source
    Implementation of Source to receive events through in-memory transport.
    • Constructor Detail

      • InMemorySource

        public InMemorySource()
    • Method Detail

      • exposeServiceDeploymentInfo

        protected ServiceDeploymentInfo exposeServiceDeploymentInfo()
        Description copied from class: Source
        Give information to the deployment about the service exposed by the sink.
        Specified by:
        exposeServiceDeploymentInfo in class Source
        Returns:
        ServiceDeploymentInfo Service related information to the deployment
      • init

        public StateFactory<State> init​(SourceEventListener sourceEventListener,
                                        OptionHolder optionHolder,
                                        String[] requestedTransportPropertyNames,
                                        ConfigReader configReader,
                                        SiddhiAppContext siddhiAppContext)
        Description copied from class: Source
        To initialize the source. (This will be called only once, no connection to external systems should be made at this point).
        Specified by:
        init in class Source
        Parameters:
        sourceEventListener - The listener to pass the events for processing which are consumed by the source
        optionHolder - Contains static options of the source
        requestedTransportPropertyNames - Requested transport properties that should be passed to SourceEventListener
        configReader - System configuration reader for source
        siddhiAppContext - Siddhi application context
      • getOutputEventClasses

        public Class[] getOutputEventClasses()
        Description copied from class: Source
        Get produced event class types
        Specified by:
        getOutputEventClasses in class Source
        Returns:
        Array of classes that will be produced by the source, null or empty array if it can produce any type of class.
      • disconnect

        public void disconnect()
        Description copied from class: Source
        Called to disconnect from the source backend, or when ConnectionUnavailableException is thrown
        Specified by:
        disconnect in class Source
      • destroy

        public void destroy()
        Description copied from class: Source
        Called at the end to clean all the resources consumed
        Specified by:
        destroy in class Source
      • pause

        public void pause()
        Description copied from class: Source
        Called to pause event consumption
        Specified by:
        pause in class Source
      • resume

        public void resume()
        Description copied from class: Source
        Called to resume event consumption
        Specified by:
        resume in class Source