Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpMbox


   * @throws OtpErlangException
   *             If the response from the server is invalid
   */
  public static OtpErlangObject call(OtpNode host, OtpErlangPid server,
      OtpErlangObject call, long timeout) throws OtpErlangException {
    OtpMbox caller = host.createMbox();
    OtpErlangTuple from = new OtpErlangTuple(new OtpErlangObject[] {
        caller.self(), host.createRef() });
    OtpErlangObject msg = new OtpErlangTuple(new OtpErlangObject[] {
        new OtpErlangAtom("$gen_call"), from, call });
    caller.send(server, msg);
    OtpErlangObject res = timeout == 0 ? caller.receive() : caller
        .receive(timeout);
    if (res == null) {
      return null;
    } else if (res instanceof OtpErlangTuple
        && ((OtpErlangTuple) res).arity() == 2) {
View Full Code Here


   *             If the response from the server is invalid
   */
  public static OtpErlangObject call(OtpNode host, String server,
      String node, OtpErlangObject call, long timeout)
      throws OtpErlangException {
    OtpMbox caller = host.createMbox();
    OtpErlangTuple from = new OtpErlangTuple(new OtpErlangObject[] {
        caller.self(), host.createRef() });
    OtpErlangObject msg = new OtpErlangTuple(new OtpErlangObject[] {
        new OtpErlangAtom("$gen_call"), from, call });
    caller.send(server, node, msg);
    OtpErlangObject res = timeout == 0 ? caller.receive() : caller
        .receive(timeout);
    if (res == null) {
      return null;
    } else if (res instanceof OtpErlangTuple
        && ((OtpErlangTuple) res).arity() == 2) {
View Full Code Here

   * @param cast
   *            message to send
   */
  public static void cast(OtpNode host, OtpErlangPid server,
      OtpErlangObject cast) {
    OtpMbox caller = host.createMbox();
    OtpErlangObject msg = new OtpErlangTuple(new OtpErlangObject[] {
        new OtpErlangAtom("$gen_cast"), cast });
    caller.send(server, msg);
  }
View Full Code Here

   * @param cast
   *            message to send
   */
  public static void cast(OtpNode host, String server, String node,
      OtpErlangObject cast) {
    OtpMbox caller = host.createMbox();
    OtpErlangObject msg = new OtpErlangTuple(new OtpErlangObject[] {
        new OtpErlangAtom("$gen_cast"), cast });
    caller.send(server, node, msg);
  }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpMbox

Copyright © 2018 www.massapicom. 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.