import org.ldk.util.*;
import java.util.Arrays;
+
+/**
+ * An event generated by ChannelManager which indicates a message should be sent to a peer (or
+ * broadcast to most peers).
+ * These events are handled by PeerManager::process_events if you are using a PeerManager.
+ */
@SuppressWarnings("unchecked") // We correctly assign various generic arrays
public class MessageSendEvent extends CommonBase {
private MessageSendEvent(Object _dummy, long ptr) { super(ptr); }
if (raw_val.getClass() == bindings.LDKMessageSendEvent.SendShortIdsQuery.class) {
return new SendShortIdsQuery(ptr, (bindings.LDKMessageSendEvent.SendShortIdsQuery)raw_val);
}
+ if (raw_val.getClass() == bindings.LDKMessageSendEvent.SendReplyChannelRange.class) {
+ return new SendReplyChannelRange(ptr, (bindings.LDKMessageSendEvent.SendReplyChannelRange)raw_val);
+ }
assert false; return null; // Unreachable without extending the (internal) bindings interface
}
this.node_id = obj.node_id;
long msg = obj.msg;
AcceptChannel msg_hu_conv = new AcceptChannel(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
OpenChannel msg_hu_conv = new OpenChannel(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
FundingCreated msg_hu_conv = new FundingCreated(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
FundingSigned msg_hu_conv = new FundingSigned(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
FundingLocked msg_hu_conv = new FundingLocked(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
AnnouncementSignatures msg_hu_conv = new AnnouncementSignatures(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long updates = obj.updates;
CommitmentUpdate updates_hu_conv = new CommitmentUpdate(null, updates);
+ updates_hu_conv.ptrs_to.add(this);
this.updates = updates_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
RevokeAndACK msg_hu_conv = new RevokeAndACK(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
ClosingSigned msg_hu_conv = new ClosingSigned(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
Shutdown msg_hu_conv = new Shutdown(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
ChannelReestablish msg_hu_conv = new ChannelReestablish(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
super(null, ptr);
long msg = obj.msg;
ChannelAnnouncement msg_hu_conv = new ChannelAnnouncement(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
long update_msg = obj.update_msg;
ChannelUpdate update_msg_hu_conv = new ChannelUpdate(null, update_msg);
+ update_msg_hu_conv.ptrs_to.add(this);
this.update_msg = update_msg_hu_conv;
}
}
super(null, ptr);
long msg = obj.msg;
NodeAnnouncement msg_hu_conv = new NodeAnnouncement(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
super(null, ptr);
long msg = obj.msg;
ChannelUpdate msg_hu_conv = new ChannelUpdate(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
QueryChannelRange msg_hu_conv = new QueryChannelRange(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}
this.node_id = obj.node_id;
long msg = obj.msg;
QueryShortChannelIds msg_hu_conv = new QueryShortChannelIds(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
+ this.msg = msg_hu_conv;
+ }
+ }
+ public final static class SendReplyChannelRange extends MessageSendEvent {
+ public final byte[] node_id;
+ public final ReplyChannelRange msg;
+ private SendReplyChannelRange(long ptr, bindings.LDKMessageSendEvent.SendReplyChannelRange obj) {
+ super(null, ptr);
+ this.node_id = obj.node_id;
+ long msg = obj.msg;
+ ReplyChannelRange msg_hu_conv = new ReplyChannelRange(null, msg);
+ msg_hu_conv.ptrs_to.add(this);
this.msg = msg_hu_conv;
}
}