2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.groupbasedpolicy.sxp.ep.provider.impl.util;
11 import com.google.common.util.concurrent.FutureCallback;
12 import javax.annotation.Nullable;
13 import org.slf4j.Logger;
14 import org.slf4j.LoggerFactory;
17 * Purpose: place for common functionality regarding endpoint tasks
19 public final class L3EPServiceUtil {
21 private static final Logger LOG = LoggerFactory.getLogger(L3EPServiceUtil.class);
23 private L3EPServiceUtil() {
24 throw new IllegalAccessError("constructing util class");
27 public static <O> FutureCallback<O> createFailureLoggingCallback(final String failMessage) {
28 return new FutureCallback<O>() {
30 public void onSuccess(@Nullable final O result) {
35 public void onFailure(final Throwable t) {
36 LOG.warn(failMessage, t);