mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +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
|
||||
|
||||
|
||||
class Explorer(explorerController: ExplorerController) : AutoCloseable {
|
||||
class Explorer(val explorerController: ExplorerController) : AutoCloseable {
|
||||
private val log = LoggerFactory.getLogger(Explorer::class.jvmName)
|
||||
|
||||
private val explorerController: ExplorerController = explorerController
|
||||
private val executor = Executors.newSingleThreadExecutor()
|
||||
private var process: Process? = null
|
||||
|
||||
|
@ -1,19 +1,11 @@
|
||||
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
|
||||
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()
|
||||
|
@ -9,28 +9,12 @@ import java.lang.String.join
|
||||
class NodeConfig(
|
||||
legalName: String,
|
||||
artemisPort: Int,
|
||||
nearestCity: String,
|
||||
webPort: Int,
|
||||
h2Port: Int,
|
||||
extraServices: List<String>
|
||||
val nearestCity: String,
|
||||
val webPort: Int,
|
||||
val h2Port: Int,
|
||||
val extraServices: List<String>
|
||||
) : 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
|
||||
var networkMap : NetworkMapConfig?
|
||||
get() { return networkMapValue }
|
||||
|
Loading…
Reference in New Issue
Block a user