how do I get the room from a "userLost" InternalEv
Posted: 31 Mar 2008, 11:35
In a Java extension I want to track the room of a user that disconnects from the server (e.g. by closing his browser window). My extension receives an InternalEventObject of type "userLost". The SFS docs say that this event has a parameter called "roomIds" of type int[].
But all get from this parameter is an array of 2 objects. There is no way I can cast this into an int or Integer. I wonder what kind of information this object holds? (If I print out the contents of an object[] which holds ints for testing in another file I get int values, which I can cast as ints. Not in this case, all I see is something like "[I"
Here's what I have:
Any idea how I can retrieve th room of the lost user? Thanks.
But all get from this parameter is an array of 2 objects. There is no way I can cast this into an int or Integer. I wonder what kind of information this object holds? (If I print out the contents of an object[] which holds ints for testing in another file I get int values, which I can cast as ints. Not in this case, all I see is something like "[I"
Here's what I have:
Code: Select all
public void handleInternalEvent(InternalEventObject ieo)
{
//how can I retrieve the room information form the following expression?
ieo.getTypedObject("roomIds")[0];