- public static NetGraphMsgHandler of(byte[] genesis_hash, @Nullable Access chain_access, Logger logger) {
- long ret = bindings.NetGraphMsgHandler_new(genesis_hash, chain_access == null ? 0 : chain_access.ptr, logger == null ? 0 : logger.ptr);
- if (ret < 1024) { return null; }
- NetGraphMsgHandler ret_hu_conv = new NetGraphMsgHandler(null, ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
- ret_hu_conv.ptrs_to.add(chain_access);
- ret_hu_conv.ptrs_to.add(logger);
+ public EventHandler as_EventHandler() {
+ long ret = bindings.NetGraphMsgHandler_as_EventHandler(this.ptr);
+ if (ret >= 0 && ret <= 4096) { return null; }
+ EventHandler ret_hu_conv = new EventHandler(null, ret);
+ ret_hu_conv.ptrs_to.add(this);