📄 elevationcalculator.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 + -