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

📄 stockhandlerrmiserverimpl.java.svn-base

📁 rmi server web service for a stock track systerm
💻 SVN-BASE
字号:
package ase.assignment.sts.rmi.server;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import ase.assignment.sts.api.StockHandler;
import ase.assignment.sts.beans.StockAssertEntity;
import ase.assignment.sts.beans.StockQuoteEntity;
import ase.assignment.sts.db.impl.HandlerFactoryJDBCImpl;

public class StockHandlerRMIServerImpl extends UnicastRemoteObject implements
		StockHandler {

	protected StockHandlerRMIServerImpl() throws RemoteException {
		super();
		// TODO Auto-generated constructor stub
	}

	private static final long serialVersionUID = 3930456185990547554L;

	private StockHandler getHandler() throws RemoteException {
		return new HandlerFactoryJDBCImpl().getStockHandler();
	}

	public void create(StockAssertEntity stock) throws RemoteException {
		getHandler().create(stock);
	}

	public void delete(int stockId) throws RemoteException {
		getHandler().delete(stockId);
	}

	public StockAssertEntity findById(int stockId) throws RemoteException {
		return getHandler().findById(stockId);
	}

	public StockAssertEntity[] getAllStocks(int porId) throws RemoteException {
		return getHandler().getAllStocks(porId);
	}

	public StockQuoteEntity getCurrentPrice(int stockId) throws RemoteException {
		return getHandler().getCurrentPrice(stockId);
	}

	public void update(StockAssertEntity stock) throws RemoteException {
		getHandler().update(stock);
	}

}

⌨️ 快捷键说明

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