2 * Copyright (c) 2013 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.protocol.framework;
10 import java.io.Closeable;
13 * Interface that groups together the classes that can create a session (Dispatcher and Server). When a session is
14 * closing, it has to notify its parent about closing. Each parent keeps a Map of its sessions. When some session
15 * closes, it fires onSessionClosed event with its own instance as parameter and the parent of this session will remove
18 public interface SessionParent extends Closeable {
21 * This listener method is called when a session that was created by a class implementing this interface, is
22 * closing. Implementation should remove corresponding session from its list of sessions.
24 * @param session a session that is closing
26 public void onSessionClosed(final ProtocolSession session);