2 * Copyright (c) 2015 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
8 package org.opendaylight.openflowplugin.impl.services;
10 import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
12 import org.slf4j.Logger;
14 public final class RequestContextUtil {
16 private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(RequestContextUtil.class);
18 private RequestContextUtil() {
19 throw new UnsupportedOperationException();
23 public static void closeRequstContext(final RequestContext<?> requestContext) {
25 requestContext.close();
26 } catch (Exception e) {
27 LOG.debug("Request context wasn't closed. Exception message: {}",e.getMessage());