Package org.serviceconnector.call

Examples of org.serviceconnector.call.SCMPFileDownloadCall


    this.createFileSession(operationTimeoutSeconds);
    this.requester.getSCMPMsgSequenceNr().incrementAndGetMsgSequenceNr();
    // 2. initialize call & invoke
    try {
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPFileDownloadCall downloadFileCall = new SCMPFileDownloadCall(this.requester, this.serviceName, this.sessionId);
      downloadFileCall.setRemoteFileName(remoteFileName);
      try {
        downloadFileCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        throw new SCServiceException("Download file failed. ", e);
      }
      // 3. receiving reply and error handling
      SCMPMessage reply = callback.getMessageSync(operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
 
View Full Code Here


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

    try {
      fileDownloadCall.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);
      SCMPFileDownloadCall downloadFileCall = new SCMPFileDownloadCall(this.requester, this.serviceName, this.sessionId);
      downloadFileCall.setRemoteFileName(remoteFileName);
      try {
        downloadFileCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        throw new SCServiceException("Download file failed. ", e);
      }
      // 3. receiving reply and error handling
      SCMPMessage reply = callback.getMessageSync(operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
 
View Full Code Here

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

    try {
      fileDownloadCall.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.SCMPFileDownloadCall

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.