Logo Search packages:      
Sourcecode: rserve version File versions  Download package

RSession org::rosuda::JRclient::Rconnection::voidEvalDetach ( String  cmd  )  throws RSrvException [inline]

evaluates the given command, detaches the session (see detach()}) and closes connection while the command is being evaluted (requires Rserve 0.4+). Note that a session cannot be attached again until the commad was successfully processed. Techincally the session is put into listening mode while the command is being evaluated but accept is called only after the command was evaluated. One commonly used techique to monitor detached working sessions is to use second connection to poll the status (e.g. create a temporary file and return the full path before detaching thus allowing new connections to read it).

Parameters:
cmd command/expression string
Returns:
session object that can be use to attach back to the session once the command completed

Definition at line 182 of file Rconnection.java.

References close(), org::rosuda::JRclient::Rpacket::isOk(), and org::rosuda::JRclient::Rtalk::request().

                                                                    {
            if (!connected || rt==null)
                  throw new RSrvException(this,"Not connected");
            Rpacket rp=rt.request(Rtalk.CMD_detachedVoidEval,cmd+"\n");
            if (rp==null || !rp.isOk())
                  throw new RSrvException(this,"detached void eval failed",rp);
            RSession s = new RSession(this, rp);
            close();
            return s;
    }


Generated by  Doxygen 1.6.0   Back to index