Examples of OtpErlangPid


Examples of com.ericsson.otp.erlang.OtpErlangPid

    @Override
  public OtpErlangObject instantiate() {
        //throw new RuntimeException("I don't know how to instantiate a pid() signature...");

       return new OtpErlangPid("PID", 0, 0, 0);
    }
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangPid

    return term instanceof OtpErlangPid;
  }

  @Override
  public List<OtpErlangObject> instantiateAllAlts() {
    return Collections.singletonList((OtpErlangObject)new OtpErlangPid("PID", 0, 0, 0));
  }
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangPid

        if (!(message.elementAt(1) instanceof OtpErlangRef))
          System.out.println("invalid request received, expected a ref, got "+message.elementAt(1));
        OtpErlangRef ref = (OtpErlangRef) message.elementAt(1);
        if (!(message.elementAt(0) instanceof OtpErlangPid))
          System.out.println("invalid request received, expected a pid, got "+message.elementAt(0));
        OtpErlangPid pid = (OtpErlangPid) message.elementAt(0);
       
        if (command.equals(msgEcho))
        {// used to establish a link between a supervisor on the Erlang side and that of the Java side
          thisMbox.link(pid);
          reply(pid,ref,msgOk,thisMbox.self());
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangPid

        if (!(message.elementAt(1) instanceof OtpErlangRef))
          System.out.println("invalid request received, expected a ref, got "+message.elementAt(1));
        OtpErlangRef ref = (OtpErlangRef) message.elementAt(1);
        if (!(message.elementAt(0) instanceof OtpErlangPid))
          System.out.println("invalid request received, expected a pid, got "+message.elementAt(0));
        OtpErlangPid pid = (OtpErlangPid) message.elementAt(0);
       
        if (command.equals(msgEcho))
        {// used to establish a link between a supervisor on the Erlang side and that of the Java side
          thisMbox.link(pid);
          reply(pid,ref,msgOk,thisMbox.self());
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangPid

        + "synapselauncher:find_statechum()!{self(),Ref,getNodeName},"
        + "receive {Ref,ok,Value} -> "
        + "{Pid,Value} end");
    Assert.assertEquals(2,pid_node.arity());
    String synapseNode = ErlangLabel.dumpErlangObject(pid_node.elementAt(1));
    OtpErlangPid pid = (OtpErlangPid)pid_node.elementAt(0);// PID of the parent process
   
    // Check that Synapse is running.
    Assert.assertTrue(pingNode(synapseNode));
   
    // Terminate the parent process
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangPid

        if (!(message.elementAt(1) instanceof OtpErlangRef))
          System.out.println("invalid request received, expected a ref, got "+message.elementAt(1));
        OtpErlangRef ref = (OtpErlangRef) message.elementAt(1);
        if (!(message.elementAt(0) instanceof OtpErlangPid))
          System.out.println("invalid request received, expected a pid, got "+message.elementAt(0));
        OtpErlangPid pid = (OtpErlangPid) message.elementAt(0);
       
        if (command.equals(msgEcho))
        {// used to establish a link between a supervisor on the Erlang side and that of the Java side
          thisMbox.link(pid);
          reply(pid,ref,msgOk,thisMbox.self());
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangPid

  public void run() {
    try {
      msg = mbox.receiveMsg();
      Thread.sleep(duration);
      OtpErlangPid senderPid = null;
      if (response != null) {
        if (msg.getMsg().getClass().equals(OtpErlangTuple.class)
            && ((OtpErlangTuple) msg.getMsg()).elementAt(0)
                .getClass().equals(OtpErlangPid.class)) {
          senderPid = (OtpErlangPid) ((OtpErlangTuple) msg.getMsg())
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangPid

    connection.send(pid, msg);
  }

  private void handleRpc(OtpMsg msg) {
    OtpErlangTuple request = null;
    OtpErlangPid senderPid = null;
    OtpErlangRef senderRef = null;
    try {
      OtpErlangTuple call = (OtpErlangTuple) msg.getMsg();
      OtpErlangTuple from = (OtpErlangTuple) call.elementAt(1);
      request = (OtpErlangTuple) call.elementAt(2);
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangPid

  }

  private void handleMsg(OtpMsg msg) {
    Operation matchedOperation = null;
    Object args[] = null;
    OtpErlangPid senderPid = null;
    OtpErlangObject msgNoSender = null;
    List<Operation> operations = groupedOperations.get(msg
        .getRecipientName());
    try {
      if (msg.getMsg().getClass().equals(OtpErlangTuple.class)
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangPid

                        buffer.get();
                        int request_timeout = buffer.getInt();
                        byte priority = buffer.get();
                        byte[] trans_id = API.getBytes(buffer, 16);
                        int pid_size = buffer.getInt();
                        OtpErlangPid pid = API.getPid(buffer, pid_size);
                        if (buffer.hasRemaining())
                        {
                            assert external;
                            if (! handle_events(external, buffer))
                                return Boolean.FALSE;
View Full Code Here
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.