Update auto-generated bindings
[ldk-java] / src / main / java / org / ldk / structs / PeerHandleError.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
9 /**
10  * Error for PeerManager errors. If you get one of these, you must disconnect the socket and
11  * generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the
12  * descriptor.
13  */
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class PeerHandleError extends CommonBase {
16         PeerHandleError(Object _dummy, long ptr) { super(ptr); }
17         @Override @SuppressWarnings("deprecation")
18         protected void finalize() throws Throwable {
19                 super.finalize();
20                 if (ptr != 0) { bindings.PeerHandleError_free(ptr); }
21         }
22
23         /**
24          * Used to indicate that we probably can't make any future connections to this peer, implying
25          * we should go ahead and force-close any channels we have with it.
26          */
27         public boolean get_no_connection_possible() {
28                 boolean ret = bindings.PeerHandleError_get_no_connection_possible(this.ptr);
29                 return ret;
30         }
31
32         /**
33          * Used to indicate that we probably can't make any future connections to this peer, implying
34          * we should go ahead and force-close any channels we have with it.
35          */
36         public void set_no_connection_possible(boolean val) {
37                 bindings.PeerHandleError_set_no_connection_possible(this.ptr, val);
38         }
39
40         /**
41          * Constructs a new PeerHandleError given each field
42          */
43         public static PeerHandleError of(boolean no_connection_possible_arg) {
44                 long ret = bindings.PeerHandleError_new(no_connection_possible_arg);
45                 PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
46                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
47                 return ret_hu_conv;
48         }
49
50         /**
51          * Creates a copy of the PeerHandleError
52          */
53         public PeerHandleError clone() {
54                 long ret = bindings.PeerHandleError_clone(this.ptr);
55                 PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
56                 ret_hu_conv.ptrs_to.add(this);
57                 return ret_hu_conv;
58         }
59
60 }