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