Interface ActionConverter<E extends Action>

All Known Implementing Classes:
AllocateConverter, BootNodeConverter, BootVMConverter, KillVMConverter, MigrateVMConverter, ResumeVMConverter, ShutdownNodeConverter, ShutdownVMConverter, SuspendVMConverter

public interface ActionConverter<E extends Action>
Specify a JSON converter for a Action.
Author:
Fabien Hermenier
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static String END_LABEL
    Key that indicates the end an action.
    static String ID_LABEL
    Key that indicate the action identifier
    static String NODE_LABEL
    Key that indicates a node identifier.
    static String ON_LABEL
    Key that indicates the current position of a VM.
    static String RC_AMOUNT_LABEL
    Key to indicate a resource amount.
    static String RC_LABEL
    Key to indicate a resource identifier.
    static String START_LABEL
    Key that indicates the beginning an action.
    static String VM_DESTINATION_LABEL  
    static String VM_LABEL
    Key that indicates a VM identifier.
    static String VM_LOCATION_LABEL  
  • Method Summary

    Modifier and Type Method Description
    default int end​(net.minidev.json.JSONObject json)
    Get the end moment for the given JSON action.
    void fillJSON​(E action, net.minidev.json.JSONObject ob)
    Fill the JSON skeleton that will represent this action.
    E fromJSON​(Model mo, net.minidev.json.JSONObject ob)
    Create an action from a JSON Object.
    String id()
    The JSON identifier for the action.
    default int start​(net.minidev.json.JSONObject json)
    Get the start moment for the given JSON action.
    Class<E> supportedAction()
    The action that is supported by this converter.
    default net.minidev.json.JSONObject toJSON​(E action)
    Create a JSON from an action.