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;
11 * Interface to work with session preferences. They need to be
12 * checked during the establishment phase. If they are not
13 * acceptable a new proposal needs to be requested.
14 * This interface should be implemented by a protocol specific
15 * abstract class, that is extended by a final class that implements
18 public interface SessionPreferencesChecker {
21 * Checks session characteristics, if they are acceptable.
24 * storage for session characteristics
25 * @return true = acceptable, false = negotiable, null = unacceptable
26 * @throws DocumentedException when there is specific protocol error
27 * for rejecting the session characteristics
29 public Boolean checkSessionCharacteristics(final SessionPreferences openObj) throws DocumentedException;
32 * In case of negotiable session characteristics, new ones are requested
33 * through this method.
35 * @param oldOpen old open object with unacceptable session characteristics
37 * <li> new session characteristics wrapped in Open Object
38 * <li> null if there are not available any different acceptable
39 * session characteristics
41 public SessionPreferences getNewProposal(final SessionPreferences oldOpen);