@Override
	public List<Block> getBlocks(String blockName, String outerBlockNames)
			throws RemoteException {
		String BlockName = null;
		String BlockText = null;
		
		if( outerBlockNames == null){
			return null;
		}
		
	    if((null == blockName.toString()) || ("" == blockName.toString())){
	    	return null;
	    }
	    
	    GetRemoteConf(remoteConf);
	    
		if("".equals(outerBlockNames.trim())){
			// when outerBlockNames is "" ,search all nginx.conf file.
			if((null==confText) ||(""==confText) ){
				confText = ReadConf();				
			}
		    BlockName = "nginx.conf";
			BlockText = confText;
		}
		else{
		    //If there is no index in outerBlockNames, default the first block.
		    if(!outerBlockNames.contains(":")){
		    	outerBlockNames += ":0";
		    }
		    HashMap<String,String> objHashMap=EditCommon(outerBlockNames);
		    BlockName = objHashMap.get("lastblockname");
		    BlockText = objHashMap.get("blocktext");
		}
		
		RecBlock objRecBlock = new RecBlock();
		objRecBlock.setName(BlockName);
		objRecBlock.SetBlockText(BlockText);
//		System.out.println("BlockText:"+BlockText);
		return objRecBlock.getBlocks(blockName);
	}