/*******************************************************************************
 * Copyright (C) 2017 Push Technology Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/

package com.pushtechnology.adapters.rest.metrics;

import org.apache.http.HttpResponse;

import com.pushtechnology.adapters.rest.model.latest.EndpointConfig;
import com.pushtechnology.adapters.rest.model.latest.ServiceConfig;

/**
 * Listener for endpoint poll events.
 *
 * @author Push Technology Limited
 */
public interface PollListener {
    /**
     * Notified when an attempt to poll an endpoint is made.
     *
     * @param serviceConfig the service
     * @param endpointConfig the endpoint
     */
    void onPollRequest(ServiceConfig serviceConfig, EndpointConfig endpointConfig);

    /**
     * Notified when a response from an endpoint is received.
     *
     * @param serviceConfig the service
     * @param endpointConfig the endpoint
     * @param response the response from the endpoint
     */
    void onPollResponse(ServiceConfig serviceConfig, EndpointConfig endpointConfig, HttpResponse response);

    /**
     * Notified when an attempt to poll an endpoint fails.
     *
     * @param serviceConfig the service
     * @param endpointConfig the endpoint
     * @param exception the exception associated with the failure
     */
    void onPollFailure(ServiceConfig serviceConfig, EndpointConfig endpointConfig, Exception exception);
}

@@ -2009,11 +2009,582 @@
 eption);
+%0A%0A    /**%0A     * Implementation of %7B@link PollListener%7D that ignores notifications.%0A     */%0A    PollListener NULL_LISTENER = new PollListener() %7B%0A        @Override%0A        public void onPollRequest(ServiceConfig serviceConfig, EndpointConfig endpointConfig) %7B%0A        %7D%0A%0A        @Override%0A        public void onPollResponse(ServiceConfig serviceConfig, EndpointConfig endpointConfig, HttpResponse response) %7B%0A        %7D%0A%0A        @Override%0A        public void onPollFailure(ServiceConfig serviceConfig, EndpointConfig endpointConfig, Exception exception) %7B%0A        %7D%0A    %7D;
 %0A%7D%0A

Add null poll event listener.