java - Firebase server side OnDisconnect -


i want monitor firebase client connections java server.

i have found lot of examples on how use ondisconnect client side (ios), , works great.

but possible monitor client connections java server using java server sdk? want server know user disconnects, without client having 'tell' firebase database has connected/disconnected.

the reason security, , wish trust client little possible important tasks. ideally of data should 'read only' client, except 'write only' request queues consumed java server.

from firebase java server documentation: https://firebase.google.com/docs/reference/serverreference/com/google/firebase/database/ondisconnect

the ondisconnect class used manage operations run on server when client disconnects. can used add or remove data based on client's connection status. useful in applications looking 'presence' functionality.

it seems want possible , supported, i'm having hard time figuring out how make server monitor 100-1000 connections realtime.

lets i'm monitoring database reference know clients monitoring. in case none of options 'remove on disconnect' or 'set on disconnect' useful.

thanks lot reading this, i'm loving firebase right now, few more issues figure out :-) sorry english, i'm not native speaker.