diff --git a/src/dorkbox/network/Client.kt b/src/dorkbox/network/Client.kt index 3f0a54bd..9c53e6ba 100644 --- a/src/dorkbox/network/Client.kt +++ b/src/dorkbox/network/Client.kt @@ -79,14 +79,14 @@ open class Client(config: Configuration = Configuration private val lockStepForReconnect = atomic(null) - override fun newException(message: String, cause: Throwable?): Throwable { + final override fun newException(message: String, cause: Throwable?): Throwable { return ClientException(message, cause) } /** * So the client class can get remote objects that are THE SAME OBJECT as if called from a connection */ - override fun getRmiConnectionSupport(): RmiManagerConnections { + final override fun getRmiConnectionSupport(): RmiManagerConnections { return rmiConnectionSupport } @@ -601,6 +601,10 @@ open class Client(config: Configuration = Configuration } } + // no impl + final override fun close0() {} + + // RMI notes (in multiple places, copypasta, because this is confusing if not written down) // // only server can create a global object (in itself, via save) diff --git a/src/dorkbox/network/Server.kt b/src/dorkbox/network/Server.kt index bb32123f..d854ac5a 100644 --- a/src/dorkbox/network/Server.kt +++ b/src/dorkbox/network/Server.kt @@ -33,6 +33,7 @@ import dorkbox.network.handshake.HandshakeMessage import dorkbox.network.handshake.ServerHandshake import dorkbox.network.rmi.RemoteObject import dorkbox.network.rmi.RemoteObjectStorage +import dorkbox.network.rmi.RmiManagerConnections import dorkbox.network.rmi.TimeoutException import io.aeron.Aeron import io.aeron.FragmentAssembler @@ -146,10 +147,13 @@ open class Server(config: ServerConfiguration = ServerC serialization.finishInit(type, ByteArray(0)) } - override fun newException(message: String, cause: Throwable?): Throwable { + final override fun newException(message: String, cause: Throwable?): Throwable { return ServerException(message, cause) } + final override fun getRmiConnectionSupport(): RmiManagerConnections { + return super.getRmiConnectionSupport() + } private suspend fun getIpcPoller(aeron: Aeron, config: ServerConfiguration): AeronPoller { val poller = if (config.enableIpc) { @@ -642,7 +646,7 @@ open class Server(config: ServerConfiguration = ServerC /** * Closes the server and all it's connections. After a close, you may call 'bind' again. */ - override fun close0() { + final override fun close0() { // when we call close, it will shutdown the polling mechanism then wait for us to tell it to cleanup connections. // // Aeron + the Media Driver will have already been shutdown at this point.