Examples of invoke()


Examples of org.serviceconnector.call.SCMPFileDownloadCall.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

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

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

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

      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

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

  private String inspectCall(int operationTimeoutSeconds, String instruction) throws SCServiceException {
    SCMPInspectCall inspectCall = new SCMPInspectCall(this.requester);
    SCServiceCallback callback = new SCServiceCallback(true);
    try {
      inspectCall.setRequestBody(instruction);
      inspectCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
    } catch (Exception e) {
      this.requester.destroy();
      throw new SCServiceException("Inspect request failed. ", e);
    }
    if (instruction.equalsIgnoreCase(Constants.CC_CMD_KILL)) {
View Full Code Here

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

  private String manageCall(int operationTimeoutSeconds, String instruction) throws SCServiceException {
    SCMPManageCall manageCall = new SCMPManageCall(this.requester);
    SCServiceCallback callback = new SCServiceCallback(true);
    try {
      manageCall.setRequestBody(instruction);
      manageCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
    } catch (Exception e) {
      this.requester.destroy();
      throw new SCServiceException(instruction + " SC failed.", e);
    }
    if (instruction.equalsIgnoreCase(Constants.CC_CMD_KILL)) {
View Full Code Here

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

      publishCall.setMask(publishMessage.getMask());
      publishCall.setPartSize(publishMessage.getPartSize());
      publishCall.setMessageInfo(publishMessage.getMessageInfo());
      SCServerCallback callback = new SCServerCallback(true);
      try {
        publishCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        throw new SCServiceException("Publish failed. ", e);
      }
      SCMPMessage message = callback.getMessageSync(operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      if (message.isFault()) {
View Full Code Here

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

    SCPublishServiceCallback callback = new SCPublishServiceCallback(this, this.messageCallback);
    SCMPReceivePublicationCall receivePublicationCall = new SCMPReceivePublicationCall(this.requester, this.serviceName,
        this.sessionId);
    try {
      PerformanceLogger.begin(this.sessionId);
      receivePublicationCall.invoke(callback, Constants.SEC_TO_MILLISEC_FACTOR
          * (this.receivePublicationTimeoutSeconds + this.noDataIntervalSeconds));
    } catch (Exception e) {
      PerformanceLogger.end(this.sessionId);
      // inactivate the session
      this.sessionActive = false;
View Full Code Here

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

      registerServerCall.setVersion(SCMPMessage.SC_VERSION.toString());
      registerServerCall.setLocalDateTime(DateTimeUtility.getCurrentTimeZoneMillis());
      registerServerCall.setUrlPath(this.urlPath);
      SCServerCallback callback = new SCServerCallback(true);
      try {
        registerServerCall.invoke(callback, Constants.DEFAULT_OPERATION_TIMEOUT_SECONDS * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        throw new SCServiceException("Register server failed. ", e);
      }
      SCMPMessage reply = callback.getMessageSync(Constants.DEFAULT_OPERATION_TIMEOUT_SECONDS
          * Constants.SEC_TO_MILLISEC_FACTOR);
 
View Full Code Here

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

      int timeoutMillis) throws ConnectionPoolBusyException {
    // setting the http url file qualifier which is necessary to communicate with the server.
    message.setHttpUrlFileQualifier(this.remoteNodeConfiguration.getHttpUrlFileQualifier());
    SCMPSrvAbortSessionCall srvAbortSessionCall = new SCMPSrvAbortSessionCall(this.requester, message);
    try {
      srvAbortSessionCall.invoke(callback, timeoutMillis);
    } catch (ConnectionPoolBusyException ex) {
      throw ex;
    } catch (Exception th) {
      callback.receive(th);
    }
View Full Code Here

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

      int timeoutMillis) throws ConnectionPoolBusyException {
    // setting the http url file qualifier which is necessary to communicate with the server.
    message.setHttpUrlFileQualifier(this.remoteNodeConfiguration.getHttpUrlFileQualifier());
    SCMPSrvAbortSubscriptionCall srvAbortSubscriptionCall = new SCMPSrvAbortSubscriptionCall(this.requester, message);
    try {
      srvAbortSubscriptionCall.invoke(callback, timeoutMillis);
    } catch (ConnectionPoolBusyException ex) {
      throw ex;
    } catch (Exception th) {
      callback.receive(th);
    }
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.