WIP @rmi annotations

This commit is contained in:
nathan 2020-08-31 14:52:42 +02:00
parent ab2395845b
commit 32e9a68222
12 changed files with 22 additions and 20 deletions

View File

@ -37,8 +37,8 @@ package dorkboxTest.network.rmi
import dorkbox.network.connection.Connection import dorkbox.network.connection.Connection
import dorkbox.network.rmi.RemoteObject import dorkbox.network.rmi.RemoteObject
import dorkbox.network.serialization.Serialization import dorkbox.network.serialization.Serialization
import dorkboxTest.network.rmi.classes.MessageWithTestCow import dorkboxTest.network.rmi.cows.MessageWithTestCow
import dorkboxTest.network.rmi.classes.TestCow import dorkboxTest.network.rmi.cows.TestCow
import org.junit.Assert import org.junit.Assert
object RmiCommonTest { object RmiCommonTest {

View File

@ -119,8 +119,10 @@ class RmiOverrideAndProxyTest : BaseTest() {
val client = Client<Connection>(configuration) val client = Client<Connection>(configuration)
addEndPoint(client) addEndPoint(client)
client.onConnect { connection -> client.onConnect { connection ->
connection.createObject<TestObject>() { rmiId, remoteObject -> connection.logger.error("Connected")
connection.createObject<TestObject> { rmiId, remoteObject ->
connection.logger.error("Starting test") connection.logger.error("Starting test")
remoteObject.setValue(43.21f) remoteObject.setValue(43.21f)

View File

@ -39,9 +39,9 @@ import dorkbox.network.Configuration
import dorkbox.network.Server import dorkbox.network.Server
import dorkbox.network.connection.Connection import dorkbox.network.connection.Connection
import dorkboxTest.network.BaseTest import dorkboxTest.network.BaseTest
import dorkboxTest.network.rmi.classes.MessageWithTestCow import dorkboxTest.network.rmi.cows.MessageWithTestCow
import dorkboxTest.network.rmi.classes.TestCow import dorkboxTest.network.rmi.cows.TestCow
import dorkboxTest.network.rmi.classes.TestCowImpl import dorkboxTest.network.rmi.cows.TestCowImpl
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import org.junit.Assert import org.junit.Assert
import org.junit.Test import org.junit.Test

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package dorkboxTest.network.rmi.classes package dorkboxTest.network.rmi.cows
class MessageWithTestCow(val testCow: TestCow) { class MessageWithTestCow(val testCow: TestCow) {
var number = 0 var number = 0

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package dorkboxTest.network.rmi.classes package dorkboxTest.network.rmi.cows
/** /**
* *

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package dorkboxTest.network.rmi.classes package dorkboxTest.network.rmi.cows
class TestBabyCowImpl(id: Int) : TestCowImpl(id), TestBabyCow { class TestBabyCowImpl(id: Int) : TestCowImpl(id), TestBabyCow {
override fun drink() { override fun drink() {

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package dorkboxTest.network.rmi.classes package dorkboxTest.network.rmi.cows
/** /**
* *

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package dorkboxTest.network.rmi.classes package dorkboxTest.network.rmi.cows
/** /**
* This is a different interface so we can also test CachedMethod operations * This is a different interface so we can also test CachedMethod operations

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package dorkboxTest.network.rmi.classes package dorkboxTest.network.rmi.cows
open class TestCowBaseImpl : TestCowBase { open class TestCowBaseImpl : TestCowBase {
override fun throwException() { override fun throwException() {

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package dorkboxTest.network.rmi.classes package dorkboxTest.network.rmi.cows
import dorkbox.network.connection.Connection import dorkbox.network.connection.Connection
import kotlinx.coroutines.delay import kotlinx.coroutines.delay

View File

@ -26,9 +26,9 @@ import dorkbox.network.Client
import dorkbox.network.connection.Connection import dorkbox.network.connection.Connection
import dorkboxTest.network.BaseTest import dorkboxTest.network.BaseTest
import dorkboxTest.network.rmi.RmiCommonTest import dorkboxTest.network.rmi.RmiCommonTest
import dorkboxTest.network.rmi.classes.TestBabyCow import dorkboxTest.network.rmi.cows.TestBabyCow
import dorkboxTest.network.rmi.classes.TestBabyCowImpl import dorkboxTest.network.rmi.cows.TestBabyCowImpl
import dorkboxTest.network.rmi.classes.TestCow import dorkboxTest.network.rmi.cows.TestCow
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import org.junit.Assert import org.junit.Assert
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory

View File

@ -19,10 +19,10 @@ import dorkbox.network.Server
import dorkbox.network.connection.Connection import dorkbox.network.connection.Connection
import dorkboxTest.network.BaseTest import dorkboxTest.network.BaseTest
import dorkboxTest.network.rmi.RmiCommonTest import dorkboxTest.network.rmi.RmiCommonTest
import dorkboxTest.network.rmi.classes.MessageWithTestCow import dorkboxTest.network.rmi.cows.MessageWithTestCow
import dorkboxTest.network.rmi.classes.TestBabyCow import dorkboxTest.network.rmi.cows.TestBabyCow
import dorkboxTest.network.rmi.classes.TestCow import dorkboxTest.network.rmi.cows.TestCow
import dorkboxTest.network.rmi.classes.TestCowImpl import dorkboxTest.network.rmi.cows.TestCowImpl
import dorkboxTest.network.rmi.multiJVM.TestClient.setup import dorkboxTest.network.rmi.multiJVM.TestClient.setup
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import org.junit.Assert import org.junit.Assert