⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simpleservice.java

📁 AJAX的一个好东西哦,国人的一个AJAX的实现不错的东西
💻 JAVA
字号:
/*
 * Created on 2005-2-27
 *
 */
package net.buffalo.demo.simple;

import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;

/**
 * @author michael
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class SimpleService {
	
	public double divide(double a, double b) {
		System.out.println("Calling Divide...,a="+a+", b="+b);
		try {
			Thread.sleep(1000);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return a/b;
	}

	public Date now() {
		return new Date();
	}
	
	public void fault() throws IOException {
		throw new IOException("Test Exception");
	}
	
	public User randomUser() {
		try {
			Thread.sleep(1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return UserUtil.randomUser();
	}
	
	public ComplexUser randomComplexUser() {
		return UserUtil.randomComplexUser();
	}
	
	public Locale[] allLocales() {
	    return Locale.getAvailableLocales();
	}
	
	public List provincesNames() {
	    return ProvinceUtil.provinceNames();
	}
	
	public String[]  provinceCities(String name) {
	    return ProvinceUtil.getProvince(name).getCityList();
	}
	
	public Map object(Map arg) {
	    System.out.println(arg);
	    return arg;
	}
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -