Package org.serviceconnector.server

Examples of org.serviceconnector.server.FileServer


      scmpCommandException.setMessageType(getKey());
      throw scmpCommandException;
    }
    SCMPMessage reply = null;
    try {
      FileServer fileServer = fileService.getServer();
      reply = fileServer.serverGetFileList(fileService.getPath(), fileService.getGetFileListScriptName(),
          message.getServiceName(), oti);
    } catch (Exception e) {
      SCMPCommandException scmpCommandException = new SCMPCommandException(SCMPError.GET_FILE_LIST_FAILED,
          "Error occured in get file list on SC.");
      scmpCommandException.setMessageType(getKey());
View Full Code Here


      FileService fileService = (FileService) abstractService;
      // create file session
      FileSession fileSession = new FileSession(sessionInfo, ipAddressList, fileService.getPath(),
          fileService.getUploadFileScriptName(), fileService.getGetFileListScriptName());
      fileSession.setService(fileService);
      FileServer fileServer = fileService.allocateFileServerAndCreateSession(fileSession);
      // add server to session
      fileSession.setServer(fileServer);
      fileSession.setSessionTimeoutMillis(eciInMillis * basicConf.getEchoIntervalMultiplier());
      // finally add file session to the registry
      this.sessionRegistry.addSession(fileSession.getId(), fileSession);
View Full Code Here

    double otiOnSCSeconds = (otiOnSCMillis / Constants.SEC_TO_MILLISEC_FACTOR);
    this.sessionRegistry.resetSessionTimeout(session, (otiOnSCSeconds + session.getSessionTimeoutMillis()));
    SCMPMessage reply = null;
    try {
      String remoteFileName = message.getHeader(SCMPHeaderAttributeKey.REMOTE_FILE_NAME);
      FileServer fileServer = session.getFileServer();
      reply = fileServer.serverUploadFile(session, message, remoteFileName, oti);
    } catch (Exception e) {
      SCMPCommandException scmpCommandException = new SCMPCommandException(SCMPError.FILE_UPLOAD_FAILED,
          "Error occured in file server on SC.");
      scmpCommandException.setMessageType(getKey());
      throw scmpCommandException;
View Full Code Here

    SCMPMessage reply = null;
    try {
      String remoteFileName = message.getHeader(SCMPHeaderAttributeKey.REMOTE_FILE_NAME);

      FileServer fileServer = session.getFileServer();
      reply = fileServer.serverDownloadFile(session, message, remoteFileName, oti);
    } catch (Exception e) {
      reply = new SCMPMessage();
      SCMPCommandException scmpCommandException = new SCMPCommandException(SCMPError.FILE_DOWNLOAD_FAILED,
          "Error occured in file server on SC.");
      scmpCommandException.setMessageType(getKey());
View Full Code Here

      FileService fileService = (FileService) abstractService;
      // create file session
      FileSession fileSession = new FileSession(sessionInfo, ipAddressList, fileService.getPath(),
          fileService.getUploadFileScriptName(), fileService.getGetFileListScriptName());
      fileSession.setService(fileService);
      FileServer fileServer = fileService.allocateFileServerAndCreateSession(fileSession);
      // add server to session
      fileSession.setServer(fileServer);
      fileSession.setSessionTimeoutMillis(eciInMillis * basicConf.getEchoIntervalMultiplier());
      // finally add file session to the registry
      this.sessionRegistry.addSession(fileSession.getId(), fileSession);
View Full Code Here

    SCMPMessage reply = null;
    try {
      String remoteFileName = message.getHeader(SCMPHeaderAttributeKey.REMOTE_FILE_NAME);

      FileServer fileServer = session.getFileServer();
      reply = fileServer.serverDownloadFile(session, message, remoteFileName, oti);
    } catch (Exception e) {
      // SCMP Version request
      reply = new SCMPMessage(message.getSCMPVersion());
      SCMPCommandException scmpCommandException = new SCMPCommandException(SCMPError.FILE_DOWNLOAD_FAILED,
          "Error occured in file server on SC.");
View Full Code Here

      FileService fileService = (FileService) abstractService;
      // create file session
      FileSession fileSession = new FileSession(sessionInfo, ipAddressList, fileService.getPath(),
          fileService.getUploadFileScriptName(), fileService.getGetFileListScriptName());
      fileSession.setService(fileService);
      FileServer fileServer = fileService.allocateFileServerAndCreateSession(fileSession);
      // add server to session
      fileSession.setServer(fileServer);
      fileSession.setSessionTimeoutMillis(eciInMillis * basicConf.getEchoIntervalMultiplier());
      // finally add file session to the registry
      this.sessionRegistry.addSession(fileSession.getId(), fileSession);
View Full Code Here

      scmpCommandException.setMessageType(getKey());
      throw scmpCommandException;
    }
    SCMPMessage reply = null;
    try {
      FileServer fileServer = fileService.getServer();
      reply = fileServer.serverGetFileList(fileService.getPath(), fileService.getGetFileListScriptName(),
          message, oti);
    } catch (Exception e) {
      SCMPCommandException scmpCommandException = new SCMPCommandException(SCMPError.GET_FILE_LIST_FAILED,
          "Error occured in get file list on SC.");
      scmpCommandException.setMessageType(getKey());
View Full Code Here

      FileService fileService = (FileService) abstractService;
      // create file session
      FileSession fileSession = new FileSession(sessionInfo, ipAddressList, fileService.getPath(),
          fileService.getUploadFileScriptName(), fileService.getGetFileListScriptName());
      fileSession.setService(fileService);
      FileServer fileServer = fileService.allocateFileServerAndCreateSession(fileSession);
      // add server to session
      fileSession.setServer(fileServer);
      fileSession.setSessionTimeoutMillis(eciInMillis * basicConf.getEchoIntervalMultiplier());
      // finally add file session to the registry
      this.sessionRegistry.addSession(fileSession.getId(), fileSession);
View Full Code Here

    double otiOnSCSeconds = (otiOnSCMillis / Constants.SEC_TO_MILLISEC_FACTOR);
    this.sessionRegistry.resetSessionTimeout(session, (otiOnSCSeconds + session.getSessionTimeoutMillis()));
    SCMPMessage reply = null;
    try {
      String remoteFileName = message.getHeader(SCMPHeaderAttributeKey.REMOTE_FILE_NAME);
      FileServer fileServer = session.getFileServer();
      reply = fileServer.serverUploadFile(session, message, remoteFileName, oti);
    } catch (Exception e) {
      SCMPCommandException scmpCommandException = new SCMPCommandException(SCMPError.FILE_UPLOAD_FAILED,
          "Error occured in file server on SC.");
      scmpCommandException.setMessageType(getKey());
      throw scmpCommandException;
View Full Code Here

TOP

Related Classes of org.serviceconnector.server.FileServer

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.