Browse Source

无JIRA任务 远程设计改善

master
richie 7 years ago
parent
commit
f0590812c1
  1. 2
      designer-base/src/com/fr/design/mainframe/DesignerFrame.java
  2. 20
      designer-base/src/com/fr/env/RemoteEnv.java

2
designer-base/src/com/fr/design/mainframe/DesignerFrame.java

@ -968,7 +968,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
Env currentEnv = FRContext.getCurrentEnv(); Env currentEnv = FRContext.getCurrentEnv();
try { try {
EventDispatcher.fire(BEFORE_SIGN_OUT); EventDispatcher.fire(BEFORE_SIGN_OUT);
currentEnv.signOut(); currentEnv.disconnect();
EventDispatcher.fire(AFTER_SIGN_OUT); EventDispatcher.fire(AFTER_SIGN_OUT);
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);

20
designer-base/src/com/fr/env/RemoteEnv.java vendored

@ -2,7 +2,10 @@ package com.fr.env;
import com.fr.base.EnvException; import com.fr.base.EnvException;
import com.fr.base.TableData; import com.fr.base.TableData;
import com.fr.base.operator.file.FileOperator;
import com.fr.base.remote.RemoteDeziConstants; import com.fr.base.remote.RemoteDeziConstants;
import com.fr.common.rpc.netty.MessageSendExecutor;
import com.fr.common.rpc.serialize.RpcSerializeProtocol;
import com.fr.core.env.EnvConstants; import com.fr.core.env.EnvConstants;
import com.fr.core.env.EnvContext; import com.fr.core.env.EnvContext;
import com.fr.core.env.resource.RemoteEnvConfig; import com.fr.core.env.resource.RemoteEnvConfig;
@ -87,6 +90,23 @@ public class RemoteEnv extends AbstractEnv implements DesignAuthorityConfigurabl
env = new RemoteEnvConfig(path, userName, password); env = new RemoteEnvConfig(path, userName, password);
} }
@Override
public void connect() {
// FIXME:richie ip地址属于测试的,带实际修改为RemoteEnv配置的地址
MessageSendExecutor.getInstance().setRpcServerLoader("127.0.0.1:" + 33999, RpcSerializeProtocol.KRYOSERIALIZE);
}
@Override
public boolean disconnect() {
MessageSendExecutor.getInstance().stop();
return true;
}
@Override
public FileOperator getFileOperator() throws Exception {
return MessageSendExecutor.getInstance().execute(FileOperator.class);
}
@Override @Override
public String getPath() { public String getPath() {
return env.getPath(); return env.getPath();

Loading…
Cancel
Save