Package org.serviceconnector.call

Examples of org.serviceconnector.call.SCMPAttachCall.invoke()


          this.connectionType.getValue(), this.keepAliveIntervalSeconds, 0, this.maxConnections);
      this.requester = new SCRequester(remoteNodeConf, this.keepAliveTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPAttachCall attachCall = new SCMPAttachCall(this.requester);
      try {
        attachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        this.requester.destroy();
        // release resources
        AppContext.destroy();
        throw new SCServiceException("Attach to " + host + ":" + port + " failed. ", e);
View Full Code Here


          this.connectionType.getValue(), this.keepAliveIntervalSeconds, 0, this.maxConnections);
      this.requester = new SCRequester(remoteNodeConf, this.keepAliveTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPAttachCall attachCall = new SCMPAttachCall(this.requester);
      try {
        attachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        this.requester.destroy();
        // release resources
        AppContext.destroy();
        throw new SCServiceException("Attach to " + host + ":" + port + " failed. ", e);
View Full Code Here

      for (InetAddress inetAddress : Collections.list(inetAdresses)) {
        try {
          IRequester req = new Requester(new RemoteNodeConfiguration(TestConstants.RemoteNodeName, TestConstants.HOST,
              TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP.getValue(), 0, 0, 1));
          SCMPAttachCall attachCall = new SCMPAttachCall(req);
          attachCall.invoke(cbk, 1000);
          TestUtil.checkReply(cbk.getMessageSync(1000));

          SCMPDetachCall detachCall = new SCMPDetachCall(req);
          detachCall.invoke(cbk, 1000);
          TestUtil.checkReply(cbk.getMessageSync(1000));
View Full Code Here

          this.connectionType.getValue(), this.keepAliveIntervalSeconds, 0, this.maxConnections);
      this.requester = new SCRequester(remoteNodeConf, this.keepAliveTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPAttachCall attachCall = new SCMPAttachCall(this.requester);
      try {
        attachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        this.requester.destroy();
        // release resources
        AppContext.destroy();
        throw new SCServiceException("Attach to " + host + ":" + port + " failed. ", e);
View Full Code Here

  public void t01_AttachDetach() throws Exception {
    this.requester = new SCRequester(new RemoteNodeConfiguration(TestConstants.RemoteNodeName, TestConstants.HOST, this.port,
        this.connectionType.getValue(), 0, 0, 1), 0);
    SCMPAttachCall attachCall = new SCMPAttachCall(this.requester);
    TestCallback callback1 = new TestCallback();
    attachCall.invoke(callback1, 10000);
    SCMPMessage result = callback1.getMessageSync(10000);
    TestUtil.checkReply(result);

    Assert.assertNull(result.getBody());
    Assert.assertNull(result.getMessageSequenceNr());
View Full Code Here

        this.requester.send(this.requestMessage, timeoutMillis, scmpCallback);
        return;
      }
    };
    TestCallback cbk = new TestCallback(true);
    attachCall.invoke(cbk, 1000);
    SCMPMessage result = cbk.getMessageSync(3000);
    TestUtil.verifyError(result, SCMPError.HV_WRONG_SC_VERSION_FORMAT, SCMPMsgType.ATTACH);
  }

  /**
 
View Full Code Here

        this.requester.send(this.requestMessage, timeoutMillis, scmpCallback);
        return;
      }
    };
    TestCallback cbk = new TestCallback(true);
    attachCall.invoke(cbk, 1000);
    SCMPMessage result = cbk.getMessageSync(3000);
    TestUtil.verifyError(result, SCMPError.HV_WRONG_SC_RELEASE_NR, SCMPMsgType.ATTACH);
  }

  /**
 
View Full Code Here

        this.requester.send(this.requestMessage, timeoutMillis, scmpCallback);
        return;
      }
    };
    TestCallback cbk = new TestCallback(true);
    attachCall.invoke(cbk, 1000);
    SCMPMessage result = cbk.getMessageSync(3000);
    TestUtil.verifyError(result, SCMPError.HV_WRONG_SC_VERSION_FORMAT, SCMPMsgType.ATTACH);
  }

  /**
 
View Full Code Here

        this.requester.send(this.requestMessage, timeoutMillis, scmpCallback);
        return;
      }
    };
    TestCallback cbk = new TestCallback(true);
    attachCall.invoke(cbk, 1000);
    SCMPMessage result = cbk.getMessageSync(3000);
    Assert.assertFalse(result.isFault());
  }
}
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.