mirror of
https://github.com/corda/corda.git
synced 2024-12-20 21:43:14 +00:00
Moved the serialisation logic in nodeapi.internal.serialization into its own module: serialization (#3179)
node-api now depends on this module and upcoming changes will use this as well rather than having to depend on node-api. EnumEvolveTests.deserializeWithRename and EnumEvolveTests.multiOperations are temporarily ignored since their test resources can't be regenerated due to bugs.
This commit is contained in:
parent
bbc80429be
commit
3cdd908714
2
.idea/compiler.xml
generated
2
.idea/compiler.xml
generated
@ -131,6 +131,8 @@
|
|||||||
<module name="samples_test" target="1.8" />
|
<module name="samples_test" target="1.8" />
|
||||||
<module name="sandbox_main" target="1.8" />
|
<module name="sandbox_main" target="1.8" />
|
||||||
<module name="sandbox_test" target="1.8" />
|
<module name="sandbox_test" target="1.8" />
|
||||||
|
<module name="serialization_main" target="1.8" />
|
||||||
|
<module name="serialization_test" target="1.8" />
|
||||||
<module name="shell_integrationTest" target="1.8" />
|
<module name="shell_integrationTest" target="1.8" />
|
||||||
<module name="shell_main" target="1.8" />
|
<module name="shell_main" target="1.8" />
|
||||||
<module name="shell_test" target="1.8" />
|
<module name="shell_test" target="1.8" />
|
||||||
|
@ -322,7 +322,7 @@ bintrayConfig {
|
|||||||
projectUrl = 'https://github.com/corda/corda'
|
projectUrl = 'https://github.com/corda/corda'
|
||||||
gpgSign = true
|
gpgSign = true
|
||||||
gpgPassphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
|
gpgPassphrase = System.getenv('CORDA_BINTRAY_GPG_PASSPHRASE')
|
||||||
publications = ['corda-jfx', 'corda-mock', 'corda-rpc', 'corda-core', 'corda', 'corda-finance', 'corda-node', 'corda-node-api', 'corda-test-common', 'corda-test-utils', 'corda-jackson', 'corda-verifier', 'corda-webserver-impl', 'corda-webserver', 'corda-node-driver', 'corda-confidential-identities', 'corda-shell']
|
publications = ['corda-jfx', 'corda-mock', 'corda-rpc', 'corda-core', 'corda', 'corda-finance', 'corda-node', 'corda-node-api', 'corda-test-common', 'corda-test-utils', 'corda-jackson', 'corda-verifier', 'corda-webserver-impl', 'corda-webserver', 'corda-node-driver', 'corda-confidential-identities', 'corda-shell', 'corda-serialization']
|
||||||
license {
|
license {
|
||||||
name = 'Apache-2.0'
|
name = 'Apache-2.0'
|
||||||
url = 'https://www.apache.org/licenses/LICENSE-2.0'
|
url = 'https://www.apache.org/licenses/LICENSE-2.0'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package net.corda.client.rpc
|
package net.corda.client.rpc
|
||||||
|
|
||||||
import net.corda.client.rpc.internal.serialization.amqp.AMQPClientSerializationScheme
|
|
||||||
import net.corda.client.rpc.internal.RPCClient
|
|
||||||
import net.corda.client.rpc.internal.CordaRPCClientConfigurationImpl
|
import net.corda.client.rpc.internal.CordaRPCClientConfigurationImpl
|
||||||
|
import net.corda.client.rpc.internal.RPCClient
|
||||||
|
import net.corda.client.rpc.internal.serialization.amqp.AMQPClientSerializationScheme
|
||||||
import net.corda.core.context.Actor
|
import net.corda.core.context.Actor
|
||||||
import net.corda.core.context.Trace
|
import net.corda.core.context.Trace
|
||||||
import net.corda.core.messaging.CordaRPCOps
|
import net.corda.core.messaging.CordaRPCOps
|
||||||
@ -11,7 +11,7 @@ import net.corda.core.utilities.NetworkHostAndPort
|
|||||||
import net.corda.nodeapi.ArtemisTcpTransport.Companion.tcpTransport
|
import net.corda.nodeapi.ArtemisTcpTransport.Companion.tcpTransport
|
||||||
import net.corda.nodeapi.ConnectionDirection
|
import net.corda.nodeapi.ConnectionDirection
|
||||||
import net.corda.nodeapi.internal.config.SSLConfiguration
|
import net.corda.nodeapi.internal.config.SSLConfiguration
|
||||||
import net.corda.nodeapi.internal.serialization.AMQP_RPC_CLIENT_CONTEXT
|
import net.corda.serialization.internal.AMQP_RPC_CLIENT_CONTEXT
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,12 +7,12 @@ import net.corda.core.serialization.SerializationCustomSerializer
|
|||||||
import net.corda.core.serialization.internal.SerializationEnvironment
|
import net.corda.core.serialization.internal.SerializationEnvironment
|
||||||
import net.corda.core.serialization.internal.SerializationEnvironmentImpl
|
import net.corda.core.serialization.internal.SerializationEnvironmentImpl
|
||||||
import net.corda.core.serialization.internal.nodeSerializationEnv
|
import net.corda.core.serialization.internal.nodeSerializationEnv
|
||||||
import net.corda.nodeapi.internal.serialization.*
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.amqpMagic
|
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.custom.RxNotificationSerializer
|
import net.corda.nodeapi.internal.serialization.amqp.custom.RxNotificationSerializer
|
||||||
|
import net.corda.serialization.internal.*
|
||||||
|
import net.corda.serialization.internal.amqp.AbstractAMQPSerializationScheme
|
||||||
|
import net.corda.serialization.internal.amqp.SerializerFactory
|
||||||
|
import net.corda.serialization.internal.amqp.amqpMagic
|
||||||
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When set as the serialization scheme for a process, sets it to be the Corda AMQP implementation.
|
* When set as the serialization scheme for a process, sets it to be the Corda AMQP implementation.
|
||||||
|
@ -2,9 +2,8 @@ package net.corda.client.rpc.internal.serialization.amqp
|
|||||||
|
|
||||||
import net.corda.core.concurrent.CordaFuture
|
import net.corda.core.concurrent.CordaFuture
|
||||||
import net.corda.core.toFuture
|
import net.corda.core.toFuture
|
||||||
import net.corda.core.toObservable
|
import net.corda.serialization.internal.amqp.CustomSerializer
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.CustomSerializer
|
import net.corda.serialization.internal.amqp.SerializerFactory
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory
|
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import net.corda.client.rpc.internal.ObservableContext
|
|||||||
import net.corda.core.context.Trace
|
import net.corda.core.context.Trace
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.nodeapi.RPCApi
|
import net.corda.nodeapi.RPCApi
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.*
|
import net.corda.serialization.internal.amqp.*
|
||||||
import org.apache.qpid.proton.codec.Data
|
import org.apache.qpid.proton.codec.Data
|
||||||
import rx.Notification
|
import rx.Notification
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
@ -2,12 +2,12 @@ package net.corda.core.contracts
|
|||||||
|
|
||||||
import net.corda.core.crypto.SecureHash
|
import net.corda.core.crypto.SecureHash
|
||||||
import net.corda.core.transactions.LedgerTransaction
|
import net.corda.core.transactions.LedgerTransaction
|
||||||
import net.corda.nodeapi.internal.serialization.AMQP_RPC_CLIENT_CONTEXT
|
import net.corda.serialization.internal.AMQP_RPC_CLIENT_CONTEXT
|
||||||
import net.corda.nodeapi.internal.serialization.AllWhitelist
|
import net.corda.serialization.internal.AllWhitelist
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.DeserializationInput
|
import net.corda.serialization.internal.amqp.DeserializationInput
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializationOutput
|
import net.corda.serialization.internal.amqp.SerializationOutput
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory
|
import net.corda.serialization.internal.amqp.SerializerFactory
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.custom.PublicKeySerializer
|
import net.corda.serialization.internal.amqp.custom.PublicKeySerializer
|
||||||
import net.corda.testing.core.DUMMY_BANK_A_NAME
|
import net.corda.testing.core.DUMMY_BANK_A_NAME
|
||||||
import net.corda.testing.core.DUMMY_NOTARY_NAME
|
import net.corda.testing.core.DUMMY_NOTARY_NAME
|
||||||
import net.corda.testing.core.TestIdentity
|
import net.corda.testing.core.TestIdentity
|
||||||
|
@ -3,9 +3,9 @@ package net.corda.core.utilities
|
|||||||
import com.esotericsoftware.kryo.KryoException
|
import com.esotericsoftware.kryo.KryoException
|
||||||
import net.corda.core.crypto.random63BitValue
|
import net.corda.core.crypto.random63BitValue
|
||||||
import net.corda.core.serialization.*
|
import net.corda.core.serialization.*
|
||||||
import net.corda.nodeapi.internal.serialization.KRYO_CHECKPOINT_CONTEXT
|
import net.corda.serialization.internal.KRYO_CHECKPOINT_CONTEXT
|
||||||
import net.corda.nodeapi.internal.serialization.SerializationContextImpl
|
import net.corda.serialization.internal.SerializationContextImpl
|
||||||
import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
|
import net.corda.serialization.internal.kryo.kryoMagic
|
||||||
import net.corda.testing.core.SerializationEnvironmentRule
|
import net.corda.testing.core.SerializationEnvironmentRule
|
||||||
import org.assertj.core.api.Assertions.assertThat
|
import org.assertj.core.api.Assertions.assertThat
|
||||||
import org.junit.Rule
|
import org.junit.Rule
|
||||||
@ -24,8 +24,8 @@ class KotlinUtilsTest {
|
|||||||
@Rule
|
@Rule
|
||||||
val expectedEx: ExpectedException = ExpectedException.none()
|
val expectedEx: ExpectedException = ExpectedException.none()
|
||||||
|
|
||||||
val KRYO_CHECKPOINT_NOWHITELIST_CONTEXT = SerializationContextImpl(kryoMagic,
|
private val KRYO_CHECKPOINT_NOWHITELIST_CONTEXT = SerializationContextImpl(kryoMagic,
|
||||||
SerializationDefaults.javaClass.classLoader,
|
javaClass.classLoader,
|
||||||
EmptyWhitelist,
|
EmptyWhitelist,
|
||||||
emptyMap(),
|
emptyMap(),
|
||||||
true,
|
true,
|
||||||
|
@ -4,8 +4,8 @@ import net.corda.core.crypto.SecureHash
|
|||||||
import net.corda.core.serialization.EncodingWhitelist
|
import net.corda.core.serialization.EncodingWhitelist
|
||||||
import net.corda.core.serialization.SerializationEncoding
|
import net.corda.core.serialization.SerializationEncoding
|
||||||
import net.corda.core.utilities.ByteSequence
|
import net.corda.core.utilities.ByteSequence
|
||||||
import net.corda.nodeapi.internal.serialization.SerializationFactoryImpl
|
import net.corda.serialization.internal.SerializationFactoryImpl
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.*
|
import net.corda.serialization.internal.amqp.*
|
||||||
import org.apache.qpid.proton.amqp.Binary
|
import org.apache.qpid.proton.amqp.Binary
|
||||||
import org.apache.qpid.proton.amqp.DescribedType
|
import org.apache.qpid.proton.amqp.DescribedType
|
||||||
import org.apache.qpid.proton.amqp.Symbol
|
import org.apache.qpid.proton.amqp.Symbol
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package net.corda.blobinspector
|
package net.corda.blobinspector
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializedBytes
|
import net.corda.core.serialization.SerializedBytes
|
||||||
import net.corda.nodeapi.internal.serialization.AllWhitelist
|
import net.corda.serialization.internal.AllWhitelist
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializationOutput
|
import net.corda.serialization.internal.amqp.SerializationOutput
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory
|
import net.corda.serialization.internal.amqp.SerializerFactory
|
||||||
import net.corda.nodeapi.internal.serialization.AMQP_P2P_CONTEXT
|
import net.corda.serialization.internal.AMQP_P2P_CONTEXT
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,10 +7,10 @@ description 'Corda node API'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(":core")
|
compile project(":core")
|
||||||
|
compile project(":serialization") // TODO Remove this once the NetworkBootstrapper class is moved into the tools:bootstrapper module
|
||||||
|
|
||||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||||
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
|
||||||
|
|
||||||
// TODO: remove the forced update of commons-collections and beanutils when artemis updates them
|
// TODO: remove the forced update of commons-collections and beanutils when artemis updates them
|
||||||
compile "org.apache.commons:commons-collections4:${commons_collections_version}"
|
compile "org.apache.commons:commons-collections4:${commons_collections_version}"
|
||||||
@ -27,26 +27,18 @@ dependencies {
|
|||||||
// TypeSafe Config: for simple and human friendly config files.
|
// TypeSafe Config: for simple and human friendly config files.
|
||||||
compile "com.typesafe:config:$typesafe_config_version"
|
compile "com.typesafe:config:$typesafe_config_version"
|
||||||
|
|
||||||
// Kryo: object graph serialization.
|
|
||||||
compile "com.esotericsoftware:kryo:4.0.0"
|
|
||||||
compile "de.javakaffee:kryo-serializers:0.41"
|
|
||||||
compile "org.ow2.asm:asm:$asm_version"
|
|
||||||
|
|
||||||
// For AMQP serialisation.
|
|
||||||
compile "org.apache.qpid:proton-j:$protonj_version"
|
compile "org.apache.qpid:proton-j:$protonj_version"
|
||||||
|
|
||||||
// FastClasspathScanner: classpath scanning - needed for the NetworkBootstrapper and AMQP.
|
// FastClasspathScanner: classpath scanning - needed for the NetworkBootstrapper.
|
||||||
compile "io.github.lukehutch:fast-classpath-scanner:$fast_classpath_scanner_version"
|
compile "io.github.lukehutch:fast-classpath-scanner:$fast_classpath_scanner_version"
|
||||||
|
|
||||||
// Pure-Java Snappy compression
|
|
||||||
compile "org.iq80.snappy:snappy:$snappy_version"
|
|
||||||
|
|
||||||
// For caches rather than guava
|
// For caches rather than guava
|
||||||
compile "com.github.ben-manes.caffeine:caffeine:$caffeine_version"
|
compile "com.github.ben-manes.caffeine:caffeine:$caffeine_version"
|
||||||
|
|
||||||
// Unit testing helpers.
|
// Unit testing helpers.
|
||||||
testCompile "junit:junit:$junit_version"
|
testCompile "junit:junit:$junit_version"
|
||||||
testCompile "org.assertj:assertj-core:$assertj_version"
|
testCompile "org.assertj:assertj-core:$assertj_version"
|
||||||
|
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
||||||
testCompile project(':node-driver')
|
testCompile project(':node-driver')
|
||||||
|
|
||||||
compile ("org.apache.activemq:artemis-amqp-protocol:${artemis_version}") {
|
compile ("org.apache.activemq:artemis-amqp-protocol:${artemis_version}") {
|
||||||
|
@ -23,13 +23,13 @@ import net.corda.nodeapi.internal.ContractsJarFile
|
|||||||
import net.corda.nodeapi.internal.DEV_ROOT_CA
|
import net.corda.nodeapi.internal.DEV_ROOT_CA
|
||||||
import net.corda.nodeapi.internal.SignedNodeInfo
|
import net.corda.nodeapi.internal.SignedNodeInfo
|
||||||
import net.corda.nodeapi.internal.network.NodeInfoFilesCopier.Companion.NODE_INFO_FILE_NAME_PREFIX
|
import net.corda.nodeapi.internal.network.NodeInfoFilesCopier.Companion.NODE_INFO_FILE_NAME_PREFIX
|
||||||
import net.corda.nodeapi.internal.serialization.CordaSerializationMagic
|
import net.corda.serialization.internal.AMQP_P2P_CONTEXT
|
||||||
import net.corda.nodeapi.internal.serialization.AMQP_P2P_CONTEXT
|
import net.corda.serialization.internal.CordaSerializationMagic
|
||||||
import net.corda.nodeapi.internal.serialization.SerializationFactoryImpl
|
import net.corda.serialization.internal.SerializationFactoryImpl
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme
|
import net.corda.serialization.internal.amqp.AbstractAMQPSerializationScheme
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.amqpMagic
|
import net.corda.serialization.internal.amqp.amqpMagic
|
||||||
import net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme
|
import net.corda.serialization.internal.kryo.AbstractKryoSerializationScheme
|
||||||
import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
|
import net.corda.serialization.internal.kryo.kryoMagic
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
import java.nio.file.StandardCopyOption.REPLACE_EXISTING
|
import java.nio.file.StandardCopyOption.REPLACE_EXISTING
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp.custom
|
package net.corda.nodeapi.internal.serialization.amqp.custom
|
||||||
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.CustomSerializer
|
import net.corda.serialization.internal.amqp.CustomSerializer
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory
|
import net.corda.serialization.internal.amqp.SerializerFactory
|
||||||
import rx.Notification
|
import rx.Notification
|
||||||
|
|
||||||
class RxNotificationSerializer(
|
class RxNotificationSerializer(
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp.custom
|
|
||||||
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.CustomSerializer
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A serializer for [StringBuffer].
|
|
||||||
*/
|
|
||||||
object StringBufferSerializer : CustomSerializer.ToString<StringBuffer>(StringBuffer::class.java)
|
|
@ -11,10 +11,10 @@ import net.corda.core.serialization.serialize
|
|||||||
import net.corda.node.serialization.amqp.AMQPServerSerializationScheme
|
import net.corda.node.serialization.amqp.AMQPServerSerializationScheme
|
||||||
import net.corda.nodeapi.internal.config.SSLConfiguration
|
import net.corda.nodeapi.internal.config.SSLConfiguration
|
||||||
import net.corda.nodeapi.internal.createDevKeyStores
|
import net.corda.nodeapi.internal.createDevKeyStores
|
||||||
import net.corda.nodeapi.internal.serialization.AllWhitelist
|
import net.corda.serialization.internal.SerializationContextImpl
|
||||||
import net.corda.nodeapi.internal.serialization.SerializationContextImpl
|
import net.corda.serialization.internal.SerializationFactoryImpl
|
||||||
import net.corda.nodeapi.internal.serialization.SerializationFactoryImpl
|
import net.corda.serialization.internal.amqp.amqpMagic
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.amqpMagic
|
import net.corda.serialization.internal.AllWhitelist
|
||||||
import net.corda.testing.core.ALICE_NAME
|
import net.corda.testing.core.ALICE_NAME
|
||||||
import net.corda.testing.core.BOB_NAME
|
import net.corda.testing.core.BOB_NAME
|
||||||
import net.corda.testing.core.TestIdentity
|
import net.corda.testing.core.TestIdentity
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -42,7 +42,7 @@ import net.corda.nodeapi.internal.ShutdownHook
|
|||||||
import net.corda.nodeapi.internal.addShutdownHook
|
import net.corda.nodeapi.internal.addShutdownHook
|
||||||
import net.corda.nodeapi.internal.bridging.BridgeControlListener
|
import net.corda.nodeapi.internal.bridging.BridgeControlListener
|
||||||
import net.corda.nodeapi.internal.persistence.CordaPersistence
|
import net.corda.nodeapi.internal.persistence.CordaPersistence
|
||||||
import net.corda.nodeapi.internal.serialization.*
|
import net.corda.serialization.internal.*
|
||||||
import org.slf4j.Logger
|
import org.slf4j.Logger
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import rx.Scheduler
|
import rx.Scheduler
|
||||||
|
@ -16,7 +16,7 @@ import net.corda.core.utilities.contextLogger
|
|||||||
import net.corda.node.internal.classloading.requireAnnotation
|
import net.corda.node.internal.classloading.requireAnnotation
|
||||||
import net.corda.node.services.config.NodeConfiguration
|
import net.corda.node.services.config.NodeConfiguration
|
||||||
import net.corda.nodeapi.internal.coreContractClasses
|
import net.corda.nodeapi.internal.coreContractClasses
|
||||||
import net.corda.nodeapi.internal.serialization.DefaultWhitelist
|
import net.corda.serialization.internal.DefaultWhitelist
|
||||||
import org.apache.commons.collections4.map.LRUMap
|
import org.apache.commons.collections4.map.LRUMap
|
||||||
import java.lang.reflect.Modifier
|
import java.lang.reflect.Modifier
|
||||||
import java.net.JarURLConnection
|
import java.net.JarURLConnection
|
||||||
|
@ -4,11 +4,10 @@ import net.corda.core.cordapp.Cordapp
|
|||||||
import net.corda.core.serialization.ClassWhitelist
|
import net.corda.core.serialization.ClassWhitelist
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.core.serialization.SerializationCustomSerializer
|
import net.corda.core.serialization.SerializationCustomSerializer
|
||||||
import net.corda.nodeapi.internal.serialization.CordaSerializationMagic
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.custom.RxNotificationSerializer
|
import net.corda.nodeapi.internal.serialization.amqp.custom.RxNotificationSerializer
|
||||||
|
import net.corda.serialization.internal.CordaSerializationMagic
|
||||||
|
import net.corda.serialization.internal.amqp.AbstractAMQPSerializationScheme
|
||||||
|
import net.corda.serialization.internal.amqp.SerializerFactory
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,8 +2,8 @@ package net.corda.node.serialization.amqp
|
|||||||
|
|
||||||
import net.corda.core.concurrent.CordaFuture
|
import net.corda.core.concurrent.CordaFuture
|
||||||
import net.corda.core.toObservable
|
import net.corda.core.toObservable
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.CustomSerializer
|
import net.corda.serialization.internal.amqp.CustomSerializer
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory
|
import net.corda.serialization.internal.amqp.SerializerFactory
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
||||||
|
|
||||||
|
@ -6,14 +6,12 @@ import net.corda.core.utilities.loggerFor
|
|||||||
import net.corda.node.services.messaging.ObservableContextInterface
|
import net.corda.node.services.messaging.ObservableContextInterface
|
||||||
import net.corda.node.services.messaging.ObservableSubscription
|
import net.corda.node.services.messaging.ObservableSubscription
|
||||||
import net.corda.nodeapi.RPCApi
|
import net.corda.nodeapi.RPCApi
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.*
|
import net.corda.serialization.internal.amqp.*
|
||||||
import org.apache.qpid.proton.codec.Data
|
import org.apache.qpid.proton.codec.Data
|
||||||
|
|
||||||
import rx.Notification
|
import rx.Notification
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import rx.Subscriber
|
import rx.Subscriber
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
||||||
|
|
||||||
import java.lang.reflect.Type
|
import java.lang.reflect.Type
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,9 +2,9 @@ package net.corda.node.serialization.kryo
|
|||||||
|
|
||||||
import com.esotericsoftware.kryo.pool.KryoPool
|
import com.esotericsoftware.kryo.pool.KryoPool
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.nodeapi.internal.serialization.CordaSerializationMagic
|
import net.corda.serialization.internal.CordaSerializationMagic
|
||||||
import net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme
|
import net.corda.serialization.internal.kryo.AbstractKryoSerializationScheme
|
||||||
import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
|
import net.corda.serialization.internal.kryo.kryoMagic
|
||||||
|
|
||||||
class KryoServerSerializationScheme : AbstractKryoSerializationScheme() {
|
class KryoServerSerializationScheme : AbstractKryoSerializationScheme() {
|
||||||
override fun canDeserializeVersion(magic: CordaSerializationMagic, target: SerializationContext.UseCase): Boolean {
|
override fun canDeserializeVersion(magic: CordaSerializationMagic, target: SerializationContext.UseCase): Boolean {
|
||||||
|
@ -14,8 +14,8 @@ import net.corda.node.serialization.amqp.AMQPServerSerializationScheme
|
|||||||
import net.corda.nodeapi.internal.NodeInfoAndSigned
|
import net.corda.nodeapi.internal.NodeInfoAndSigned
|
||||||
import net.corda.nodeapi.internal.SignedNodeInfo
|
import net.corda.nodeapi.internal.SignedNodeInfo
|
||||||
import net.corda.nodeapi.internal.network.NodeInfoFilesCopier
|
import net.corda.nodeapi.internal.network.NodeInfoFilesCopier
|
||||||
import net.corda.nodeapi.internal.serialization.AMQP_P2P_CONTEXT
|
import net.corda.serialization.internal.AMQP_P2P_CONTEXT
|
||||||
import net.corda.nodeapi.internal.serialization.SerializationFactoryImpl
|
import net.corda.serialization.internal.SerializationFactoryImpl
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import rx.Scheduler
|
import rx.Scheduler
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
|
@ -37,8 +37,8 @@ import net.corda.node.services.statemachine.transitions.StateMachine
|
|||||||
import net.corda.node.services.statemachine.transitions.StateMachineConfiguration
|
import net.corda.node.services.statemachine.transitions.StateMachineConfiguration
|
||||||
import net.corda.node.utilities.AffinityExecutor
|
import net.corda.node.utilities.AffinityExecutor
|
||||||
import net.corda.nodeapi.internal.persistence.CordaPersistence
|
import net.corda.nodeapi.internal.persistence.CordaPersistence
|
||||||
import net.corda.nodeapi.internal.serialization.SerializeAsTokenContextImpl
|
import net.corda.serialization.internal.SerializeAsTokenContextImpl
|
||||||
import net.corda.nodeapi.internal.serialization.withTokenContext
|
import net.corda.serialization.internal.withTokenContext
|
||||||
import org.apache.activemq.artemis.utils.ReusableLatch
|
import org.apache.activemq.artemis.utils.ReusableLatch
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import rx.subjects.PublishSubject
|
import rx.subjects.PublishSubject
|
||||||
|
@ -30,7 +30,7 @@ import net.corda.core.utilities.debug
|
|||||||
import net.corda.node.utilities.AppendOnlyPersistentMap
|
import net.corda.node.utilities.AppendOnlyPersistentMap
|
||||||
import net.corda.nodeapi.internal.persistence.CordaPersistence
|
import net.corda.nodeapi.internal.persistence.CordaPersistence
|
||||||
import net.corda.nodeapi.internal.persistence.currentDBSession
|
import net.corda.nodeapi.internal.persistence.currentDBSession
|
||||||
import net.corda.nodeapi.internal.serialization.CordaSerializationEncoding
|
import net.corda.serialization.internal.CordaSerializationEncoding
|
||||||
import java.time.Clock
|
import java.time.Clock
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +59,7 @@ class CordappLoaderTest {
|
|||||||
assertThat(actualCordapp.schedulableFlows).isEmpty()
|
assertThat(actualCordapp.schedulableFlows).isEmpty()
|
||||||
assertThat(actualCordapp.services).isEmpty()
|
assertThat(actualCordapp.services).isEmpty()
|
||||||
assertThat(actualCordapp.serializationWhitelists).hasSize(1)
|
assertThat(actualCordapp.serializationWhitelists).hasSize(1)
|
||||||
assertThat(actualCordapp.serializationWhitelists.first().javaClass.name).isEqualTo("net.corda.nodeapi.internal.serialization.DefaultWhitelist")
|
assertThat(actualCordapp.serializationWhitelists.first().javaClass.name).isEqualTo("net.corda.serialization.internal.DefaultWhitelist")
|
||||||
assertThat(actualCordapp.jarPath).isEqualTo(isolatedJAR)
|
assertThat(actualCordapp.jarPath).isEqualTo(isolatedJAR)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,23 +1,20 @@
|
|||||||
package net.corda.node.internal.serialization
|
package net.corda.node.internal.serialization
|
||||||
|
|
||||||
import net.corda.client.rpc.internal.ObservableContext as ClientObservableContext
|
|
||||||
import net.corda.core.internal.ThreadBox
|
|
||||||
import net.corda.core.context.Trace
|
|
||||||
import net.corda.node.internal.serialization.testutils.AMQPRoundTripRPCSerializationScheme
|
|
||||||
import net.corda.node.internal.serialization.testutils.TestObservableContext as ServerObservableContext
|
|
||||||
import net.corda.node.services.messaging.ObservableSubscription
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.DeserializationInput
|
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializationOutput
|
|
||||||
|
|
||||||
import co.paralleluniverse.common.util.SameThreadExecutor
|
import co.paralleluniverse.common.util.SameThreadExecutor
|
||||||
import com.github.benmanes.caffeine.cache.Cache
|
import com.github.benmanes.caffeine.cache.Cache
|
||||||
import com.github.benmanes.caffeine.cache.Caffeine
|
import com.github.benmanes.caffeine.cache.Caffeine
|
||||||
import com.github.benmanes.caffeine.cache.RemovalListener
|
import com.github.benmanes.caffeine.cache.RemovalListener
|
||||||
import com.nhaarman.mockito_kotlin.mock
|
import com.nhaarman.mockito_kotlin.mock
|
||||||
import net.corda.client.rpc.internal.serialization.amqp.RpcClientObservableSerializer
|
import net.corda.client.rpc.internal.serialization.amqp.RpcClientObservableSerializer
|
||||||
|
import net.corda.core.context.Trace
|
||||||
|
import net.corda.core.internal.ThreadBox
|
||||||
|
import net.corda.node.internal.serialization.testutils.AMQPRoundTripRPCSerializationScheme
|
||||||
import net.corda.node.internal.serialization.testutils.serializationContext
|
import net.corda.node.internal.serialization.testutils.serializationContext
|
||||||
import net.corda.node.serialization.amqp.RpcServerObservableSerializer
|
import net.corda.node.serialization.amqp.RpcServerObservableSerializer
|
||||||
|
import net.corda.node.services.messaging.ObservableSubscription
|
||||||
import net.corda.nodeapi.RPCApi
|
import net.corda.nodeapi.RPCApi
|
||||||
|
import net.corda.serialization.internal.amqp.DeserializationInput
|
||||||
|
import net.corda.serialization.internal.amqp.SerializationOutput
|
||||||
import org.apache.activemq.artemis.api.core.SimpleString
|
import org.apache.activemq.artemis.api.core.SimpleString
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import rx.Notification
|
import rx.Notification
|
||||||
@ -28,6 +25,8 @@ import java.time.Instant
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
import net.corda.client.rpc.internal.ObservableContext as ClientObservableContext
|
||||||
|
import net.corda.node.internal.serialization.testutils.TestObservableContext as ServerObservableContext
|
||||||
|
|
||||||
class RoundTripObservableSerializerTests {
|
class RoundTripObservableSerializerTests {
|
||||||
private fun getID() = Trace.InvocationId("test1", Instant.now())
|
private fun getID() = Trace.InvocationId("test1", Instant.now())
|
||||||
|
@ -4,13 +4,13 @@ import com.github.benmanes.caffeine.cache.Cache
|
|||||||
import com.github.benmanes.caffeine.cache.Caffeine
|
import com.github.benmanes.caffeine.cache.Caffeine
|
||||||
import com.nhaarman.mockito_kotlin.mock
|
import com.nhaarman.mockito_kotlin.mock
|
||||||
import net.corda.core.context.Trace
|
import net.corda.core.context.Trace
|
||||||
import net.corda.node.internal.serialization.testutils.*
|
import net.corda.node.internal.serialization.testutils.TestObservableContext
|
||||||
|
import net.corda.node.internal.serialization.testutils.serializationContext
|
||||||
import net.corda.node.serialization.amqp.RpcServerObservableSerializer
|
import net.corda.node.serialization.amqp.RpcServerObservableSerializer
|
||||||
import net.corda.node.services.messaging.ObservableSubscription
|
import net.corda.node.services.messaging.ObservableSubscription
|
||||||
import net.corda.nodeapi.internal.serialization.AllWhitelist
|
import net.corda.serialization.internal.amqp.SerializationOutput
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializationOutput
|
import net.corda.serialization.internal.amqp.SerializerFactory
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory
|
import net.corda.serialization.internal.AllWhitelist
|
||||||
|
|
||||||
import org.apache.activemq.artemis.api.core.SimpleString
|
import org.apache.activemq.artemis.api.core.SimpleString
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
@ -2,17 +2,15 @@ package net.corda.node.internal.serialization.testutils
|
|||||||
|
|
||||||
import net.corda.client.rpc.internal.serialization.amqp.RpcClientObservableSerializer
|
import net.corda.client.rpc.internal.serialization.amqp.RpcClientObservableSerializer
|
||||||
import net.corda.core.context.Trace
|
import net.corda.core.context.Trace
|
||||||
import net.corda.core.cordapp.Cordapp
|
|
||||||
import net.corda.core.serialization.ClassWhitelist
|
import net.corda.core.serialization.ClassWhitelist
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.core.serialization.SerializationCustomSerializer
|
import net.corda.core.serialization.SerializationCustomSerializer
|
||||||
import net.corda.node.serialization.amqp.RpcServerObservableSerializer
|
import net.corda.node.serialization.amqp.RpcServerObservableSerializer
|
||||||
import net.corda.nodeapi.RPCApi
|
import net.corda.nodeapi.RPCApi
|
||||||
import net.corda.nodeapi.internal.serialization.AllWhitelist
|
import net.corda.serialization.internal.CordaSerializationMagic
|
||||||
import net.corda.nodeapi.internal.serialization.CordaSerializationMagic
|
import net.corda.serialization.internal.amqp.AbstractAMQPSerializationScheme
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme
|
import net.corda.serialization.internal.amqp.SerializerFactory
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory
|
import net.corda.serialization.internal.AllWhitelist
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
|
||||||
import net.corda.client.rpc.internal.ObservableContext as ClientObservableContext
|
import net.corda.client.rpc.internal.ObservableContext as ClientObservableContext
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package net.corda.node.internal.serialization.testutils
|
package net.corda.node.internal.serialization.testutils
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.nodeapi.internal.serialization.AllWhitelist
|
import net.corda.serialization.internal.SerializationContextImpl
|
||||||
import net.corda.nodeapi.internal.serialization.SerializationContextImpl
|
import net.corda.serialization.internal.amqp.amqpMagic
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.amqpMagic
|
import net.corda.serialization.internal.AllWhitelist
|
||||||
|
|
||||||
val serializationProperties: MutableMap<Any, Any> = mutableMapOf()
|
val serializationProperties: MutableMap<Any, Any> = mutableMapOf()
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import com.opengamma.strata.product.common.BuySell
|
|||||||
import net.corda.core.identity.CordaX500Name
|
import net.corda.core.identity.CordaX500Name
|
||||||
import net.corda.core.internal.packageName
|
import net.corda.core.internal.packageName
|
||||||
import net.corda.core.utilities.getOrThrow
|
import net.corda.core.utilities.getOrThrow
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.AbstractAMQPSerializationScheme
|
import net.corda.serialization.internal.amqp.AbstractAMQPSerializationScheme
|
||||||
import net.corda.testing.core.DUMMY_BANK_A_NAME
|
import net.corda.testing.core.DUMMY_BANK_A_NAME
|
||||||
import net.corda.testing.core.DUMMY_BANK_B_NAME
|
import net.corda.testing.core.DUMMY_BANK_B_NAME
|
||||||
import net.corda.testing.driver.DriverParameters
|
import net.corda.testing.driver.DriverParameters
|
||||||
|
58
serialization/build.gradle
Normal file
58
serialization/build.gradle
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
apply plugin: 'kotlin'
|
||||||
|
apply plugin: 'net.corda.plugins.publish-utils'
|
||||||
|
apply plugin: 'com.jfrog.artifactory'
|
||||||
|
|
||||||
|
description 'Corda serialization'
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile project(":core")
|
||||||
|
|
||||||
|
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
|
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||||
|
|
||||||
|
compile "org.apache.activemq:artemis-commons:${artemis_version}"
|
||||||
|
|
||||||
|
// Kryo: object graph serialization.
|
||||||
|
compile "com.esotericsoftware:kryo:4.0.0"
|
||||||
|
compile "de.javakaffee:kryo-serializers:0.41"
|
||||||
|
compile "org.ow2.asm:asm:$asm_version"
|
||||||
|
|
||||||
|
// For AMQP serialisation.
|
||||||
|
compile "org.apache.qpid:proton-j:$protonj_version"
|
||||||
|
|
||||||
|
// FastClasspathScanner: classpath scanning
|
||||||
|
compile "io.github.lukehutch:fast-classpath-scanner:$fast_classpath_scanner_version"
|
||||||
|
|
||||||
|
// Pure-Java Snappy compression
|
||||||
|
compile "org.iq80.snappy:snappy:$snappy_version"
|
||||||
|
|
||||||
|
// For caches rather than guava
|
||||||
|
compile "com.github.ben-manes.caffeine:caffeine:$caffeine_version"
|
||||||
|
|
||||||
|
// Unit testing helpers.
|
||||||
|
testCompile "junit:junit:$junit_version"
|
||||||
|
testCompile "org.assertj:assertj-core:$assertj_version"
|
||||||
|
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
|
||||||
|
testCompile project(':node-driver')
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
testArtifacts.extendsFrom testRuntime
|
||||||
|
}
|
||||||
|
|
||||||
|
task testJar(type: Jar) {
|
||||||
|
classifier "tests"
|
||||||
|
from sourceSets.test.output
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
testArtifacts testJar
|
||||||
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
baseName 'corda-serialization'
|
||||||
|
}
|
||||||
|
|
||||||
|
publish {
|
||||||
|
name jar.baseName
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.serialization.ClassWhitelist
|
import net.corda.core.serialization.ClassWhitelist
|
||||||
import sun.misc.Unsafe
|
import sun.misc.Unsafe
|
||||||
@ -32,7 +32,7 @@ import kotlin.collections.LinkedHashSet
|
|||||||
* Inheritance works for blacklisted items, but one can specifically exclude classes from blacklisting as well.
|
* Inheritance works for blacklisted items, but one can specifically exclude classes from blacklisting as well.
|
||||||
* Note: Custom serializer registration trumps white/black lists. So if a given type has a custom serializer and has its name
|
* Note: Custom serializer registration trumps white/black lists. So if a given type has a custom serializer and has its name
|
||||||
* in the blacklist - it will still be serialized as specified by custom serializer.
|
* in the blacklist - it will still be serialized as specified by custom serializer.
|
||||||
* For more details, see [net.corda.nodeapi.internal.serialization.CordaClassResolver.getRegistration]
|
* For more details, see [net.corda.serialization.internal.CordaClassResolver.getRegistration]
|
||||||
*/
|
*/
|
||||||
object AllButBlacklisted : ClassWhitelist {
|
object AllButBlacklisted : ClassWhitelist {
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.contracts.Attachment
|
import net.corda.core.contracts.Attachment
|
||||||
import net.corda.core.contracts.ContractAttachment
|
import net.corda.core.contracts.ContractAttachment
|
@ -1,6 +1,6 @@
|
|||||||
@file:JvmName("ByteBufferStreams")
|
@file:JvmName("ByteBufferStreams")
|
||||||
|
|
||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.internal.LazyPool
|
import net.corda.core.internal.LazyPool
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
@ -0,0 +1,11 @@
|
|||||||
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
|
import net.corda.core.serialization.ClassWhitelist
|
||||||
|
|
||||||
|
interface MutableClassWhitelist : ClassWhitelist {
|
||||||
|
fun add(entry: Class<*>)
|
||||||
|
}
|
||||||
|
|
||||||
|
object AllWhitelist : ClassWhitelist {
|
||||||
|
override fun hasListed(type: Class<*>): Boolean = true
|
||||||
|
}
|
@ -1,11 +1,13 @@
|
|||||||
@file:JvmName("ClientContexts")
|
@file:JvmName("ClientContexts")
|
||||||
|
|
||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.core.serialization.SerializationDefaults
|
import net.corda.core.serialization.SerializationDefaults
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.amqpMagic
|
import net.corda.serialization.internal.amqp.amqpMagic
|
||||||
import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
|
import net.corda.serialization.internal.kryo.BuiltInExceptionsWhitelist
|
||||||
|
import net.corda.serialization.internal.kryo.GlobalTransientClassWhiteList
|
||||||
|
import net.corda.serialization.internal.kryo.kryoMagic
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Serialisation contexts for the client.
|
* Serialisation contexts for the client.
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import com.esotericsoftware.kryo.KryoException
|
import com.esotericsoftware.kryo.KryoException
|
||||||
import net.corda.core.serialization.SerializationWhitelist
|
import net.corda.core.serialization.SerializationWhitelist
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.crypto.sha256
|
import net.corda.core.crypto.sha256
|
||||||
import net.corda.core.internal.AbstractAttachment
|
import net.corda.core.internal.AbstractAttachment
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import java.io.EOFException
|
import java.io.EOFException
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
@ -1,10 +1,10 @@
|
|||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.internal.VisibleForTesting
|
import net.corda.core.internal.VisibleForTesting
|
||||||
import net.corda.core.serialization.SerializationEncoding
|
import net.corda.core.serialization.SerializationEncoding
|
||||||
import net.corda.core.utilities.ByteSequence
|
import net.corda.core.utilities.ByteSequence
|
||||||
import net.corda.core.utilities.OpaqueBytes
|
import net.corda.core.utilities.OpaqueBytes
|
||||||
import net.corda.nodeapi.internal.serialization.OrdinalBits.OrdinalWriter
|
import net.corda.serialization.internal.OrdinalBits.OrdinalWriter
|
||||||
import org.iq80.snappy.SnappyFramedInputStream
|
import org.iq80.snappy.SnappyFramedInputStream
|
||||||
import org.iq80.snappy.SnappyFramedOutputStream
|
import org.iq80.snappy.SnappyFramedOutputStream
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import com.github.benmanes.caffeine.cache.Cache
|
import com.github.benmanes.caffeine.cache.Cache
|
||||||
import com.github.benmanes.caffeine.cache.Caffeine
|
import com.github.benmanes.caffeine.cache.Caffeine
|
||||||
@ -7,9 +7,8 @@ import net.corda.core.crypto.SecureHash
|
|||||||
import net.corda.core.internal.copyBytes
|
import net.corda.core.internal.copyBytes
|
||||||
import net.corda.core.serialization.*
|
import net.corda.core.serialization.*
|
||||||
import net.corda.core.utilities.ByteSequence
|
import net.corda.core.utilities.ByteSequence
|
||||||
import net.corda.nodeapi.internal.AttachmentsClassLoader
|
import net.corda.serialization.internal.amqp.amqpMagic
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.amqpMagic
|
import net.corda.serialization.internal.kryo.kryoMagic
|
||||||
import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
|
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
||||||
import java.util.*
|
import java.util.*
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.node.ServiceHub
|
import net.corda.core.node.ServiceHub
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
@ -1,11 +1,13 @@
|
|||||||
@file:JvmName("ServerContexts")
|
@file:JvmName("ServerContexts")
|
||||||
|
|
||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.core.serialization.SerializationDefaults
|
import net.corda.core.serialization.SerializationDefaults
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.amqpMagic
|
import net.corda.serialization.internal.amqp.amqpMagic
|
||||||
import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
|
import net.corda.serialization.internal.kryo.BuiltInExceptionsWhitelist
|
||||||
|
import net.corda.serialization.internal.kryo.GlobalTransientClassWhiteList
|
||||||
|
import net.corda.serialization.internal.kryo.kryoMagic
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Serialisation contexts for the server.
|
* Serialisation contexts for the server.
|
@ -1,10 +1,12 @@
|
|||||||
@file:JvmName("SharedContexts")
|
@file:JvmName("SharedContexts")
|
||||||
|
|
||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.serialization.*
|
import net.corda.core.serialization.*
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.amqpMagic
|
import net.corda.serialization.internal.amqp.amqpMagic
|
||||||
import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
|
import net.corda.serialization.internal.kryo.BuiltInExceptionsWhitelist
|
||||||
|
import net.corda.serialization.internal.kryo.GlobalTransientClassWhiteList
|
||||||
|
import net.corda.serialization.internal.kryo.kryoMagic
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Serialisation contexts shared by the server and client.
|
* Serialisation contexts shared by the server and client.
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization
|
package net.corda.serialization.internal
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.core.serialization.SerializationFactory
|
import net.corda.core.serialization.SerializationFactory
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import org.apache.qpid.proton.amqp.UnsignedLong
|
import org.apache.qpid.proton.amqp.UnsignedLong
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
||||||
import java.lang.reflect.Type
|
import java.lang.reflect.Type
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import org.apache.qpid.proton.amqp.Binary
|
import org.apache.qpid.proton.amqp.Binary
|
@ -1,6 +1,6 @@
|
|||||||
@file:JvmName("AMQPSerializationScheme")
|
@file:JvmName("AMQPSerializationScheme")
|
||||||
|
|
||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import io.github.lukehutch.fastclasspathscanner.FastClasspathScanner
|
import io.github.lukehutch.fastclasspathscanner.FastClasspathScanner
|
||||||
import net.corda.core.cordapp.Cordapp
|
import net.corda.core.cordapp.Cordapp
|
||||||
@ -8,10 +8,10 @@ import net.corda.core.internal.objectOrNewInstance
|
|||||||
import net.corda.core.internal.uncheckedCast
|
import net.corda.core.internal.uncheckedCast
|
||||||
import net.corda.core.serialization.*
|
import net.corda.core.serialization.*
|
||||||
import net.corda.core.utilities.ByteSequence
|
import net.corda.core.utilities.ByteSequence
|
||||||
import net.corda.nodeapi.internal.serialization.CordaSerializationMagic
|
import net.corda.serialization.internal.CordaSerializationMagic
|
||||||
import net.corda.nodeapi.internal.serialization.DefaultWhitelist
|
import net.corda.serialization.internal.DefaultWhitelist
|
||||||
import net.corda.nodeapi.internal.serialization.MutableClassWhitelist
|
import net.corda.serialization.internal.MutableClassWhitelist
|
||||||
import net.corda.nodeapi.internal.serialization.SerializationScheme
|
import net.corda.serialization.internal.SerializationScheme
|
||||||
import java.lang.reflect.Modifier
|
import java.lang.reflect.Modifier
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
@ -73,34 +73,34 @@ abstract class AbstractAMQPSerializationScheme(
|
|||||||
private fun registerCustomSerializers(context: SerializationContext, factory: SerializerFactory) {
|
private fun registerCustomSerializers(context: SerializationContext, factory: SerializerFactory) {
|
||||||
with(factory) {
|
with(factory) {
|
||||||
register(publicKeySerializer)
|
register(publicKeySerializer)
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.PrivateKeySerializer)
|
register(net.corda.serialization.internal.amqp.custom.PrivateKeySerializer)
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.ThrowableSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.ThrowableSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.BigDecimalSerializer)
|
register(net.corda.serialization.internal.amqp.custom.BigDecimalSerializer)
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.BigIntegerSerializer)
|
register(net.corda.serialization.internal.amqp.custom.BigIntegerSerializer)
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.CurrencySerializer)
|
register(net.corda.serialization.internal.amqp.custom.CurrencySerializer)
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.OpaqueBytesSubSequenceSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.OpaqueBytesSubSequenceSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.InstantSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.InstantSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.DurationSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.DurationSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.LocalDateSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.LocalDateSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.LocalDateTimeSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.LocalDateTimeSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.LocalTimeSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.LocalTimeSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.ZonedDateTimeSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.ZonedDateTimeSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.ZoneIdSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.ZoneIdSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.OffsetTimeSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.OffsetTimeSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.OffsetDateTimeSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.OffsetDateTimeSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.YearSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.YearSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.YearMonthSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.YearMonthSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.MonthDaySerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.MonthDaySerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.PeriodSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.PeriodSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.ClassSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.ClassSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.X509CertificateSerializer)
|
register(net.corda.serialization.internal.amqp.custom.X509CertificateSerializer)
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.X509CRLSerializer)
|
register(net.corda.serialization.internal.amqp.custom.X509CRLSerializer)
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.CertPathSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.CertPathSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.StringBufferSerializer)
|
register(net.corda.serialization.internal.amqp.custom.StringBufferSerializer)
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.InputStreamSerializer)
|
register(net.corda.serialization.internal.amqp.custom.InputStreamSerializer)
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.BitSetSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.BitSetSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.EnumSetSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.EnumSetSerializer(this))
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.ContractAttachmentSerializer(this))
|
register(net.corda.serialization.internal.amqp.custom.ContractAttachmentSerializer(this))
|
||||||
registerNonDeterministicSerializers(factory)
|
registerNonDeterministicSerializers(factory)
|
||||||
}
|
}
|
||||||
for (whitelistProvider in serializationWhitelists) {
|
for (whitelistProvider in serializationWhitelists) {
|
||||||
@ -131,7 +131,7 @@ abstract class AbstractAMQPSerializationScheme(
|
|||||||
*/
|
*/
|
||||||
private fun registerNonDeterministicSerializers(factory: SerializerFactory) {
|
private fun registerNonDeterministicSerializers(factory: SerializerFactory) {
|
||||||
with(factory) {
|
with(factory) {
|
||||||
register(net.corda.nodeapi.internal.serialization.amqp.custom.SimpleStringSerializer)
|
register(net.corda.serialization.internal.amqp.custom.SimpleStringSerializer)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ abstract class AbstractAMQPSerializationScheme(
|
|||||||
protected abstract fun rpcServerSerializerFactory(context: SerializationContext): SerializerFactory
|
protected abstract fun rpcServerSerializerFactory(context: SerializationContext): SerializerFactory
|
||||||
|
|
||||||
// Not used as a simple direct import to facilitate testing
|
// Not used as a simple direct import to facilitate testing
|
||||||
open val publicKeySerializer : CustomSerializer<*> = net.corda.nodeapi.internal.serialization.amqp.custom.PublicKeySerializer
|
open val publicKeySerializer : CustomSerializer<*> = net.corda.serialization.internal.amqp.custom.PublicKeySerializer
|
||||||
|
|
||||||
private fun getSerializerFactory(context: SerializationContext): SerializerFactory {
|
private fun getSerializerFactory(context: SerializationContext): SerializerFactory {
|
||||||
return serializerFactoriesForContexts.computeIfAbsent(Pair(context.whitelist, context.deserializationClassLoader)) {
|
return serializerFactoriesForContexts.computeIfAbsent(Pair(context.whitelist, context.deserializationClassLoader)) {
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import org.apache.qpid.proton.amqp.Symbol
|
import org.apache.qpid.proton.amqp.Symbol
|
@ -1,6 +1,6 @@
|
|||||||
@file:JvmName("AMQPSerializerFactories")
|
@file:JvmName("AMQPSerializerFactories")
|
||||||
|
|
||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
@file:JvmName("AMQPStreams")
|
@file:JvmName("AMQPStreams")
|
||||||
|
|
||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.nodeapi.internal.serialization.ByteBufferInputStream
|
import net.corda.serialization.internal.ByteBufferInputStream
|
||||||
import net.corda.nodeapi.internal.serialization.ByteBufferOutputStream
|
import net.corda.serialization.internal.ByteBufferOutputStream
|
||||||
import net.corda.nodeapi.internal.serialization.serializeOutputStreamPool
|
import net.corda.serialization.internal.serializeOutputStreamPool
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
||||||
import java.io.OutputStream
|
import java.io.OutputStream
|
||||||
import java.nio.ByteBuffer
|
import java.nio.ByteBuffer
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import org.apache.qpid.proton.amqp.Symbol
|
import org.apache.qpid.proton.amqp.Symbol
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.internal.uncheckedCast
|
import net.corda.core.internal.uncheckedCast
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
@ -1,9 +1,9 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.internal.uncheckedCast
|
import net.corda.core.internal.uncheckedCast
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.core.serialization.SerializationCustomSerializer
|
import net.corda.core.serialization.SerializationCustomSerializer
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory.Companion.nameForType
|
import net.corda.serialization.internal.amqp.SerializerFactory.Companion.nameForType
|
||||||
import org.apache.qpid.proton.amqp.Symbol
|
import org.apache.qpid.proton.amqp.Symbol
|
||||||
import org.apache.qpid.proton.codec.Data
|
import org.apache.qpid.proton.codec.Data
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
@ -1,8 +1,8 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.internal.uncheckedCast
|
import net.corda.core.internal.uncheckedCast
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory.Companion.nameForType
|
import net.corda.serialization.internal.amqp.SerializerFactory.Companion.nameForType
|
||||||
import org.apache.qpid.proton.amqp.Symbol
|
import org.apache.qpid.proton.amqp.Symbol
|
||||||
import org.apache.qpid.proton.codec.Data
|
import org.apache.qpid.proton.codec.Data
|
||||||
import java.lang.reflect.Type
|
import java.lang.reflect.Type
|
@ -1,11 +1,11 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.internal.VisibleForTesting
|
import net.corda.core.internal.VisibleForTesting
|
||||||
import net.corda.core.serialization.EncodingWhitelist
|
import net.corda.core.serialization.EncodingWhitelist
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.core.serialization.SerializedBytes
|
import net.corda.core.serialization.SerializedBytes
|
||||||
import net.corda.core.utilities.ByteSequence
|
import net.corda.core.utilities.ByteSequence
|
||||||
import net.corda.nodeapi.internal.serialization.*
|
import net.corda.serialization.internal.*
|
||||||
import org.apache.qpid.proton.amqp.Binary
|
import org.apache.qpid.proton.amqp.Binary
|
||||||
import org.apache.qpid.proton.amqp.DescribedType
|
import org.apache.qpid.proton.amqp.DescribedType
|
||||||
import org.apache.qpid.proton.amqp.UnsignedInteger
|
import org.apache.qpid.proton.amqp.UnsignedInteger
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import java.lang.reflect.GenericArrayType
|
import java.lang.reflect.GenericArrayType
|
||||||
import java.lang.reflect.Type
|
import java.lang.reflect.Type
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import com.google.common.primitives.Primitives
|
import com.google.common.primitives.Primitives
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.internal.uncheckedCast
|
import net.corda.core.internal.uncheckedCast
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import org.apache.qpid.proton.amqp.Symbol
|
import org.apache.qpid.proton.amqp.Symbol
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import org.apache.qpid.proton.amqp.DescribedType
|
import org.apache.qpid.proton.amqp.DescribedType
|
||||||
import org.apache.qpid.proton.codec.Data
|
import org.apache.qpid.proton.codec.Data
|
@ -1,8 +1,8 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.serialization.DeprecatedConstructorForDeserialization
|
import net.corda.core.serialization.DeprecatedConstructorForDeserialization
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.nodeapi.internal.serialization.carpenter.getTypeAsClass
|
import net.corda.serialization.internal.carpenter.getTypeAsClass
|
||||||
import org.apache.qpid.proton.codec.Data
|
import org.apache.qpid.proton.codec.Data
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
||||||
import java.lang.reflect.Type
|
import java.lang.reflect.Type
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import com.google.common.hash.Hasher
|
import com.google.common.hash.Hasher
|
||||||
import com.google.common.hash.Hashing
|
import com.google.common.hash.Hashing
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.internal.uncheckedCast
|
import net.corda.core.internal.uncheckedCast
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
@ -1,9 +1,9 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.core.utilities.contextLogger
|
import net.corda.core.utilities.contextLogger
|
||||||
import net.corda.core.utilities.trace
|
import net.corda.core.utilities.trace
|
||||||
import net.corda.nodeapi.internal.serialization.amqp.SerializerFactory.Companion.nameForType
|
import net.corda.serialization.internal.amqp.SerializerFactory.Companion.nameForType
|
||||||
import org.apache.qpid.proton.amqp.Symbol
|
import org.apache.qpid.proton.amqp.Symbol
|
||||||
import org.apache.qpid.proton.codec.Data
|
import org.apache.qpid.proton.codec.Data
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import org.apache.qpid.proton.amqp.Binary
|
import org.apache.qpid.proton.amqp.Binary
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.utilities.loggerFor
|
import net.corda.core.utilities.loggerFor
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
@ -1,15 +1,15 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.internal.uncheckedCast
|
import net.corda.core.internal.uncheckedCast
|
||||||
import net.corda.nodeapi.internal.serialization.CordaSerializationMagic
|
import net.corda.serialization.internal.CordaSerializationMagic
|
||||||
import org.apache.qpid.proton.amqp.DescribedType
|
import org.apache.qpid.proton.amqp.DescribedType
|
||||||
import org.apache.qpid.proton.amqp.Symbol
|
import org.apache.qpid.proton.amqp.Symbol
|
||||||
import org.apache.qpid.proton.amqp.UnsignedInteger
|
import org.apache.qpid.proton.amqp.UnsignedInteger
|
||||||
import org.apache.qpid.proton.amqp.UnsignedLong
|
import org.apache.qpid.proton.amqp.UnsignedLong
|
||||||
import org.apache.qpid.proton.codec.DescribedTypeConstructor
|
import org.apache.qpid.proton.codec.DescribedTypeConstructor
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
||||||
import net.corda.nodeapi.internal.serialization.carpenter.Field as CarpenterField
|
import net.corda.serialization.internal.carpenter.Field as CarpenterField
|
||||||
import net.corda.nodeapi.internal.serialization.carpenter.Schema as CarpenterSchema
|
import net.corda.serialization.internal.carpenter.Schema as CarpenterSchema
|
||||||
|
|
||||||
const val DESCRIPTOR_DOMAIN: String = "net.corda"
|
const val DESCRIPTOR_DOMAIN: String = "net.corda"
|
||||||
val amqpMagic = CordaSerializationMagic("corda".toByteArray() + byteArrayOf(1, 0))
|
val amqpMagic = CordaSerializationMagic("corda".toByteArray() + byteArrayOf(1, 0))
|
@ -1,4 +1,4 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import com.google.common.primitives.Primitives
|
import com.google.common.primitives.Primitives
|
||||||
import com.google.common.reflect.TypeToken
|
import com.google.common.reflect.TypeToken
|
@ -1,11 +1,11 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import net.corda.core.serialization.SerializationContext
|
import net.corda.core.serialization.SerializationContext
|
||||||
import net.corda.core.serialization.SerializationEncoding
|
import net.corda.core.serialization.SerializationEncoding
|
||||||
import net.corda.core.serialization.SerializedBytes
|
import net.corda.core.serialization.SerializedBytes
|
||||||
import net.corda.nodeapi.internal.serialization.CordaSerializationEncoding
|
import net.corda.serialization.internal.CordaSerializationEncoding
|
||||||
import net.corda.nodeapi.internal.serialization.SectionId
|
import net.corda.serialization.internal.SectionId
|
||||||
import net.corda.nodeapi.internal.serialization.byteArrayOutput
|
import net.corda.serialization.internal.byteArrayOutput
|
||||||
import org.apache.qpid.proton.codec.Data
|
import org.apache.qpid.proton.codec.Data
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
||||||
import java.io.OutputStream
|
import java.io.OutputStream
|
@ -1,11 +1,11 @@
|
|||||||
package net.corda.nodeapi.internal.serialization.amqp
|
package net.corda.serialization.internal.amqp
|
||||||
|
|
||||||
import com.google.common.primitives.Primitives
|
import com.google.common.primitives.Primitives
|
||||||
import com.google.common.reflect.TypeResolver
|
import com.google.common.reflect.TypeResolver
|
||||||
import net.corda.core.internal.uncheckedCast
|
import net.corda.core.internal.uncheckedCast
|
||||||
import net.corda.core.serialization.ClassWhitelist
|
import net.corda.core.serialization.ClassWhitelist
|
||||||
import net.corda.core.utilities.loggerFor
|
import net.corda.core.utilities.loggerFor
|
||||||
import net.corda.nodeapi.internal.serialization.carpenter.*
|
import net.corda.serialization.internal.carpenter.*
|
||||||
import org.apache.qpid.proton.amqp.*
|
import org.apache.qpid.proton.amqp.*
|
||||||
import java.io.NotSerializableException
|
import java.io.NotSerializableException
|
||||||
import java.lang.reflect.*
|
import java.lang.reflect.*
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user