X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fapi%2Fopenflow%2FOFPManager.java;h=38e2a36c58fc82c25045bb018d0be2f090e5a8ac;hb=ed4d25aecaabfe181dbb114d4666f3a05f3531fb;hp=1879a4c55ac38b1d2548308bc581bbb97c5fea9c;hpb=beaf57528af475963dc72aaa66c00f666d3ab7a6;p=openflowplugin.git diff --git a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/OFPManager.java b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/OFPManager.java index 1879a4c55a..38e2a36c58 100644 --- a/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/OFPManager.java +++ b/openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/openflow/OFPManager.java @@ -1,19 +1,25 @@ /* - * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2016 Pantheon Technologies s.r.o. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ + package org.opendaylight.openflowplugin.api.openflow; -import org.opendaylight.openflowplugin.api.openflow.device.DeviceInfo; +import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceRemovedHandler; /** - * Generic API for all managers + * This interface is responsible for managing lifecycle of itself and all it's associated contexts. + * Every manager that implements this interface must handle internal map of contexts by implementing methods from + * {@link org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceRemovedHandler}. And at last, it must + * handle it's own full termination by implementing {@link AutoCloseable#close()} */ -public interface OFPManager { - - T gainContext(final DeviceInfo deviceInfo); +public interface OFPManager extends + DeviceRemovedHandler, + AutoCloseable { + @Override + void close(); }