Async::JobSourceAsyncJobProcessorGeneric

class Generic

Represents a generic processor that delegates job execution to a provided delegate. This processor acts as a simple wrapper around any object that responds to call, start, and stop methods.

Definitions

def initialize(delegate)

Initialize a new generic processor.

Signature

parameter delegate Object

The delegate object that will handle job execution.

Implementation

def initialize(delegate)
	@delegate = delegate
end

def call(job)

Process a job by delegating to the configured delegate.

Signature

parameter job Object

The job to be processed.

Implementation

def call(job)
	@delegate.call(job)
end

def start

Start the processor by delegating to the configured delegate.

Implementation

def start
	@delegate.start
end

def stop

Stop the processor by delegating to the configured delegate.

Implementation

def stop
	@delegate.stop
end