Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpSelf


     */
    @Test
    public final void testDoRPCStringStringOtpErlangList_fail()
            throws ConnectionException, OtpErlangExit, OtpAuthException,
            IOException, OtpErlangRangeException, InterruptedException {
        final OtpSelf self = new OtpSelf("testDoRPCStringStringOtpErlangList",
                ConnectionFactory.getInstance().getCookie());
        final PeerNode remote = new PeerNode(ConnectionFactory.getInstance()
                .getNodes().get(0).getNode().node());
        final DefaultConnectionPolicy connectionPolicy = new DefaultConnectionPolicy(remote);
        connectionPolicy.setMaxRetries(0);
View Full Code Here


     */
    @Test
    public final void testDoRPCStringStringOtpErlangObjectArray()
            throws ConnectionException, OtpErlangExit, OtpAuthException,
            IOException, OtpErlangRangeException {
        final OtpSelf self = new OtpSelf("testDoRPCStringStringOtpErlangObjectArray",
                ConnectionFactory.getInstance().getCookie());
        final PeerNode remote = new PeerNode(ConnectionFactory.getInstance()
                .getNodes().get(0).getNode().node());
        final Connection c = new Connection(self, remote);

View Full Code Here

     */
    @Test
    public final void testDoRPCStringStringOtpErlangObjectArray_fail()
            throws ConnectionException, OtpErlangExit, OtpAuthException,
            IOException, OtpErlangRangeException, InterruptedException {
        final OtpSelf self = new OtpSelf("testDoRPCStringStringOtpErlangList",
                ConnectionFactory.getInstance().getCookie());
        final PeerNode remote = new PeerNode(ConnectionFactory.getInstance()
                .getNodes().get(0).getNode().node());
        final DefaultConnectionPolicy connectionPolicy = new DefaultConnectionPolicy(remote);
        connectionPolicy.setMaxRetries(0);
View Full Code Here

      selfNodeNameToUse = this.selfNodeName + "-" + UUID.randomUUID().toString();
      logger.debug("Creating OtpSelf with node name = [" + selfNodeNameToUse + "]");
    }
    try {
      if (StringUtils.hasText(cookie)) {
        this.otpSelf = new OtpSelf(selfNodeNameToUse.trim(), this.cookie);
      } else {
        this.otpSelf = new OtpSelf(selfNodeNameToUse.trim());
      }
    } catch (IOException e) {
      throw new OtpIOException(e);
    }
    this.otpPeer = new OtpPeer(this.peerNodeName.trim());
View Full Code Here

      selfNodeNameToUse = this.selfNodeName + "-" + UUID.randomUUID().toString();
      logger.debug("Creating OtpSelf with node name = [" + selfNodeNameToUse + "]");
    }
    try {
      if (this.cookie == null) {
        this.otpSelf = new OtpSelf(selfNodeNameToUse.trim());
      } else {
        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

  }

  @Test
  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

      }
    }
  }

  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

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

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.