-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CORE-10453: Replace RemoteAliasLookUp with InteropIdentityLookup (#1136)
An alternative more simplistic implementation of the InterOp equivalent of the MemberLookup. What's noteworthy about this new API is that the Application name is the sole identifier an the flow level.
- Loading branch information
1 parent
9f09992
commit 8d06e36
Showing
7 changed files
with
70 additions
and
114 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
application/src/main/java/net/corda/v5/application/interop/InteropIdentityLookUp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package net.corda.v5.application.interop; | ||
|
||
import net.corda.v5.application.interop.facade.FacadeId; | ||
import net.corda.v5.application.membership.MemberLookup; | ||
import net.corda.v5.base.annotations.DoNotImplement; | ||
import net.corda.v5.base.annotations.Suspendable; | ||
import net.corda.v5.interop.InterOpIdentityInfo; | ||
import net.corda.v5.membership.MemberInfo; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* {@link InteropIdentityLookUp} allows flows to retrieve the {@link InterOpIdentityInfo} for any registered InterOp Alias Identity, including it's own Alias Identity. | ||
* <p> | ||
* The platform will provide an instance of {@link InteropIdentityLookUp} to flows via property injection. | ||
*/ | ||
@DoNotImplement | ||
public interface InteropIdentityLookUp { | ||
|
||
/** | ||
* @param applicationName {@link String} The application name for InterOp Identity which is set during InterOp Alias Identity Registration. | ||
* @return The {@link InterOpIdentityInfo} representing the alias member info for given alias x500name and host network. | ||
*/ | ||
@Suspendable | ||
@Nullable | ||
InterOpIdentityInfo lookup(String applicationName); | ||
|
||
/** | ||
* @param facadeId The facadeId of the facade. | ||
* @return The {@link List<InterOpIdentityInfo>} for any registered InterOp Alias Identity that implement the given FacadeId. | ||
*/ | ||
@Suspendable | ||
@NotNull | ||
List<InterOpIdentityInfo> lookup(FacadeId facadeId); | ||
} |
26 changes: 0 additions & 26 deletions
26
application/src/main/java/net/corda/v5/application/interop/RemoteAliasLookUp.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
interop/src/main/java/net/corda/v5/interop/AliasMemberInfo.java
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
interop/src/main/java/net/corda/v5/interop/HoldingIdAliasGroupInfo.java
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
interop/src/main/java/net/corda/v5/interop/InterOpIdentityInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package net.corda.v5.interop; | ||
|
||
import net.corda.v5.base.annotations.CordaSerializable; | ||
import org.jetbrains.annotations.NotNull; | ||
import java.util.List; | ||
|
||
/** | ||
* This interface represents the InterOp Identity Info that have been registered with the User. | ||
* <p> InterOpIdentityInfo details like Application Name, implemented facadeIds and X500 name. | ||
* | ||
* | ||
*/ | ||
@CordaSerializable | ||
public interface InterOpIdentityInfo { | ||
/** | ||
* @return The {@link String} identifier for the InterOp Identity. This is the Common Name (CN) from the X500 and is set during Interop Registration. | ||
*/ | ||
@NotNull | ||
String applicationName(); | ||
|
||
/** | ||
* @return The {@link String} of the Identity's X500. | ||
*/ | ||
@NotNull | ||
String getX500Name(); | ||
|
||
/** | ||
* @return The {@link List<String>} representing the list of facade ids. | ||
*/ | ||
@NotNull | ||
List<String> getFacadeIds(); | ||
} |
31 changes: 0 additions & 31 deletions
31
interop/src/main/java/net/corda/v5/interop/InteropGroupInfo.java
This file was deleted.
Oops, something went wrong.