AppserverIo\Appserver\MessageQueue\QueueWorker::attach PHP Method

attach() public method

Attaches a job for the passed wrapper to the worker instance.
public attach ( stdClass $jobWrapper ) : void
$jobWrapper stdClass The job wrapper to attach the job for
return void
    public function attach(\stdClass $jobWrapper)
    {
        // attach the job wrapper
        $this->synchronized(function (QueueWorker $self, \stdClass $jw) {
            $self->jobsToExecute[$jw->jobId] = $jw;
        }, $this, $jobWrapper);
    }