Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Missing listener callbacks in Java bindings
03-02-2014, 04:53 PM
Post: #1
Missing listener callbacks in Java bindings
I've got a situation where I need to detect subnet changes. Unfortunately, the ohNet listener callbacks that would alllow me to do this are missing from the Java bindings.

I'm attaching a patch to add the following methods to InitParams:

public synchronized void setSubnetListChangedListener(IChangeListener aListener)
public synchronized void setSubnetAddedListener(INetworkAdapterListener aListener)
public synchronized void setSubnetRemovedListener(INetworkAdapterListener aListener)
public synchronized void setNetworkAdapterChangedListener(INetworkAdapterListener aListener)

I've tested that all these callbacks are received correctly by the Java application and there are no leaked objects.

The patch has two new interfaces IChangeListener.java and INetworkAdapterListener.java and some changes to the existing files InitParams.java, InitParams.c and InitParams.h.


Attached File(s)
.zip  subnet.zip (Size: 3.78 KB / Downloads: 5)
Find all posts by this user
04-02-2014, 10:16 AM
Post: #2
RE: Missing listener callbacks in Java bindings
Thanks for spotting/fixing this. I've applied your patch so it should be available this evening.
Find all posts by this user


Forum Jump: