use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev171207.string.informations.StringInformation in project bgpcep by opendaylight.
the class InitiationHandler method serializeTlvs.
private void serializeTlvs(final Tlvs tlvs, final ByteBuf output) {
serializeTlv(tlvs.getNameTlv(), output);
serializeTlv(tlvs.getDescriptionTlv(), output);
if (tlvs.getStringInformation() != null) {
for (final StringInformation stringInfo : tlvs.getStringInformation()) {
if (stringInfo.getStringTlv() != null) {
serializeTlv(stringInfo.getStringTlv(), output);
}
}
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev171207.string.informations.StringInformation in project bgpcep by opendaylight.
the class PeerUpHandler method addTlv.
@Override
protected void addTlv(final InformationBuilder builder, final Tlv tlv) {
if (tlv instanceof StringTlv) {
final ImmutableList.Builder<StringInformation> stringInfoListBuilder = ImmutableList.builder();
if (builder.getStringInformation() != null) {
stringInfoListBuilder.addAll(builder.getStringInformation());
}
builder.setStringInformation(stringInfoListBuilder.add(new StringInformationBuilder().setStringTlv(new StringTlvBuilder((StringTlv) tlv).build()).build()).build());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bmp.message.rev171207.string.informations.StringInformation in project bgpcep by opendaylight.
the class BmpRouterImpl method getStringInfo.
private static String getStringInfo(final List<StringInformation> info) {
final StringBuilder builder = new StringBuilder();
if (info != null) {
for (final StringInformation string : info) {
if (string.getStringTlv() != null) {
builder.append(string.getStringTlv().getStringInfo());
builder.append(";");
}
}
}
return builder.toString();
}
Aggregations