All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.digitaldan.harmony.messages.StartActivityMessage Maven / Gradle / Ivy

There is a newer version: 1.1.7
Show newest version
package com.digitaldan.harmony.messages;

import java.util.HashMap;
import java.util.Map;

public class StartActivityMessage {
    public static final String MIME_TYPE = "harmony.activityengine?runactivity";

    public static class StartActivityRequestMessage extends RequestMessage {

        HashMap params = new HashMap<>();

        public StartActivityRequestMessage(int activityId, long timeStamp) {
            super(MIME_TYPE);
            HashMap args = new HashMap<>();
            args.put("rule", "start");
            params.put("activityId", String.valueOf(activityId));
            params.put("timeStamp", timeStamp);
            params.put("args", args);
        }

        @Override
        public Map getParams() {
            return params;
        }

    }

    public static class StartActivityResponseMethod extends ResponseMessage {

        public StartActivityResponseMethod(int code, String id, String msg) {
            super(code, id, msg);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy