summaryrefslogblamecommitdiffstats
path: root/gearman/controllerWorker/ControllerWorker/StatusWorker.java
blob: deb6531a714d021357732727941fd8a8a08636dd (plain) (tree)




























                                                                                              
package ControllerWorker;

import org.gearman.client.GearmanJobResult;
import org.gearman.client.GearmanJobResultImpl;
import org.gearman.worker.AbstractGearmanFunction;

public class StatusWorker extends AbstractGearmanFunction {
	@Override
	public String getName() {
		return "status";
	}

	@Override
	public GearmanJobResult executeFunction() {
		// String data = ByteUtils.fromUTF8Bytes((byte[]) this.data);

		// HashMap<Integer, Integer> status = Boot.STATUS;

		String res = "Status Update";

		byte[] warnings = new byte[0];
		byte[] exceptions = new byte[0];
		int numerator = 0;
		int denominator = 0;
		GearmanJobResult gjr = new GearmanJobResultImpl(this.jobHandle, true,
				res.getBytes(), warnings, exceptions, numerator, denominator);
		return gjr;
	}
}