public void processEvent(Event event)
    {

        // the last directory response
        if (event.getType() == Event.COMPLETION_EVENT)
        {
            return;
        }

        if (event.getType() != Event.OMM_ITEM_EVENT)
        {
            System.out.println(_instanceName + " Received an unsupported Event type");
            return;
        }

        OMMItemEvent itemEvent = (OMMItemEvent)event;
        OMMMsg msg = itemEvent.getMsg();
        if (msg.getDataType() != OMMTypes.MAP)
        {
            System.out.println(_instanceName + " Expected MAP");
            return;
        }

        OMMMap map = (OMMMap)msg.getPayload();
        for (Iterator<?> iter = map.iterator(); iter.hasNext();)
        {
            OMMMapEntry mapEntry = (OMMMapEntry)iter.next();

            byte action = mapEntry.getAction();
            // each mapEntry will be a separate service
            String serviceName = mapEntry.getKey().toString();

            if (action == OMMMapEntry.Action.DELETE)
            {
                System.out.println(_instanceName + " Received DELETE for " + serviceName);

                OMMState closeStatus = _parent._pool.acquireState();
                closeStatus.setStreamState(OMMState.Stream.CLOSED);
                closeStatus.setDataState(OMMState.Data.NO_CHANGE);
                closeStatus.setCode(OMMState.Code.NONE);
                closeStatus.setText("Service has been closed.");
                _itemGroupManager.applyStatus(serviceName, closeStatus);

            }
            else
            {
                if (mapEntry.getDataType() != OMMTypes.FILTER_LIST)
                {
                    System.out.println(_instanceName + " Expected FILTER_LIST");
                    continue;
                }

                decodeMapEntry(serviceName, mapEntry);
            }
        }
    }