Package org.serviceconnector.call

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


    // 2. initialize call & invoke
    try {
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPDetachCall detachCall = new SCMPDetachCall(this.requester);
      try {
        detachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        throw new SCServiceException("Detach client failed. ", e);
      }
      // 3. receiving reply and error handling
      SCMPMessage reply = callback.getMessageSync(operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
 
View Full Code Here


    // 2. initialize call & invoke
    try {
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPDetachCall detachCall = new SCMPDetachCall(this.requester);
      try {
        detachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        throw new SCServiceException("Detach client failed. ", e);
      }
      // 3. receiving reply and error handling
      SCMPMessage reply = callback.getMessageSync(operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
 
View Full Code Here

          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));
          req.destroy();
        } catch (Exception e) {
          Assert.fail("Connection to NIC : " + inetAddress.getHostAddress() + " failed!");
        }
View Full Code Here

    // 2. initialize call & invoke
    try {
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPDetachCall detachCall = new SCMPDetachCall(this.requester);
      try {
        detachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        throw new SCServiceException("Detach client failed. ", e);
      }
      // 3. receiving reply and error handling
      SCMPMessage reply = callback.getMessageSync(operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
 
View Full Code Here

    Assert.assertEquals(SCMPMsgType.ATTACH.getValue(), result.getHeader(SCMPHeaderAttributeKey.MSG_TYPE));
    ValidatorUtility.validateDateTime(result.getHeader(SCMPHeaderAttributeKey.LOCAL_DATE_TIME), SCMPError.HV_WRONG_LDT);

    TestCallback callback2 = new TestCallback();
    SCMPDetachCall detachCall = new SCMPDetachCall(this.requester);
    detachCall.invoke(callback2, 10000);
    result = callback2.getMessageSync(10000);
    TestUtil.checkReply(result);
    Assert.assertNull(result.getBody());
    Assert.assertNull(result.getMessageSequenceNr());
    Assert.assertEquals(SCMPMsgType.DETACH.getValue(), result.getHeader(SCMPHeaderAttributeKey.MSG_TYPE));
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.