|
|
|
@ -2,9 +2,11 @@ package com.fr.design.mainframe.socketio;
|
|
|
|
|
|
|
|
|
|
import com.fr.config.RemoteEvent; |
|
|
|
|
import com.fr.decision.webservice.utils.DecisionServiceConstants; |
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.design.mainframe.loghandler.DesignerLogHandler; |
|
|
|
|
import com.fr.env.operator.socket.SocketInfoOperator; |
|
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
|
import com.fr.general.Inter; |
|
|
|
|
import com.fr.general.LogRecordTime; |
|
|
|
|
import com.fr.general.LogUtils; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
@ -17,6 +19,8 @@ import io.socket.client.IO;
|
|
|
|
|
import io.socket.client.Socket; |
|
|
|
|
import io.socket.emitter.Emitter; |
|
|
|
|
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
import java.io.ByteArrayInputStream; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.net.URI; |
|
|
|
@ -64,6 +68,13 @@ public class DesignerSocketIO {
|
|
|
|
|
EventDispatcher.fire(RemoteEvent.EDIT, param); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
socketIO.get().on(Socket.EVENT_DISCONNECT, new Emitter.Listener() { |
|
|
|
|
@Override |
|
|
|
|
public void call(Object... objects) { |
|
|
|
|
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Disconnected"}), |
|
|
|
|
null, 0, UIManager.getIcon("OptionPane.errorIcon")); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
socketIO.get().connect(); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
|