2 * Copyright (c) 2016 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.bgp.parser.spi;
10 import java.util.Optional;
11 import org.eclipse.jdt.annotation.NonNull;
14 * Holds BGP peer specific constraints of PDU processing.
17 public interface PeerSpecificParserConstraint {
20 * Looks-up and optionally returns {@link PeerConstraint} service.
21 * @param peerConstraintType Class type of the service.
22 * @return Optional of the required service, absent if the service is not available.
24 <T extends PeerConstraint> @NonNull Optional<T> getPeerConstraint(@NonNull Class<T> peerConstraintType);