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.pcep;
10 import java.io.Closeable;
13 * PCEP Session represents the finite state machine in PCEP,
14 * including timers and its purpose is to create a PCEP connection
15 * between PCE/PCC. Session is automatically started, when TCP
16 * connection is created, but can be stopped manually.
17 * If the session is up, it has to redirect messages to/from user.
18 * Handles also malformed messages and unknown requests.
20 public interface PCEPSession extends Closeable {
23 * Sends message from user to PCE/PCC. If the user sends an Open
24 * Message, the session returns an error (open message is only
25 * allowed, when a PCEP handshake is in progress). Close message
26 * will close the session and free all the resources.
27 * @param message message to be sent
29 public void sendMessage(PCEPMessage message);