- ErrorMessage msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new ErrorMessage(null, msg); }
- msg_hu_conv.ptrs_to.add(this);
+ org.ldk.structs.ErrorMessage msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ErrorMessage(null, msg); }
+ if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
* If the error is logged, log it at the given level.
*/
public final static class IgnoreAndLog extends ErrorAction {
* If the error is logged, log it at the given level.
*/
public final static class IgnoreAndLog extends ErrorAction {
private IgnoreAndLog(long ptr, bindings.LDKErrorAction.IgnoreAndLog obj) {
super(null, ptr);
this.ignore_and_log = obj.ignore_and_log;
private IgnoreAndLog(long ptr, bindings.LDKErrorAction.IgnoreAndLog obj) {
super(null, ptr);
this.ignore_and_log = obj.ignore_and_log;
- ErrorMessage msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new ErrorMessage(null, msg); }
- msg_hu_conv.ptrs_to.add(this);
+ org.ldk.structs.ErrorMessage msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.ErrorMessage(null, msg); }
+ if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
/**
* The peer may have done something harmless that we weren't able to meaningfully process,
* though we should still tell them about it.
* If this event is logged, log it at the given level.
*/
/**
* The peer may have done something harmless that we weren't able to meaningfully process,
* though we should still tell them about it.
* If this event is logged, log it at the given level.
*/
- WarningMessage msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new WarningMessage(null, msg); }
- msg_hu_conv.ptrs_to.add(this);
+ org.ldk.structs.WarningMessage msg_hu_conv = null; if (msg < 0 || msg > 4096) { msg_hu_conv = new org.ldk.structs.WarningMessage(null, msg); }
+ if (msg_hu_conv != null) { msg_hu_conv.ptrs_to.add(this); };
long ret = bindings.ErrorAction_clone(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
long ret = bindings.ErrorAction_clone(this.ptr);
Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
- ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(this);
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
* Utility method to constructs a new DisconnectPeer-variant ErrorAction
*/
public static ErrorAction disconnect_peer(ErrorMessage msg) {
* Utility method to constructs a new DisconnectPeer-variant ErrorAction
*/
public static ErrorAction disconnect_peer(ErrorMessage msg) {
- ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(msg); };
public static ErrorAction ignore_error() {
long ret = bindings.ErrorAction_ignore_error();
if (ret >= 0 && ret <= 4096) { return null; }
public static ErrorAction ignore_error() {
long ret = bindings.ErrorAction_ignore_error();
if (ret >= 0 && ret <= 4096) { return null; }
- ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
long ret = bindings.ErrorAction_ignore_and_log(a);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
long ret = bindings.ErrorAction_ignore_and_log(a);
Reference.reachabilityFence(a);
if (ret >= 0 && ret <= 4096) { return null; }
- ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
public static ErrorAction ignore_duplicate_gossip() {
long ret = bindings.ErrorAction_ignore_duplicate_gossip();
if (ret >= 0 && ret <= 4096) { return null; }
public static ErrorAction ignore_duplicate_gossip() {
long ret = bindings.ErrorAction_ignore_duplicate_gossip();
if (ret >= 0 && ret <= 4096) { return null; }
- ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
* Utility method to constructs a new SendErrorMessage-variant ErrorAction
*/
public static ErrorAction send_error_message(ErrorMessage msg) {
* Utility method to constructs a new SendErrorMessage-variant ErrorAction
*/
public static ErrorAction send_error_message(ErrorMessage msg) {
- ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(msg); };
* Utility method to constructs a new SendWarningMessage-variant ErrorAction
*/
public static ErrorAction send_warning_message(WarningMessage msg, org.ldk.enums.Level log_level) {
* Utility method to constructs a new SendWarningMessage-variant ErrorAction
*/
public static ErrorAction send_warning_message(WarningMessage msg, org.ldk.enums.Level log_level) {
Reference.reachabilityFence(msg);
Reference.reachabilityFence(log_level);
if (ret >= 0 && ret <= 4096) { return null; }
Reference.reachabilityFence(msg);
Reference.reachabilityFence(log_level);
if (ret >= 0 && ret <= 4096) { return null; }
- ErrorAction ret_hu_conv = ErrorAction.constr_from_ptr(ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.ErrorAction ret_hu_conv = org.ldk.structs.ErrorAction.constr_from_ptr(ret);
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(msg); };