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 org.opendaylight.protocol.framework.TerminationReason;
13 * Used as a reason when a documented error was the cause of the
14 * termination of a session.
16 public final class PCEPErrorTermination implements TerminationReason {
18 private final PCEPErrors error;
21 * Creates new Termination.
22 * @param error Error that happened.
24 public PCEPErrorTermination(PCEPErrors error) {
29 * @see org.opendaylight.protocol.pcep.PCEPTerminationReason#getErrorMessage()
32 public String getErrorMessage() {
33 return this.error.toString();