本文整理匯總了Java中org.onosproject.pcepio.types.PcepLabelMap類的典型用法代碼示例。如果您正苦於以下問題:Java PcepLabelMap類的具體用法?Java PcepLabelMap怎麽用?Java PcepLabelMap使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PcepLabelMap類屬於org.onosproject.pcepio.types包,在下文中一共展示了PcepLabelMap類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: PcepLabelUpdateVer1
import org.onosproject.pcepio.types.PcepLabelMap; //導入依賴的package包/類
/**
* Constructor to initialize PCEP label map.
*
* @param labelMap PCEP label map
*/
public PcepLabelUpdateVer1(PcepLabelMap labelMap) {
this.labelDownload = null;
this.isLabelDownloadSet = false;
this.labelMap = labelMap;
this.isLabelMapSet = true;
}
示例2: setLabelMap
import org.onosproject.pcepio.types.PcepLabelMap; //導入依賴的package包/類
@Override
public void setLabelMap(PcepLabelMap labelMap) {
if (this.isLabelDownloadSet) {
return;
}
this.labelMap = labelMap;
this.isLabelMapSet = true;
}
示例3: getLabelMap
import org.onosproject.pcepio.types.PcepLabelMap; //導入依賴的package包/類
@Override
public PcepLabelMap getLabelMap() {
return labelMap;
}
示例4: pushGlobalNodeLabel
import org.onosproject.pcepio.types.PcepLabelMap; //導入依賴的package包/類
private void pushGlobalNodeLabel(DeviceId deviceId, LabelResourceId labelId,
IpPrefix ipPrefix, PcepFlowType type, boolean isBos) throws PcepParseException {
checkNotNull(deviceId);
checkNotNull(labelId);
checkNotNull(type);
PcepClient pc = getPcepClient(deviceId);
if (pc == null) {
log.error("PCEP client not found");
return;
}
LinkedList<PcepLabelUpdate> labelUpdateList = new LinkedList<>();
if (ipPrefix == null) {
// Pushing self node label to device.
ipPrefix = IpPrefix.valueOf(pc.getPccId().ipAddress(), 32);
}
PcepFecObjectIPv4 fecObject = pc.factory().buildFecObjectIpv4()
.setNodeID(ipPrefix.address().getIp4Address().toInt())
.build();
boolean bSFlag = false;
if (pc.labelDbSyncStatus() == IN_SYNC && !isBos) {
// Need to set sync flag in all messages till sync completes.
bSFlag = true;
}
PcepSrpObject srpObj = getSrpObject(pc, type, bSFlag);
//Global NODE-SID as label object
PcepLabelObject labelObject = pc.factory().buildLabelObject()
.setLabel((int) labelId.labelId())
.build();
PcepLabelMap labelMap = new PcepLabelMap();
labelMap.setFecObject(fecObject);
labelMap.setLabelObject(labelObject);
labelMap.setSrpObject(srpObj);
labelUpdateList.add(pc.factory().buildPcepLabelUpdateObject()
.setLabelMap(labelMap)
.build());
PcepLabelUpdateMsg labelMsg = pc.factory().buildPcepLabelUpdateMsg()
.setPcLabelUpdateList(labelUpdateList)
.build();
pc.sendMessage(labelMsg);
if (isBos) {
// Sync is completed.
pc.setLabelDbSyncStatus(SYNCED);
}
}
示例5: pushAdjacencyLabel
import org.onosproject.pcepio.types.PcepLabelMap; //導入依賴的package包/類
private void pushAdjacencyLabel(DeviceId deviceId, LabelResourceId labelId, IpPrefix ip4PrefixSrc,
IpPrefix ip4PrefixDst, PcepFlowType type)
throws PcepParseException {
checkNotNull(deviceId);
checkNotNull(labelId);
checkNotNull(ip4PrefixSrc);
checkNotNull(ip4PrefixDst);
checkNotNull(type);
PcepClient pc = getPcepClient(deviceId);
if (pc == null) {
log.error("PCEP client not found");
return;
}
LinkedList<PcepLabelUpdate> labelUpdateList = new LinkedList<>();
int srcPortNo = ip4PrefixSrc.address().getIp4Address().toInt();
int dstPortNo = ip4PrefixDst.address().getIp4Address().toInt();
PcepFecObjectIPv4Adjacency fecAdjObject = pc.factory().buildFecIpv4Adjacency()
.seRemoteIPv4Address(dstPortNo)
.seLocalIPv4Address(srcPortNo)
.build();
boolean bSFlag = false;
if (pc.labelDbSyncStatus() == IN_SYNC) {
// Need to set sync flag in all messages till sync completes.
bSFlag = true;
}
PcepSrpObject srpObj = getSrpObject(pc, type, bSFlag);
//Adjacency label object
PcepLabelObject labelObject = pc.factory().buildLabelObject()
.setLabel((int) labelId.labelId())
.build();
PcepLabelMap labelMap = new PcepLabelMap();
labelMap.setFecObject(fecAdjObject);
labelMap.setLabelObject(labelObject);
labelMap.setSrpObject(srpObj);
labelUpdateList.add(pc.factory().buildPcepLabelUpdateObject()
.setLabelMap(labelMap)
.build());
PcepLabelUpdateMsg labelMsg = pc.factory().buildPcepLabelUpdateMsg()
.setPcLabelUpdateList(labelUpdateList)
.build();
pc.sendMessage(labelMsg);
}
示例6: pushGlobalNodeLabel
import org.onosproject.pcepio.types.PcepLabelMap; //導入依賴的package包/類
void pushGlobalNodeLabel(PcepClient pc, LabelResourceId labelId,
int labelForNode, PcepLabelOp type, boolean isBos) throws PcepParseException {
checkNotNull(pc);
checkNotNull(labelId);
checkNotNull(type);
LinkedList<PcepLabelUpdate> labelUpdateList = new LinkedList<>();
PcepFecObjectIPv4 fecObject = pc.factory().buildFecObjectIpv4()
.setNodeID(labelForNode)
.build();
boolean bSFlag = false;
if (pc.labelDbSyncStatus() == IN_SYNC && !isBos) {
// Need to set sync flag in all messages till sync completes.
bSFlag = true;
}
PcepSrpObject srpObj = getSrpObject(pc, type, bSFlag);
//Global NODE-SID as label object
PcepLabelObject labelObject = pc.factory().buildLabelObject()
.setLabel((int) labelId.labelId())
.build();
PcepLabelMap labelMap = new PcepLabelMap();
labelMap.setFecObject(fecObject);
labelMap.setLabelObject(labelObject);
labelMap.setSrpObject(srpObj);
labelUpdateList.add(pc.factory().buildPcepLabelUpdateObject()
.setLabelMap(labelMap)
.build());
PcepLabelUpdateMsg labelMsg = pc.factory().buildPcepLabelUpdateMsg()
.setPcLabelUpdateList(labelUpdateList)
.build();
pc.sendMessage(labelMsg);
if (isBos) {
// Sync is completed.
pc.setLabelDbSyncStatus(SYNCED);
}
}
示例7: pushAdjacencyLabel
import org.onosproject.pcepio.types.PcepLabelMap; //導入依賴的package包/類
void pushAdjacencyLabel(PcepClient pc, LabelResourceId labelId, int srcPortNo,
int dstPortNo, PcepLabelOp type)
throws PcepParseException {
checkNotNull(pc);
checkNotNull(labelId);
checkNotNull(type);
LinkedList<PcepLabelUpdate> labelUpdateList = new LinkedList<>();
PcepFecObjectIPv4Adjacency fecAdjObject = pc.factory().buildFecIpv4Adjacency()
.seRemoteIPv4Address(dstPortNo)
.seLocalIPv4Address(srcPortNo)
.build();
boolean bSFlag = false;
if (pc.labelDbSyncStatus() == IN_SYNC) {
// Need to set sync flag in all messages till sync completes.
bSFlag = true;
}
PcepSrpObject srpObj = getSrpObject(pc, type, bSFlag);
//Adjacency label object
PcepLabelObject labelObject = pc.factory().buildLabelObject()
.setLabel((int) labelId.labelId())
.build();
PcepLabelMap labelMap = new PcepLabelMap();
labelMap.setFecObject(fecAdjObject);
labelMap.setLabelObject(labelObject);
labelMap.setSrpObject(srpObj);
labelUpdateList.add(pc.factory().buildPcepLabelUpdateObject()
.setLabelMap(labelMap)
.build());
PcepLabelUpdateMsg labelMsg = pc.factory().buildPcepLabelUpdateMsg()
.setPcLabelUpdateList(labelUpdateList)
.build();
pc.sendMessage(labelMsg);
}
示例8: setLabelMap
import org.onosproject.pcepio.types.PcepLabelMap; //導入依賴的package包/類
/**
* Sets the Label map object.
*
* @param labelMap PCEP Label Map object
*/
void setLabelMap(PcepLabelMap labelMap);
示例9: getLabelMap
import org.onosproject.pcepio.types.PcepLabelMap; //導入依賴的package包/類
/**
* Returns the PcepLabelMap object.
*
* @return labelMap PCEP Label Map
*/
PcepLabelMap getLabelMap();