disl.proto 1.29 KB
Newer Older
Vít Kabele's avatar
Vít Kabele committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
syntax = "proto3";

option java_package = "ch.usi.dag.dislre.protocol";
option java_outer_classname = "DiSL";
option optimize_for = LITE_RUNTIME;

// Common type to send errors
message Error {
    int32 code = 1;
    string message = 2;
}

// When the client obtains the session_id, next step should be sending
// the instrumentation jar (or more of them) to the instrumentation server.
message InstrumentationDelivery {
    repeated int32 sizes = 1;
    bytes instrumentation = 2;
}

// This is server response to InstrumentationDelivery message
message InstrumentationAcceptConfirmation {
    bool instrumentation_accepted = 1;
    repeated Error errors = 2;
}

message InstrClassInfo {
    string className = 1;
    int64 classLoaderTag = 2;
}

// This is the request to the instrumentaion server to instrument attached class.
message InstrumentClassRequest {
    int32 flags = 2;
    InstrClassInfo classInfo = 5;
    bytes classBytes = 4;
    repeated InstrClassInfo superTypes = 6;
}

// Server response containing either the instrumented classbytes or error message
message InstrumentClassResponse {

    enum InstrumentClassResult {
        CLASS_UNMODIFIED = 0;
        CLASS_MODIFIED = 1;
        ERROR = 3;
    }

    InstrumentClassResult result = 1;
    string errorMessage = 2;
    bytes classBytes = 3;
}