本文整理汇总了Java中org.onosproject.net.link.LinkService.getIngressLinks方法的典型用法代码示例。如果您正苦于以下问题:Java LinkService.getIngressLinks方法的具体用法?Java LinkService.getIngressLinks怎么用?Java LinkService.getIngressLinks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.onosproject.net.link.LinkService
的用法示例。
在下文中一共展示了LinkService.getIngressLinks方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getConnectPointLinks
import org.onosproject.net.link.LinkService; //导入方法依赖的package包/类
private Iterable<Link> getConnectPointLinks(ConnectPoint point,
String direction,
LinkService service) {
Direction dir = direction != null ?
Direction.valueOf(direction.toUpperCase()) : Direction.ALL;
switch (dir) {
case INGRESS:
return service.getIngressLinks(point);
case EGRESS:
return service.getEgressLinks(point);
default:
return service.getLinks(point);
}
}
示例2: getConnectPointLinks
import org.onosproject.net.link.LinkService; //导入方法依赖的package包/类
private Iterable<Link> getConnectPointLinks(ConnectPoint point,
String direction,
LinkService service) {
Direction dir = direction != null ?
valueOf(direction.toUpperCase()) : Direction.ALL;
switch (dir) {
case INGRESS:
return service.getIngressLinks(point);
case EGRESS:
return service.getEgressLinks(point);
default:
return service.getLinks(point);
}
}
示例3: testGetIngressLinksByNullId
import org.onosproject.net.link.LinkService; //导入方法依赖的package包/类
/**
* Tests querying for ingress links using a null connect point.
*/
@Test(expected = NullPointerException.class)
public void testGetIngressLinksByNullId() {
manager.registerTenantId(TenantId.tenantId(tenantIdValue1));
VirtualNetwork virtualNetwork = manager.createVirtualNetwork(TenantId.tenantId(tenantIdValue1));
LinkService linkService = manager.get(virtualNetwork.id(), LinkService.class);
// test the getIngressLinks() method with a null connect point.
linkService.getIngressLinks(null);
}