Class PeerSpecificParserConstraintImpl
- java.lang.Object
-
- org.opendaylight.protocol.bgp.parser.spi.pojo.PeerSpecificParserConstraintImpl
-
- All Implemented Interfaces:
PeerSpecificParserConstraint
,PeerSpecificParserConstraintProvider
public class PeerSpecificParserConstraintImpl extends Object implements PeerSpecificParserConstraintProvider
-
-
Constructor Summary
Constructors Constructor Description PeerSpecificParserConstraintImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends PeerConstraint>
booleanaddPeerConstraint(Class<T> classType, T peerConstraint)
Register newPeerConstraint
service.<T extends PeerConstraint>
Optional<T>getPeerConstraint(Class<T> peerConstraintType)
Looks-up and optionally returnsPeerConstraint
service.
-
-
-
Method Detail
-
getPeerConstraint
public <T extends PeerConstraint> Optional<T> getPeerConstraint(Class<T> peerConstraintType)
Description copied from interface:PeerSpecificParserConstraint
Looks-up and optionally returnsPeerConstraint
service.- Specified by:
getPeerConstraint
in interfacePeerSpecificParserConstraint
- Parameters:
peerConstraintType
- Class type of the service.- Returns:
- Optional of the required service, absent if the service is not available.
-
addPeerConstraint
public <T extends PeerConstraint> boolean addPeerConstraint(Class<T> classType, T peerConstraint)
Description copied from interface:PeerSpecificParserConstraintProvider
Register newPeerConstraint
service.- Specified by:
addPeerConstraint
in interfacePeerSpecificParserConstraintProvider
- Parameters:
classType
- Class type of the service to be added.peerConstraint
- Peer constraint service to be added.- Returns:
- True if service was added, false if not (such service is already registered).
-
-