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

📄 rmiinterfaceimpl.java

📁 rmi C/S 客 户 端 与 服 务 端 连 接
💻 JAVA
字号:
package com.topking.rt.rmi.server.util;

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

import com.topking.rt.data.Command;
import com.topking.rt.data.ImageData;
import com.topking.rt.data.NewByteData;
import com.topking.rt.rmi.interfaces.RMIInterface;
import com.topking.rt.util.ByteDataUtil;

public class RMIInterfaceImpl extends UnicastRemoteObject implements RMIInterface {

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

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private byte[] oldImage = ScreenShot.getScreenShotData();
	@Override
	public ImageData getinitImageData() throws RemoteException {
		// TODO Auto-generated method stub
		ImageData data = new ImageData();
		data.setData(ScreenShot.getScreenShotData());
		return data;
	}

	@Override
	public void executeControllCommand(Command com)
			throws RemoteException {
		// TODO Auto-generated method stub
		CommandExecuter.execute(com);
	}

	@Override
	public List<NewByteData> getChangedImageData() throws RemoteException {
		// TODO Auto-generated method stub
		byte[] newImage = ScreenShot.getScreenShotData();
		List changeData = ByteDataUtil.getChangedByte(oldImage,newImage);
		oldImage = newImage;
		return changeData;
	}

}

⌨️ 快捷键说明

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