}
private Runnable toRunnable(final ActionTask task) {
final PlatformLayerKey target = task.target;
final PlatformLayerEndpointInfo endpoint = rehydrateEndpoint(task.endpoint);
Runnable runnable = new Runnable() {
@Override
public void run() {
try {
PlatformLayerClient platformLayer = HttpPlatformLayerClient.build(httpStrategy,
endpoint.getPlatformlayerBaseUrl(), endpoint.getAuthenticator(), endpoint.getProjectId(),
endpoint.getTrustKeys());
platformLayer.doAction(target, task.action);
// TODO: Wait for task completion??
// TODO: Link job id??