java vips_Java IConfigManager.getAllVIPs方法代碼示例
import org.opendaylight.controller.samples.loadbalancer.IConfigManager; //導入方法依賴的package包/類
@Path("/{containerName}/delete/vip/{vipName}")
@DELETE
@Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@StatusCodes( {
@ResponseCode(code = 200, condition = "VIP deleted successfully"),
@ResponseCode(code = 404, condition = "The containerName not found"),
@ResponseCode(code = 503, condition = "Load balancer service is unavailable"),
@ResponseCode(code = 404, condition = "VIP not found"),
@ResponseCode(code = 500, condition = "Failed to delete VIP")})
public Response deleteVIP(
@PathParam(value = "containerName") String containerName,
@PathParam(value = "vipName") String vipName) {
if(vipName.isEmpty())
throw new UnsupportedMediaTypeException(RestMessages.INVALIDDATA.toString());
IConfigManager configManager = getConfigManagerService(containerName);
if (configManager == null) {
throw new ServiceUnavailableException("Load Balancer"
+ RestMessages.SERVICEUNAVAILABLE.toString());
}
if(!configManager.vipExists(vipName))
throw new ResourceNotFoundException(NBConst.RES_VIP_NOT_FOUND);
for(VIP vip : configManager.getAllVIPs()){
if(vip.getName().equals(vipName)){
configManager.deleteVIP(vipName);
return Response.ok().build();
}
}
throw new InternalServerErrorException(NBConst.RES_VIP_DELETION_FAILED);
}
java vips_Java IConfigManager.getAllVIPs方法代碼示例相关推荐
- java servicefactory_Java DirectoryServiceFactory.getDirectoryService方法代碼示例
本文整理匯總了Java中org.apache.directory.server.core.factory.DirectoryServiceFactory.getDirectoryService方法的典 ...
- java getstringarray_Java AnnotationAttributes.getStringArray方法代碼示例
本文整理匯總了Java中org.springframework.core.annotation.AnnotationAttributes.getStringArray方法的典型用法代碼示例.如果您正苦 ...
- java getselecteditem_Java JComboBox.getSelectedItem方法代碼示例
本文整理匯總了Java中javax.swing.JComboBox.getSelectedItem方法的典型用法代碼示例.如果您正苦於以下問題:Java JComboBox.getSelectedIt ...
- java setlocation_Java Point.setLocation方法代碼示例
本文整理匯總了Java中java.awt.Point.setLocation方法的典型用法代碼示例.如果您正苦於以下問題:Java Point.setLocation方法的具體用法?Java Poin ...
- java setpriority_Java TaskEntity.setPriority方法代碼示例
本文整理匯總了Java中org.activiti.engine.impl.persistence.entity.TaskEntity.setPriority方法的典型用法代碼示例.如果您正苦於以下問題 ...
- java importgeopoint_Java GeoPoint.project方法代碼示例
本文整理匯總了Java中com.nextgis.maplib.datasource.GeoPoint.project方法的典型用法代碼示例.如果您正苦於以下問題:Java GeoPoint.proje ...
- java hssffont_Java HSSFFont.setColor方法代碼示例
本文整理匯總了Java中org.apache.poi.hssf.usermodel.HSSFFont.setColor方法的典型用法代碼示例.如果您正苦於以下問題:Java HSSFFont.setC ...
- java disconnect_Java BlockingConnection.disconnect方法代碼示例
本文整理匯總了Java中org.fusesource.mqtt.client.BlockingConnection.disconnect方法的典型用法代碼示例.如果您正苦於以下問題:Java Bloc ...
- java dofinal_Java Mac.doFinal方法代碼示例
本文整理匯總了Java中javax.crypto.Mac.doFinal方法的典型用法代碼示例.如果您正苦於以下問題:Java Mac.doFinal方法的具體用法?Java Mac.doFinal怎 ...
最新文章
- 一个基于POI的通用excel导入导出工具类的简单实现及使用方法
- ios 刷新头像_iOS上传图片到网上,并更新到服务器,常用在设置头像
- 【学习笔记】Linux 命令万字解析(超详细)
- c语言 为参数设置默认值,js函数参数设置默认值
- valgrind 详解
- 浅释一下,为什么要使用接口?
- app inventor HTML5,[App Inventor] Web客戶端元件 POST 傳值的使用方式
- VINS System::ProcessBackEnd()
- html加载js那些事
- RNN 卷积神经网络- 吴恩达Andrew Ng 论文等资料汇总
- MySQL(12)-----多表查询(内连接和外连接)
- matlab covar,delta CoVaR 系统性风险指标计算
- 搭建petalinux开发环境
- 网易云易盾发布多国家多语种内容安全服务,助力中国互联网出海
- 开关量采集模块支持PWM占空比输出无线数据采集模块Modbus TCP协议
- 各代DDR内存的速度表
- 详解Runtime运行时机制
- WebIDE 使用指南
- 手机装linux无root权限,linux无root权限安装screen(示例代码)
- Jquery实现大于等于且小于等于-遁地龙卷风