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.impl.object;
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.ExcludeRouteObject;
13 * Parser for {@link ExcludeRouteObject}
15 // FIXME: fix model, this object is not used in a message
16 public final class PCEPExcludeRouteObjectParser { // extends AbstractObjectParser<ExcludeRouterBuilder> {
18 public static final int CLASS = 7; // FIXME: to actual value
20 public static final int TYPE = 1;
22 // public PCEPExcludeRouteObjectParser(final HandlerRegistry registry) {
27 // public ExcludeRouteObject parseObject(final ObjectHeader header, final byte[] bytes) throws
28 // PCEPDeserializerException,
29 // PCEPDocumentedException {
30 // if (bytes == null || bytes.length == 0)
31 // throw new IllegalArgumentException("Byte array is mandatory. Can't be null or empty.");
33 // final ExcludeRouterBuilder builder = new ExcludeRouterBuilder();
35 // builder.setIgnore(header.isIgnore());
36 // builder.setProcessingRule(header.isProcessingRule());
37 // // FIXME: add subobjects
38 // return builder.build();
42 // public void addTlv(final ExcludeRouterBuilder builder, final Tlv tlv) {
47 // public byte[] serializeObject(final Object object) {
48 // if (!(object instanceof ExcludeRouteObject))
49 // throw new IllegalArgumentException("Wrong instance of PCEPObject. Passed " + object.getClass() +
50 // ". Needed ExcludeRouteObject.");
52 // assert !(((ExcludeRouteObject) object).getSubobjects().isEmpty()) : "Empty Excluded Route Object.";
54 // // return PCEPEROSubobjectParser.put(((ExplicitRouteObject) obj).getSubobjects());
56 // // FIXME: add subobjects
61 // public int getObjectType() {
66 // public int getObjectClass() {