本文整理汇总了Java中com.amazonaws.services.ec2.model.Route.getDestinationCidrBlock方法的典型用法代码示例。如果您正苦于以下问题:Java Route.getDestinationCidrBlock方法的具体用法?Java Route.getDestinationCidrBlock怎么用?Java Route.getDestinationCidrBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.amazonaws.services.ec2.model.Route
的用法示例。
在下文中一共展示了Route.getDestinationCidrBlock方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RouteDTO
import com.amazonaws.services.ec2.model.Route; //导入方法依赖的package包/类
public RouteDTO(final Route route) {
this.origin = route.getOrigin();
this.destinationCidrBlock = route.getDestinationCidrBlock();
this.instanceId = route.getInstanceId();
this.gatewayId = route.getGatewayId();
this.vpcPeeringConnectionId = route.getVpcPeeringConnectionId();
this.state = route.getState();
this.networkInterfaceId = route.getNetworkInterfaceId();
}
示例2: addRoute
import com.amazonaws.services.ec2.model.Route; //导入方法依赖的package包/类
public void addRoute(String routeTableId, String subnetId, Route route) throws CfnAssistException {
String string = route.getDestinationCidrBlock();
Cidr subnet = parseCidr(string);
String state = route.getState();
if (ROUTE_ACTIVE.equals(state)) {
addActiveRoute(routeTableId, subnetId, route, subnet);
} else if (ROUTE_BLACKHOLE.equals(state)){
logger.warn("Route state is not active, cidr block is " + route.getDestinationCidrBlock());
networkDiagram.addConnectionFromSubDiagram(ROUTE_BLACKHOLE, subnetId, subnetDiagramBuilders.get(subnetId), string);
} else {
throw new CfnAssistException(String.format("Unexpected state for route with cidr %s, state was %s", string, state));
}
}