Regarding network object #fabricsdk #java


jeff.jo95z@...
 

Hi All,

what is the value returned by this particular method of a network object?

Network networkObj 

networkObj.getChannel().getBlockListenerHandles()
(fabric sdk java)


Mark Lewis
 

The legacy low-level SDK uses a "handle" as a way of referencing block listeners so that you can remove them using Channel.unregisterBlockListener(). The handle is just a unique identifier. This method gets the handles of all active block listeners.

If you are using (or can use) Fabric v2.4 or later, you should use the new Fabric Gateway client API. If you are using an older Fabric version then I would encourage you to use the legacy high-level Java SDK, which is built on top of the low-level Java SDK. Both of these newer APIs provide their own block listener capability. I would not recommending developing code using the legacy low-level Java SDK.