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

io.microservices.canvas.model.Operation.kt Maven / Gradle / Ivy

There is a newer version: 0.12.0.RELEASE
Show newest version
package io.microservices.canvas.model;

data class Operation(val name : String, val type : OperationType, val endpoints : MutableList) {
    fun add(endpoint: OperationEndpoint) {
        endpoints.add(endpoint)
    }
}

enum class OperationType { COMMAND, QUERY };

interface OperationEndpoint {
    val type : OperationEndpointType
}

enum class OperationEndpointType {
    SYNCHRONOUS, ASYNCHRONOUS
}

data class SynchronousOperationEndpoint(val method : String, val path : String) : OperationEndpoint {

    override val type = OperationEndpointType.SYNCHRONOUS
}

data class AsynchronousOperationEndpoint(val channel : String) : OperationEndpoint {

    override val type = OperationEndpointType.ASYNCHRONOUS
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy