mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/osgi/EventAdminMessageService.java
private int registrationExists(final EventRegistrationRequestData message, final int systemId,
            final EncryptType encryptionType)
    {
        for (Integer existingRegId : m_Registrations.keySet())
        {
            final RemoteEventRegistration existingEventReg = m_Registrations.get(existingRegId);
            final EventRegistrationRequestData existingMessage = existingEventReg.getEventRegistrationRequestData();
            if (systemId == existingEventReg.getSystemId()
                    && message.getCanQueueEvent() == existingMessage.getCanQueueEvent()
                    && message.getObjectFormat().equals(existingMessage.getObjectFormat())
                    && ((message.hasFilter() && message.getFilter().equals(existingMessage.getFilter()))
                            || (!message.hasFilter() && !existingMessage.hasFilter()))
                    && topicListsEqual(message.getTopicList(), existingMessage.getTopicList()))
            {
                return existingRegId;
            }
        }

        return -1;
    }
/**
     * Check to see if an event registration already exists for a system ID.
     * @param message
     *     the remote event registration message that contains the information of what to listen for
     * @param systemId
     *     the id of the system which is requesting to receive remote notification of events
     * @param encryptionType
     *     the type of encryption to apply to event messages that are generated in response to the registration
     * @return true if event registration already exists, false otherwise
     */
Check to see if an event registration already exists for a system ID.
@param message
the remote event registration message that contains the information of what to listen for
@param systemId
the id of the system which is requesting to receive remote notification of events
@param encryptionType
the type of encryption to apply to event messages that are generated in response to the registration
@return true if event registration already exists, false otherwise
Check to see if an event registration already exists for a system ID . @param message the remote event registration message that contains the information of what to listen for @param systemId the id of the system which is requesting to receive remote notification of events @param encryptionType the type of encryption to apply to event messages that are generated in response to the registration @return true if event registration already exists false otherwise
private int registrationExists(final EventRegistrationRequestData message, final int systemId,
            final EncryptType encryptionType)
    {
        for (Integer existingRegId : m_Registrations.keySet())
        {
            final RemoteEventRegistration existingEventReg = m_Registrations.get(existingRegId);
            final EventRegistrationRequestData existingMessage = existingEventReg.getEventRegistrationRequestData();
            if (systemId == existingEventReg.getSystemId()
                    && message.getCanQueueEvent() == existingMessage.getCanQueueEvent()
                    && message.getObjectFormat().equals(existingMessage.getObjectFormat())
                    && ((message.hasFilter() && message.getFilter().equals(existingMessage.getFilter()))
                            || (!message.hasFilter() && !existingMessage.hasFilter()))
                    && topicListsEqual(message.getTopicList(), existingMessage.getTopicList()))
            {
                return existingRegId;
            }
        }
        return -1;
    }
private int registrationExists ( final EventRegistrationRequestData message , final int systemId , final EncryptType encryptionType ) { for ( Integer existingRegId : m_Registrations . keySet ( ) ) { final RemoteEventRegistration existingEventReg = m_Registrations . get ( existingRegId ) ; final EventRegistrationRequestData existingMessage = existingEventReg . getEventRegistrationRequestData ( ) ; if ( systemId == existingEventReg . getSystemId ( ) && message . getCanQueueEvent ( ) == existingMessage . getCanQueueEvent ( ) && message . getObjectFormat ( ) . equals ( existingMessage . getObjectFormat ( ) ) && ( ( message . hasFilter ( ) && message . getFilter ( ) . equals ( existingMessage . getFilter ( ) ) ) || ( ! message . hasFilter ( ) && ! existingMessage . hasFilter ( ) ) ) && topicListsEqual ( message . getTopicList ( ) , existingMessage . getTopicList ( ) ) ) { return existingRegId ; } } return - 1 ; }
Check to see if an event registration already exists for a system ID.
Check to see if an event registration already exists for a system ID .