当前位置: 首页>>代码示例>>Java>>正文


Java PCEPResponse类代码示例

本文整理汇总了Java中es.tid.pce.pcep.messages.PCEPResponse的典型用法代码示例。如果您正苦于以下问题:Java PCEPResponse类的具体用法?Java PCEPResponse怎么用?Java PCEPResponse使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PCEPResponse类属于es.tid.pce.pcep.messages包,在下文中一共展示了PCEPResponse类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: responseTOinitiate

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
protected PCEPInitiate responseTOinitiate(PCEPResponse pcepresponse)
{
	PCEPInitiate pcepInit = new PCEPInitiate();

	//For the time being, no need to put anything here
	SRP rsp = new SRP();

	//For the time being, no need to put anything here
	LSP lsp = new LSP();

	ExplicitRouteObject ero;
	ero = (pcepresponse.getResponse(0).getPath(0).geteRO());
	
	PCEPIntiatedLSP pcepIntiatedLSPList = new PCEPIntiatedLSP();
	log.info("jm ero initiate: "+ ero.toString());
	pcepIntiatedLSPList.setEro(ero);
	pcepIntiatedLSPList.setRsp(rsp);
	pcepIntiatedLSPList.setLsp(lsp);
	
	//FIXME
	pcepIntiatedLSPList.setBandwidth((BandwidthRequested)pcepresponse.getResponse(0).getBandwidth()); //Asumo que este bw funciona. Revisar si falla.

	pcepInit.getPcepIntiatedLSPList().add(pcepIntiatedLSPList);

	return pcepInit;
}
 
开发者ID:telefonicaid,项目名称:netphony-abno,代码行数:27,代码来源:Workflow.java

示例2: responseTOupdate

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
protected PCEPInitiate responseTOupdate(PCEPResponse pcepresponse)
{
	PCEPInitiate pcepInit = new PCEPInitiate();

	//For the time being, no need to put anything here
	SRP rsp = new SRP();

	//For the time being, no need to put anything here
	LSP lsp = new LSP();

	ExplicitRouteObject ero;
	ero = (pcepresponse.getResponse(0).getPath(0).geteRO());
	
	PCEPIntiatedLSP pcepIntiatedLSPList = new PCEPIntiatedLSP();
	log.info("jm ero initiate: "+ ero.toString());
	pcepIntiatedLSPList.setEro(ero);
	pcepIntiatedLSPList.setRsp(rsp);
	pcepIntiatedLSPList.setLsp(lsp);
	
	//FIXME
	pcepIntiatedLSPList.setBandwidth((BandwidthRequested)pcepresponse.getResponse(0).getBandwidth()); //Asumo que este bw funciona. Revisar si falla.

	pcepInit.getPcepIntiatedLSPList().add(pcepIntiatedLSPList);

	return pcepInit;
}
 
开发者ID:telefonicaid,项目名称:netphony-abno,代码行数:27,代码来源:WorkflowCOP.java

示例3: newRequest

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
public PCEPResponse newRequest(PCEPMonReq pcreq){
	log.debug("New Request");
	Object object_lock=new Object();
	//RequestLock rl=new RequestLock();
	//((RequestParameters)(((Request)pcreq.getRequest(0)).getReqObject(0))).getRequestID();
	//long idRequest=((RequestParameters)(((Request)pcreq.getRequest(0)).getReqObject(0))).getRequestID();
	long idMonitoring=pcreq.getMonitoring().getMonitoringIdNumber();

	locks.put(new Long(idMonitoring), object_lock);
	sendRequest(pcreq);
	synchronized (object_lock) { 
		try {
			log.debug("Request sent, waiting for response");
			object_lock.wait(60000);
		} catch (InterruptedException e){
		//	FIXME: Ver que hacer
		}
	}
	log.debug("Request or timeout");
	
	PCEPResponse resp=responses.get(new Long(idMonitoring));
	if (resp==null){
		log.warn("NO RESPONSE!!!!!");
	}
	return resp;
}
 
开发者ID:telefonicaid,项目名称:netphony-pce,代码行数:27,代码来源:ClientRequestManager.java

示例4: newRequest

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
/**
 * Send new request to the PCE and wait for its response.
 * It blocks until a response is received.
 * @param pcreq PCEP Request
 * @return The PCEP Response
 */
public PCEPResponse newRequest( PCEPRequest pcreq){
	log.info("New Request");
	Object object_lock=new Object();
	long idRequest=pcreq.getRequest(0).getRequestParameters().getRequestID();
	log.info("Id request es "+idRequest);
	locks.put(new Long(idRequest), object_lock);
	sendingQueue.add(pcreq);
	synchronized (object_lock) { 
		try {
			log.debug("Request sent, waiting for response");
			object_lock.wait(30000);
		} catch (InterruptedException e){
			//	FIXME: Ver que hacer
		}
	}
	log.debug("Request or timeout");
	
	PCEPResponse resp=responses.get(new Long(idRequest));
	if (resp==null){
		log.warn("NO RESPONSE!!!!!");
	}
	return resp;		
}
 
开发者ID:telefonicaid,项目名称:netphony-pce,代码行数:30,代码来源:ParentPCERequestManager.java

示例5: run

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
@Override
public void run() {
	log.info("Starting Automatic Client Interface");
	PCEPResponse pr;
	if (PCMonReqBool){
		pr=crm.newRequest((PCEPMonReq)this.request);
	}else {	
		pr=crm.newRequest((PCEPRequest)this.request);
		requestID++;
	}
}
 
开发者ID:telefonicaid,项目名称:netphony-gmpls-emulator,代码行数:12,代码来源:AutomaticTesterNetworkTask.java

示例6: calculatePath

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
public PCEPResponse calculatePath(String ipSourceString, String ipDestString) {
	this.log.info("**  PCE  **");
	this.log.info("Calculating cost between " + ipSourceString + " and " + ipDestString);
	try
	{
		Inet4Address ipSource = (Inet4Address)Inet4Address.getByName(ipSourceString);
		Inet4Address ipDest = (Inet4Address)Inet4Address.getByName(ipDestString);
		PCEPRequest p_r = new PCEPRequest();
		Request req = new Request();
		p_r.addRequest(req);
		RequestParameters rp = new RequestParameters();
		rp.setPbit(true);
		req.setRequestParameters(rp);
		rp.setRequestID(PCCPCEPSession.getNewReqIDCounter());
		EndPointsIPv4 ep = new EndPointsIPv4();
		req.setEndPoints(ep);
		ep.setSourceIP(ipSource);
		ep.setDestIP(ipDest);
		ObjectiveFunction of = new ObjectiveFunction();
		of.setOFcode(this.ofCode);
		req.setObjectiveFunction(of);

		/*float bw = 100.0F;
     		Bandwidth bandwidth = new Bandwidth();
     		bandwidth.setBw(bw);
     		req.setBandwidth(bandwidth);
		 */
		PCEPResponse pr = this.crm.newRequest(p_r);

		this.log.info("Response from PCE " + pr.toString());
		return pr;
	}
	catch (Exception e) {
		this.log.info("Exception");
		this.log.info(UtilsFunctions.exceptionToString(e));
	}return null;
}
 
开发者ID:telefonicaid,项目名称:netphony-abno,代码行数:38,代码来源:Path_Computation.java

示例7: notifyResponse

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
public void notifyResponse(PCEPResponse pcres){
	long idRequest=pcres.getResponse(0).getRequestParameters().getRequestID();
	log.debug("Entrando en Notify Response de idRequest "+idRequest);
	Object object_lock=locks.get(new Long(idRequest));
	responses.put(new Long(idRequest), pcres);
	if (object_lock!=null){
		object_lock.notifyAll();	
	}
	locks.remove(object_lock);
}
 
开发者ID:telefonicaid,项目名称:netphony-pce,代码行数:11,代码来源:ChildPCERequestManager.java

示例8: sendReqMessage

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
public PCEPResponse sendReqMessage(PCEPRequest p_r, LinkedList<PCEPMessage> messageList){
	ClientRequestManager crm;
	crm=PCEsession.crm;
	PCEPResponse pr=crm.newRequest(p_r);
	messageList.add(pr);
	return pr;
}
 
开发者ID:telefonicaid,项目名称:netphony-pce,代码行数:8,代码来源:QuickClientObj.java

示例9: ClientRequestManager

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
public ClientRequestManager(){
	log=LoggerFactory.getLogger("PCCClient");
	//this.out=out;
	locks = new Hashtable<Long, Object>();
	responses=new Hashtable<Long, PCEPResponse>();
	responsesInit=new Hashtable<Long, PCEPReport>();

	semaphores=new Hashtable<Long,Semaphore>();
}
 
开发者ID:telefonicaid,项目名称:netphony-pce,代码行数:10,代码来源:ClientRequestManager.java

示例10: notifyResponse

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
public void notifyResponse(PCEPResponse pcres, long timeIni){
	lastTime=timeIni;
	long idRequest=pcres.getResponse(0).getRequestParameters().getRequestID();
	log.debug("Entrando en Notify Response");
	Object object_lock=locks.remove(new Long(idRequest));
	if (object_lock!=null){
		responses.put(new Long(idRequest), pcres);
		object_lock.notifyAll();	
	}
}
 
开发者ID:telefonicaid,项目名称:netphony-pce,代码行数:11,代码来源:ClientRequestManager.java

示例11: ParentPCERequestManager

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
/**
 * @param sendingQueue Queue to send the request to the Parent PCE
 */
public ParentPCERequestManager(LinkedBlockingQueue<PCEPMessage> sendingQueue){
	locks = new Hashtable<Long, Object>();	
	responses=new Hashtable<Long, PCEPResponse>();
	log=LoggerFactory.getLogger("PCEServer");
	this.sendingQueue=sendingQueue;
}
 
开发者ID:telefonicaid,项目名称:netphony-pce,代码行数:10,代码来源:ParentPCERequestManager.java

示例12: notifyResponse

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
/**
 * Notify that a new Response from the parent PCE has arrived. 
 * It is called by the Child PCE-Parent PCE session when a response from the parent PCE arrives
 * @param pcres PCEP Response
 */
public void notifyResponse(PCEPResponse pcres){
	long idRequest=pcres.getResponse(0).getRequestParameters().getRequestID();
	log.debug("Notifying Response with idRequest "+idRequest);
	Object object_lock=locks.get(new Long(idRequest));
	responses.put(new Long(idRequest), pcres);
	if (object_lock!=null){
		object_lock.notifyAll();	
	}			
}
 
开发者ID:telefonicaid,项目名称:netphony-pce,代码行数:15,代码来源:ParentPCERequestManager.java

示例13: handleResponse

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
static void handleResponse(PCEPRequest request,PCEPResponse response,EmulatedPCCPCEPSession VNTMSession ){
		if (response.getResponseList().isEmpty()){
			log.error("ERROR in response");
			//stats.addNoPathResponse();
			System.exit(1);
			return;
		}else {
			if (response.getResponseList().get(0).getNoPath()!=null){
				log.info("NO PATH");
//				stats.addNoPathResponse();
//				stats.analyzeBlockingProbability(1);
				return;	
			}else {
				Path path=response.getResponseList().get(0).getPath(0);
//				stats.analyzeBlockingProbability(0);

				ExplicitRouteObject ero=path.geteRO();
				LinkedList<EROSubobject> eroSubObjList=ero.getEROSubobjectList();
				//CREAR LISTA DE EROS
				LinkedList<ExplicitRouteObject> eroList=new LinkedList<ExplicitRouteObject>();			
				
				int numNewLinks = createEROList(eroSubObjList,eroList);
				//Si hay camino multilayer
				if (numNewLinks>0){					
//					stats.addMLResponse();
					for (int i=0;i<numNewLinks;++i){
						
						//Mandar solicitud a Fer
						log.info("Reserving LSP and sending capacity update");
						PCEPTELinkSuggestion telinksug=new PCEPTELinkSuggestion();
						Path path2=new Path();
						path2.setEro(eroList.get(i));
						telinksug.setPath(path2);	
						try {
							telinksug.encode();
						} catch (PCEPProtocolViolationException e1) {
							// TODO Auto-generated catch block
							e1.printStackTrace();
						}
						
							log.info("Sending TE LINK SUGGESTION message i:"+i);
							
//						stats.addNumberActiveLSP();
						//Mandar el LSP por PCCPCEPSession al VNTM
						sendLSP(VNTMSession.getOut(),telinksug);
						Timer planificationTimer= new Timer();
						RealiseMLCapacityTask realiseCapacity = new RealiseMLCapacityTask(null,VNTMSession.getOut(),telinksug );	
						long duration =Math.round(testerParams.getMeanConectionTime());
						log.info("LSP duration: "+duration);
						planificationTimer.schedule(realiseCapacity,duration);

					}
				}
			}

	}
	
		
				
		
	}
 
开发者ID:telefonicaid,项目名称:netphony-gmpls-emulator,代码行数:62,代码来源:singleClient.java

示例14: addResponse

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
@Override
public void addResponse(PCEPResponse response) {
	// TODO Auto-generated method stub
	
}
 
开发者ID:telefonicaid,项目名称:netphony-gmpls-emulator,代码行数:6,代码来源:DummyActivity.java

示例15: addResponse

import es.tid.pce.pcep.messages.PCEPResponse; //导入依赖的package包/类
public void addResponse(PCEPResponse response){	
	log.info("Añadimos la response para actualizar estadisticas");
	this.response=response;
}
 
开发者ID:telefonicaid,项目名称:netphony-gmpls-emulator,代码行数:5,代码来源:NetworkEmulatorActivity.java


注:本文中的es.tid.pce.pcep.messages.PCEPResponse类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。