How to determine Packet of type Invite (muc)

Hello all,

I am attempting to intercept a packet that is an invite to a MUC room.

Seems that it is an instanceof Message but I cannot seem to further filter unless I parse the body (which I am trying to avoid).

Here is my Listener code

private class MyPacketInterceptor implements PacketInterceptor {
       public void interceptPacket(Packet packet, Session session, boolean incoming, boolean processed) throws PacketRejectedException {
            if(packet instanceof Message) {
                Message message = (Message) packet;
                Type type = message.getType();
      "Message type="+message.getType().toString());

Here is the Packet.toString() results:

<message from="testroom@conference.mymachine" to="user1@mymachine">
<x xmlns="">
<x xmlns="jabber:x:conference" jid="testroom@conference.mymachine"/>

The Type.toString() results:


Is there a way to filter further to determine if this is an invite?