]> git.bitcoin.ninja Git - ldk-java/blob - src/main/java/org/ldk/structs/NetGraphMsgHandler.java
Fix race in tests
[ldk-java] / src / main / java / org / ldk / structs / NetGraphMsgHandler.java
1 package org.ldk.structs;
2
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
5 import org.ldk.util.*;
6 import java.util.Arrays;
7
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class NetGraphMsgHandler extends CommonBase {
10         NetGraphMsgHandler(Object _dummy, long ptr) { super(ptr); }
11         @Override @SuppressWarnings("deprecation")
12         protected void finalize() throws Throwable {
13                 super.finalize();
14                 if (ptr != 0) { bindings.NetGraphMsgHandler_free(ptr); }
15         }
16
17         public static NetGraphMsgHandler constructor_new(Access chain_access, Logger logger) {
18                 long ret = bindings.NetGraphMsgHandler_new(chain_access == null ? 0 : chain_access.ptr, logger == null ? 0 : logger.ptr);
19                 NetGraphMsgHandler ret_hu_conv = new NetGraphMsgHandler(null, ret);
20                 ret_hu_conv.ptrs_to.add(chain_access);
21                 ret_hu_conv.ptrs_to.add(logger);
22                 return ret_hu_conv;
23         }
24
25         // Skipped NetGraphMsgHandler_from_net_graph
26         public LockedNetworkGraph read_locked_graph() {
27                 long ret = bindings.NetGraphMsgHandler_read_locked_graph(this.ptr);
28                 LockedNetworkGraph ret_hu_conv = new LockedNetworkGraph(null, ret);
29                 return ret_hu_conv;
30         }
31
32         public RoutingMessageHandler as_RoutingMessageHandler() {
33                 long ret = bindings.NetGraphMsgHandler_as_RoutingMessageHandler(this.ptr);
34                 RoutingMessageHandler ret_hu_conv = new RoutingMessageHandler(null, ret);
35                 ret_hu_conv.ptrs_to.add(this);
36                 return ret_hu_conv;
37         }
38
39 }