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

📄 elevationcalculator.java

📁 esri的ArcGIS Server超级学习模板程序(for java)
💻 JAVA
字号:
package com.esri.solutions.jitk.services.elevation;

import javax.xml.rpc.ServiceException;

import org.springframework.remoting.jaxrpc.ServletEndpointSupport;

import com.esri.solutions.jitk.services.common.ServicesException;

/**
 * Web Service endpoint for an Elevation Calculator.  This endpoint
 * will look for a bean named "elevationWebService" and delegate all
 * calls to that bean.  The bean must be an instance of {@link IElevationCalculator} and
 * must be configured appropriately within Spring.
 *
 */
public class ElevationCalculator extends ServletEndpointSupport implements
		IElevationCalculator {

	/**
	 * Reference to the {@link IElevationCalculator} delegate.
	 */
	private IElevationCalculator m_elevCalc;
	
	@Override
	protected void onInit() throws ServiceException {
		super.onInit();
		
		m_elevCalc = (IElevationCalculator) this.getWebApplicationContext().getBean("elevationWebService");
	}


	public Elevation calculateElevation(Point pt) throws ServicesException {

		if (m_elevCalc == null) {
			throw new IllegalStateException ();
		}
		
		if (pt == null) {
			throw new NullPointerException ();
		}
		
		return m_elevCalc.calculateElevation(pt);	
	}
}

⌨️ 快捷键说明

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