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.concepts;
10 import org.opendaylight.protocol.concepts.AbstractIdentifier;
11 import org.opendaylight.protocol.util.ByteArray;
12 import com.google.common.base.Objects.ToStringHelper;
16 * href="http://tools.ietf.org/html/draft-crabbe-pce-stateful-pce-02#section-7.2.1">The
17 * LSP Symbolic Name TLV</a>
19 public final class LSPSymbolicName extends AbstractIdentifier<LSPSymbolicName> {
21 private static final long serialVersionUID = -5649378295100912021L;
23 private final byte[] symbolicName;
26 * Creates LSPSymbolicName using byte array as value.
29 * value of the LSPSymbolicName TLV
31 public LSPSymbolicName(final byte[] symbolicName) {
32 this.symbolicName = symbolicName;
36 * Gets Symbolic Name in raw byte array representation.
38 * @return byte array representation of Symbolic Name. May be null.
40 public byte[] getSymbolicName() {
41 return this.symbolicName;
45 protected byte[] getBytes() {
46 return this.symbolicName;
50 protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) {
51 return toStringHelper.add("symbolicName", ByteArray.toHexString(symbolicName, "."));