mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
Simplify Kotlin objects.
This commit is contained in:
parent
f9ac03287c
commit
8c478ff7cc
@ -5,10 +5,9 @@ import java.util.concurrent.Executors
|
|||||||
import kotlin.reflect.jvm.jvmName
|
import kotlin.reflect.jvm.jvmName
|
||||||
|
|
||||||
|
|
||||||
class Explorer(explorerController: ExplorerController) : AutoCloseable {
|
class Explorer(val explorerController: ExplorerController) : AutoCloseable {
|
||||||
private val log = LoggerFactory.getLogger(Explorer::class.jvmName)
|
private val log = LoggerFactory.getLogger(Explorer::class.jvmName)
|
||||||
|
|
||||||
private val explorerController: ExplorerController = explorerController
|
|
||||||
private val executor = Executors.newSingleThreadExecutor()
|
private val executor = Executors.newSingleThreadExecutor()
|
||||||
private var process: Process? = null
|
private var process: Process? = null
|
||||||
|
|
||||||
|
@ -1,19 +1,11 @@
|
|||||||
package net.corda.demobench.model
|
package net.corda.demobench.model
|
||||||
|
|
||||||
open class NetworkMapConfig(legalName: String, artemisPort: Int) {
|
open class NetworkMapConfig(val legalName: String, val artemisPort: Int) {
|
||||||
|
|
||||||
private var keyValue: String = toKey(legalName)
|
private var keyValue = toKey(legalName)
|
||||||
val key : String
|
val key : String
|
||||||
get() { return keyValue }
|
get() { return keyValue }
|
||||||
|
|
||||||
private var legalNameValue: String = legalName
|
|
||||||
val legalName : String
|
|
||||||
get() { return legalNameValue }
|
|
||||||
|
|
||||||
private var artemisPortValue: Int = artemisPort
|
|
||||||
val artemisPort : Int
|
|
||||||
get() { return artemisPortValue }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private val WHITESPACE = "\\s++".toRegex()
|
private val WHITESPACE = "\\s++".toRegex()
|
||||||
|
@ -9,28 +9,12 @@ import java.lang.String.join
|
|||||||
class NodeConfig(
|
class NodeConfig(
|
||||||
legalName: String,
|
legalName: String,
|
||||||
artemisPort: Int,
|
artemisPort: Int,
|
||||||
nearestCity: String,
|
val nearestCity: String,
|
||||||
webPort: Int,
|
val webPort: Int,
|
||||||
h2Port: Int,
|
val h2Port: Int,
|
||||||
extraServices: List<String>
|
val extraServices: List<String>
|
||||||
) : NetworkMapConfig(legalName, artemisPort) {
|
) : NetworkMapConfig(legalName, artemisPort) {
|
||||||
|
|
||||||
private var nearestCityName: String = nearestCity
|
|
||||||
val nearestCity : String
|
|
||||||
get() { return nearestCityName }
|
|
||||||
|
|
||||||
private var webPortValue: Int = webPort
|
|
||||||
val webPort : Int
|
|
||||||
get() { return webPortValue }
|
|
||||||
|
|
||||||
private var h2PortValue: Int = h2Port
|
|
||||||
val h2Port : Int
|
|
||||||
get() { return h2PortValue }
|
|
||||||
|
|
||||||
private var extraServicesValue: List<String> = extraServices
|
|
||||||
val extraServices : List<String>
|
|
||||||
get() { return extraServicesValue }
|
|
||||||
|
|
||||||
private var networkMapValue: NetworkMapConfig? = null
|
private var networkMapValue: NetworkMapConfig? = null
|
||||||
var networkMap : NetworkMapConfig?
|
var networkMap : NetworkMapConfig?
|
||||||
get() { return networkMapValue }
|
get() { return networkMapValue }
|
||||||
|
Loading…
Reference in New Issue
Block a user