Package org.serviceconnector.call

Examples of org.serviceconnector.call.SCMPFileUploadCall


    this.createFileSession(operationTimeoutSeconds);
    this.requester.getSCMPMsgSequenceNr().incrementAndGetMsgSequenceNr();
    // 2. initialize call & invoke
    try {
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPFileUploadCall uploadFileCall = new SCMPFileUploadCall(this.requester, this.serviceName, this.sessionId);
      uploadFileCall.setRequestBody(inStream);
      uploadFileCall.setRemoteFileName(remoteFileName);
      uploadFileCall.getRequest().setPartSize(Constants.SIZE_64KB);
      try {
        LOGGER.debug("SCFileService uploadFile begin");
        uploadFileCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
        LOGGER.debug("SCFileService uploadFile done");
      } catch (Exception e) {
        throw new SCServiceException("Upload file failed. ", e);
      }
      // 3. receiving reply and error handling
View Full Code Here


   *            the callback
   * @param timeoutMillis
   *            the timeout milliseconds
   */
  public void serverUploadFile(SCMPMessage msgToForward, CommandCascCallback callback, int timeoutMillis) {
    SCMPFileUploadCall fileUploadCall = new SCMPFileUploadCall(this.requester, msgToForward);

    try {
      fileUploadCall.invoke(callback, (int) (this.operationTimeoutMultiplier * timeoutMillis));
    } catch (Exception e) {
      // echo failed
      callback.receive(e);
    }
  }
View Full Code Here

    this.createFileSession(operationTimeoutSeconds);
    this.requester.getSCMPMsgSequenceNr().incrementAndGetMsgSequenceNr();
    // 2. initialize call & invoke
    try {
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPFileUploadCall uploadFileCall = new SCMPFileUploadCall(this.requester, this.serviceName, this.sessionId);
      uploadFileCall.setRequestBody(inStream);
      uploadFileCall.setRemoteFileName(remoteFileName);
      uploadFileCall.getRequest().setPartSize(this.partSize);
      try {
        LOGGER.debug("SCFileService uploadFile begin");
        uploadFileCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
        LOGGER.debug("SCFileService uploadFile done");
      } catch (Exception e) {
        throw new SCServiceException("Upload file failed. ", e);
      }
      // 3. receiving reply and error handling
View Full Code Here

   *            the callback
   * @param timeoutMillis
   *            the timeout milliseconds
   */
  public void serverUploadFile(SCMPMessage msgToForward, CommandCascCallback callback, int timeoutMillis) {
    SCMPFileUploadCall fileUploadCall = new SCMPFileUploadCall(this.requester, msgToForward);

    try {
      fileUploadCall.invoke(callback, (int) (this.operationTimeoutMultiplier * timeoutMillis));
    } catch (Exception e) {
      // echo failed
      callback.receive(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.serviceconnector.call.SCMPFileUploadCall

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.