ENT-4382: Core module changes to support multi-RPC work (#5814)

* ENT-4382: Move `InvocationHandlerTemplate` into `core`

This is an internal helper which is general enough and does not have any Node specific code.

* ENT-4382: Make @CordaInternal applicable to classes

And apply it on `AttachmentTrustCalculator` which is `core/internal` interface anyway.
This commit is contained in:
Viktor Kolomeyko 2019-12-16 16:03:48 +00:00 committed by Rick Parker
parent 5d47466051
commit 91cdffd429
5 changed files with 7 additions and 5 deletions

View File

@ -8,7 +8,7 @@ import kotlin.annotation.AnnotationTarget.*
*
* These are only meant to be used by Corda internally, and are not intended to be part of the public API.
*/
@Target(PROPERTY_GETTER, PROPERTY_SETTER, FUNCTION, ANNOTATION_CLASS)
@Target(PROPERTY_GETTER, PROPERTY_SETTER, PROPERTY, FUNCTION, ANNOTATION_CLASS, CLASS)
@Retention(BINARY)
@MustBeDocumented
annotation class CordaInternal

View File

@ -1,5 +1,6 @@
package net.corda.core.internal
import net.corda.core.CordaInternal
import net.corda.core.contracts.Attachment
import net.corda.core.node.services.AttachmentId
import net.corda.core.serialization.CordaSerializable
@ -7,6 +8,7 @@ import net.corda.core.serialization.CordaSerializable
/**
* Calculates the trust of attachments stored in the node.
*/
@CordaInternal
interface AttachmentTrustCalculator {
/**

View File

@ -1,4 +1,4 @@
package net.corda.node.internal
package net.corda.core.internal.utilities
import java.lang.reflect.InvocationHandler
import java.lang.reflect.InvocationTargetException
@ -7,7 +7,7 @@ import java.lang.reflect.Method
/**
* Helps writing correct [InvocationHandler]s.
*/
internal interface InvocationHandlerTemplate : InvocationHandler {
interface InvocationHandlerTemplate : InvocationHandler {
val delegate: Any
override fun invoke(proxy: Any, method: Method, arguments: Array<out Any?>?): Any? {

View File

@ -4,7 +4,7 @@ import net.corda.client.rpc.PermissionException
import net.corda.core.flows.FlowLogic
import net.corda.core.internal.messaging.InternalCordaRPCOps
import net.corda.core.messaging.CordaRPCOps
import net.corda.node.internal.InvocationHandlerTemplate
import net.corda.core.internal.utilities.InvocationHandlerTemplate
import net.corda.node.services.rpc.RpcAuthContext
import net.corda.node.services.rpc.rpcContext
import java.lang.reflect.Method

View File

@ -3,7 +3,7 @@ package net.corda.node.internal.rpc.proxies
import net.corda.core.internal.executeWithThreadContextClassLoader
import net.corda.core.internal.messaging.InternalCordaRPCOps
import net.corda.core.messaging.CordaRPCOps
import net.corda.node.internal.InvocationHandlerTemplate
import net.corda.core.internal.utilities.InvocationHandlerTemplate
import java.lang.reflect.Method
import java.lang.reflect.Proxy