main/src/main/java/org/onap/policy/pap/main/comm/PdpStatusMessageHandler.java
/**
     * Handles the PdpStatus message coming from various PDP's.
     *
     * @param message the PdpStatus message
     */
Handles the PdpStatus message coming from various PDP's.
@param message the PdpStatus message
Handles the PdpStatus message coming from various PDP ' s . @param message the PdpStatus message
public void handlePdpStatus(final PdpStatus message) {
        synchronized (updateLock) {
            try (PolicyModelsProvider databaseProvider = modelProviderWrapper.create()) {
                if (message.getPdpGroup() == null && message.getPdpSubgroup() == null) {
                    handlePdpRegistration(message, databaseProvider);
                } else {
                    handlePdpHeartbeat(message, databaseProvider);
                }
                /*
                 * Indicate that a heart beat was received from the PDP. This is invoked
                 * only if handleXxx() does not throw an exception.
                 */
                if (message.getName() != null) {
                    PdpTracker pdpTracker = Registry.get(PapConstants.REG_PDP_TRACKER);
                    pdpTracker.add(message.getName());
                }
            } catch (final PolicyPapException exp) {
                LOGGER.error("Operation Failed", exp);
            } catch (final Exception exp) {
                LOGGER.error("Failed connecting to database provider", exp);
            }
        }
    }
public void handlePdpStatus ( final PdpStatus message ) { synchronized ( updateLock ) { try ( PolicyModelsProvider databaseProvider = modelProviderWrapper . create ( ) ) { if ( message . getPdpGroup ( ) == null && message . getPdpSubgroup ( ) == null ) { handlePdpRegistration ( message , databaseProvider ) ; } else { handlePdpHeartbeat ( message , databaseProvider ) ; } /*
                 * Indicate that a heart beat was received from the PDP. This is invoked
                 * only if handleXxx() does not throw an exception.
                 */ if ( message . getName ( ) != null ) { PdpTracker pdpTracker = Registry . get ( PapConstants . REG_PDP_TRACKER ) ; pdpTracker . add ( message . getName ( ) ) ; } } catch ( final PolicyPapException exp ) { LOGGER . error ( "Operation Failed" , exp ) ; } catch ( final Exception exp ) { LOGGER . error ( "Failed connecting to database provider" , exp ) ; } } }
Handles the PdpStatus message coming from various PDP's.
Handles the PdpStatus message coming from various PDP ' s .