Package org.erlide.backend.console

Source Code of org.erlide.backend.console.ErlideReshd

package org.erlide.backend.console;

import org.erlide.backend.BackendUtils;
import org.erlide.runtime.api.IOtpNodeProxy;
import org.erlide.runtime.rpc.RpcException;

import com.ericsson.otp.erlang.OtpErlangObject;
import com.ericsson.otp.erlang.OtpErlangPid;

public class ErlideReshd implements ShellService {

    @Override
    public OtpErlangPid start(final IOtpNodeProxy nodeProxy) {
        try {
            final OtpErlangObject r = nodeProxy.getOtpRpc().call("erlide_shell", "start",
                    "p", nodeProxy.getEventPid());
            final OtpErlangPid server = (OtpErlangPid) BackendUtils.ok(r);
            return server;
        } catch (final RpcException e) {
            return null;
        }
    }
}
TOP

Related Classes of org.erlide.backend.console.ErlideReshd

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.