NodeRPCConnection.java instead NodeRPCConnection.ktDo we really need to import Corda's code for RPC ? How in the future?Using Spring Boot For replacing Corda server giving privacy salt should be 32 bit exceptionHow to add more than 1 signee to OnledgerAsset().generateSpend in the commandError on corda webservice startupInteracting Corda with Custom applicationhow to use vaultQuery in CordaCannot connect to Corda by RPC with different machinesWhy set up Serialization Context in Corda off node?Failed to deserialize RPC reply, Requested interfaces must consist only of methods that start with 'get', [corda] errorCode 15rlwi0Unable to upgrade corda 3.3 to corda 4.0

Project Euler # 25 The 1000 digit Fibonacci index

A "Replace" sort problem. Basic but haunts me

Is "repository" pronounced /rɪˈpɒzɪt(ə)ri/ or ri-ˈpä-zə-ˌtȯr-ē or /rəˈpäzəˌtôrē/?

Improving an O(N^2) function (all entities iterating over all other entities)

Should I work for free if client's requirement changed

Last-minute canceled work-trip means I'll lose thousands of dollars on planned vacation

Company looks for long-term employees, but I know I won't be interested in staying long

Why teach C using scanf without talking about command line arguments?

Did I pick the wrong bike?

What are my hardware upgrade optoins for a late 2009 iMac?

Are there foods that astronauts are explicitly never allowed to eat?

Why aren't there any women super Grandmasters (GMs)?

Which modern firearm should a time traveler bring to be easily reproducible for a historic civilization?

Why there is no article before venture capital firm in "Beller’s first high-profile role was at venture capital firm Andreessen Horwitz, .."?

Authorship dispute on a paper that came out of a final report of a course?

Should I have shared a document with a former employee?

Manager is asking me to eat breakfast from now on

Is it possible to target 2 allies with the Warding Bond spell using the Sorcerer's Twinned Spell metamagic option?

Does the Bracer of Flying Daggers really let a thief make 4 attacks per round?

Applying for jobs with an obvious scar

Three Subway Escalators

The most secure way to handle someone forgetting to verify their account?

Was demon possession only a New Testament phenomenon?

How did Jayne know when to shoot?



NodeRPCConnection.java instead NodeRPCConnection.kt


Do we really need to import Corda's code for RPC ? How in the future?Using Spring Boot For replacing Corda server giving privacy salt should be 32 bit exceptionHow to add more than 1 signee to OnledgerAsset().generateSpend in the commandError on corda webservice startupInteracting Corda with Custom applicationhow to use vaultQuery in CordaCannot connect to Corda by RPC with different machinesWhy set up Serialization Context in Corda off node?Failed to deserialize RPC reply, Requested interfaces must consist only of methods that start with 'get', [corda] errorCode 15rlwi0Unable to upgrade corda 3.3 to corda 4.0






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I want to connect RPC connection using java instead of kotlin. In corda 4.0 they have given using kotlin but I need it in java.



I have tried using java but its not working...



@RestController
@RequestMapping("/api/example/")









share|improve this question
























  • Formatted the code

    – EdChum
    Mar 26 at 11:45

















0















I want to connect RPC connection using java instead of kotlin. In corda 4.0 they have given using kotlin but I need it in java.



I have tried using java but its not working...



@RestController
@RequestMapping("/api/example/")









share|improve this question
























  • Formatted the code

    – EdChum
    Mar 26 at 11:45













0












0








0








I want to connect RPC connection using java instead of kotlin. In corda 4.0 they have given using kotlin but I need it in java.



I have tried using java but its not working...



@RestController
@RequestMapping("/api/example/")









share|improve this question
















I want to connect RPC connection using java instead of kotlin. In corda 4.0 they have given using kotlin but I need it in java.



I have tried using java but its not working...



@RestController
@RequestMapping("/api/example/")






corda






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 11:45









EdChum

198k39 gold badges447 silver badges358 bronze badges




198k39 gold badges447 silver badges358 bronze badges










asked Mar 26 at 9:40









pruthviraj pudaripruthviraj pudari

56 bronze badges




56 bronze badges












  • Formatted the code

    – EdChum
    Mar 26 at 11:45

















  • Formatted the code

    – EdChum
    Mar 26 at 11:45
















Formatted the code

– EdChum
Mar 26 at 11:45





Formatted the code

– EdChum
Mar 26 at 11:45












1 Answer
1






active

oldest

votes


















0














below code snippet from WebFlux module which connects to corda node using RPC:



@Component
public class NodeRPCConnection implements AutoCloseable
// The host of the node we are connecting to.
@Value("$config.rpc.host")
private String host;
// The RPC port of the node we are connecting to.
@Value("$config.rpc.username")
private String username;
// The username for logging into the RPC client.
@Value("$config.rpc.password")
private String password;
// The password for logging into the RPC client.
@Value("$config.rpc.port")
private int rpcPort;

private CordaRPCConnection rpcConnection;
private CordaRPCOps proxy;



@PostConstruct
public void initialiseNodeRPCConnection()
NetworkHostAndPort rpcAddress = new NetworkHostAndPort(host, rpcPort);
CordaRPCClient rpcClient = new CordaRPCClient(rpcAddress);
rpcConnection = rpcClient.start(username, password);
proxy = rpcConnection.getProxy();


@PreDestroy
public void close()
rpcConnection.notifyServerAndClose();


public CordaRPCOps getProxy()
return proxy;







share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55353913%2fnoderpcconnection-java-instead-noderpcconnection-kt%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    below code snippet from WebFlux module which connects to corda node using RPC:



    @Component
    public class NodeRPCConnection implements AutoCloseable
    // The host of the node we are connecting to.
    @Value("$config.rpc.host")
    private String host;
    // The RPC port of the node we are connecting to.
    @Value("$config.rpc.username")
    private String username;
    // The username for logging into the RPC client.
    @Value("$config.rpc.password")
    private String password;
    // The password for logging into the RPC client.
    @Value("$config.rpc.port")
    private int rpcPort;

    private CordaRPCConnection rpcConnection;
    private CordaRPCOps proxy;



    @PostConstruct
    public void initialiseNodeRPCConnection()
    NetworkHostAndPort rpcAddress = new NetworkHostAndPort(host, rpcPort);
    CordaRPCClient rpcClient = new CordaRPCClient(rpcAddress);
    rpcConnection = rpcClient.start(username, password);
    proxy = rpcConnection.getProxy();


    @PreDestroy
    public void close()
    rpcConnection.notifyServerAndClose();


    public CordaRPCOps getProxy()
    return proxy;







    share|improve this answer





























      0














      below code snippet from WebFlux module which connects to corda node using RPC:



      @Component
      public class NodeRPCConnection implements AutoCloseable
      // The host of the node we are connecting to.
      @Value("$config.rpc.host")
      private String host;
      // The RPC port of the node we are connecting to.
      @Value("$config.rpc.username")
      private String username;
      // The username for logging into the RPC client.
      @Value("$config.rpc.password")
      private String password;
      // The password for logging into the RPC client.
      @Value("$config.rpc.port")
      private int rpcPort;

      private CordaRPCConnection rpcConnection;
      private CordaRPCOps proxy;



      @PostConstruct
      public void initialiseNodeRPCConnection()
      NetworkHostAndPort rpcAddress = new NetworkHostAndPort(host, rpcPort);
      CordaRPCClient rpcClient = new CordaRPCClient(rpcAddress);
      rpcConnection = rpcClient.start(username, password);
      proxy = rpcConnection.getProxy();


      @PreDestroy
      public void close()
      rpcConnection.notifyServerAndClose();


      public CordaRPCOps getProxy()
      return proxy;







      share|improve this answer



























        0












        0








        0







        below code snippet from WebFlux module which connects to corda node using RPC:



        @Component
        public class NodeRPCConnection implements AutoCloseable
        // The host of the node we are connecting to.
        @Value("$config.rpc.host")
        private String host;
        // The RPC port of the node we are connecting to.
        @Value("$config.rpc.username")
        private String username;
        // The username for logging into the RPC client.
        @Value("$config.rpc.password")
        private String password;
        // The password for logging into the RPC client.
        @Value("$config.rpc.port")
        private int rpcPort;

        private CordaRPCConnection rpcConnection;
        private CordaRPCOps proxy;



        @PostConstruct
        public void initialiseNodeRPCConnection()
        NetworkHostAndPort rpcAddress = new NetworkHostAndPort(host, rpcPort);
        CordaRPCClient rpcClient = new CordaRPCClient(rpcAddress);
        rpcConnection = rpcClient.start(username, password);
        proxy = rpcConnection.getProxy();


        @PreDestroy
        public void close()
        rpcConnection.notifyServerAndClose();


        public CordaRPCOps getProxy()
        return proxy;







        share|improve this answer















        below code snippet from WebFlux module which connects to corda node using RPC:



        @Component
        public class NodeRPCConnection implements AutoCloseable
        // The host of the node we are connecting to.
        @Value("$config.rpc.host")
        private String host;
        // The RPC port of the node we are connecting to.
        @Value("$config.rpc.username")
        private String username;
        // The username for logging into the RPC client.
        @Value("$config.rpc.password")
        private String password;
        // The password for logging into the RPC client.
        @Value("$config.rpc.port")
        private int rpcPort;

        private CordaRPCConnection rpcConnection;
        private CordaRPCOps proxy;



        @PostConstruct
        public void initialiseNodeRPCConnection()
        NetworkHostAndPort rpcAddress = new NetworkHostAndPort(host, rpcPort);
        CordaRPCClient rpcClient = new CordaRPCClient(rpcAddress);
        rpcConnection = rpcClient.start(username, password);
        proxy = rpcConnection.getProxy();


        @PreDestroy
        public void close()
        rpcConnection.notifyServerAndClose();


        public CordaRPCOps getProxy()
        return proxy;








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 31 at 18:41

























        answered Mar 27 at 9:33









        shpitcshpitc

        11 bronze badge




        11 bronze badge


















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55353913%2fnoderpcconnection-java-instead-noderpcconnection-kt%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript