customerhandlerrmiserverimpl.java

来自「rmi server web service for a stock track」· Java 代码 · 共 45 行

JAVA
45
字号
package ase.assignment.sts.rmi.server;

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

import ase.assignment.sts.api.CustomerHandler;
import ase.assignment.sts.beans.CustomerEntity;
import ase.assignment.sts.db.impl.HandlerFactoryJDBCImpl;
import ase.assignment.sts.utils.STSConstants;

public class CustomerHandlerRMIServerImpl extends UnicastRemoteObject implements
		CustomerHandler {
	private static final long serialVersionUID = -5703994586651028467L;

	protected CustomerHandlerRMIServerImpl() throws RemoteException {
		super();
	}

	private CustomerHandler getHandler() throws RemoteException {
		return new HandlerFactoryJDBCImpl().getCustomerHandler();
	}

	public void close(String username) throws RemoteException {
		getHandler().close(username);
	}

	public void create(CustomerEntity customer) throws RemoteException {
		getHandler().create(customer);
	}

	public CustomerEntity find(String username) throws RemoteException {
		return getHandler().find(username);
	}

	public boolean login(String username, String password)
			throws RemoteException {
				System.out.println("........remote login ");
		return getHandler().login(username, password);
	}

	public void update(CustomerEntity customer) throws RemoteException {
		getHandler().update(customer);
	}

}

⌨️ 快捷键说明

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