Examples of OtpPeer


Examples of com.ericsson.otp.erlang.OtpPeer

  // {'$gen_call', {To, Tag}, {call, Mod, Fun, Args, User}}
 
  public ErlangBeamDisLoader() throws OtpAuthException, IOException {
    self = new OtpSelf(myid);
    peer = new OtpPeer("beam_loader@localhost");
    conn = self.connect(peer);
  }
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpPeer

   */
  @Test(timeout = 4000)
  public void testServiceTimeouts() throws Exception {
    OtpSelf self = new OtpSelf("tmp_connector_"
        + System.currentTimeMillis());
    OtpPeer peer = new OtpPeer("RPCServerTimeout");
    OtpConnection connection = self.connect(peer);
    // delay message sending after connecting
    Thread.sleep(1000);
    // service binding timeout set to 500 so after that time it will give up
    // and close connection
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpPeer

    return msg;
  }

  private Message invokeOperation(Message msg) {
    OtpSelf self = null;
    OtpPeer other = null;
    OtpConnection connection = null;
    try {
      self = new OtpSelf(getClientNodeName());
      if (binding.hasCookie()) {
        self.setCookie(binding.getCookie());
      }
      other = new OtpPeer(binding.getNode());
      connection = self.connect(other);
      Method jmethod = ((JavaOperation) msg.getOperation())
          .getJavaMethod();
      OtpErlangList params = TypeHelpersProxy.toErlangAsList(msg
          .getBody(), jmethod.getParameterAnnotations());
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpPeer

   */
  @Test(timeout = 4000)
  public void testServiceTimeouts() throws Exception {
    OtpSelf self = new OtpSelf("tmp_connector_"
        + System.currentTimeMillis());
    OtpPeer peer = new OtpPeer("RPCServerTimeout");
    OtpConnection connection = self.connect(peer);
    // delay message sending after connecting
    Thread.sleep(1000);
    // service binding timeout set to 500 so after that time it will give up
    // and close connection
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpPeer

    /**
     * Test method for {@link PeerNode#PeerNode(OtpPeer)}.
     */
    @Test
    public final void testPeerNodeOtpPeer() {
        final PeerNode p = new PeerNode(new OtpPeer("test@localhost"));
        assertEquals("test@localhost", p.getNode().node());
    }
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpPeer

     * @param node
     *            the name of the node to wrap
     */
    public PeerNode(final String node) {
        super();
        this.node = new OtpPeer(node);
    }
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpPeer

        this.otpSelf = new OtpSelf(selfNodeNameToUse.trim());
      }
    } catch (IOException e) {
      throw new OtpIOException(e);
    }
    this.otpPeer = new OtpPeer(this.peerNodeName.trim());

  }
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpPeer

        this.otpSelf = new OtpSelf(selfNodeNameToUse.trim(), this.cookie);
      }
    } catch (IOException e) {
      throw new OtpIOException(e);
    }
    this.otpPeer = new OtpPeer(this.peerNodeName.trim());
  }
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpPeer

  public void testRawApi() throws Exception {

    OtpSelf self = new OtpSelf("rabbit-monitor");

    String hostName = NODE_NAME;
    OtpPeer peer = new OtpPeer(hostName);
    connection = self.connect(peer);

    OtpErlangObject[] objectArray = { new OtpErlangBinary("/".getBytes()) };

    connection.sendRPC("rabbit_amqqueue", "info_all", new OtpErlangList(objectArray));
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpPeer

    }
  }

  public OtpConnection createConnection() throws Exception {
    OtpSelf self = new OtpSelf("rabbit-monitor-" + counter++);
    OtpPeer peer = new OtpPeer(NODE_NAME);
    return self.connect(peer);
  }
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.