Class FileServer

java.lang.Object
org.serviceconnector.server.Server
org.serviceconnector.server.FileServer
All Implemented Interfaces:
IServer

public class FileServer extends Server
The Class FileServer.
  • Constructor Details

    • FileServer

      public FileServer(RemoteNodeConfiguration remoteNodeConfiguration, InetSocketAddress socketAddress)
      Instantiates a new file server.
      Parameters:
      remoteNodeConfiguration - the remote node configuration
      socketAddress - the socket address
  • Method Details

    • serverUploadFile

      public SCMPMessage serverUploadFile(FileSession session, SCMPMessage message, String remoteFileName, int timeoutMillis) throws Exception
      Server upload file.
      Parameters:
      session - the session
      message - the message
      remoteFileName - the remote file name
      timeoutMillis - the timeout milliseconds
      Returns:
      the sCMP message
      Throws:
      Exception - the exception
    • serverDownloadFile

      public SCMPMessage serverDownloadFile(FileSession session, SCMPMessage message, String remoteFileName, int timeoutSeconds) throws Exception
      Server download file.
      Parameters:
      session - the session
      message - the message
      remoteFileName - the remote file name
      timeoutSeconds - the timeout seconds
      Returns:
      the sCMP message
      Throws:
      Exception - the exception
    • serverGetFileList

      public SCMPMessage serverGetFileList(String path, String listScriptName, SCMPMessage reqMessage, int timeoutSeconds) throws Exception
      Server get file list.
      Parameters:
      path - the path
      listScriptName - the list script name
      reqMessage - the request message
      timeoutSeconds - the timeout seconds
      Returns:
      the SCMP message
      Throws:
      Exception - the exception
    • abortSession

      public void abortSession(AbstractSession session, String reason)
      Abort session.
      Parameters:
      session - the session
      reason - the reason
    • hasFreeSession

      public boolean hasFreeSession()
      Checks for free session.
      Returns:
      true, if successful
    • addSession

      public void addSession(FileSession session)
      Adds the session.
      Parameters:
      session - the session
    • removeSession

      public void removeSession(Session session)
      Removes the session.
      Parameters:
      session - the session
    • getMaxSessions

      public int getMaxSessions()
      Gets the max sessions.
      Returns:
      the max sessions
    • dump

      public void dump(XMLDumpWriter writer) throws Exception
      Dump the server into the xml writer.
      Parameters:
      writer - the writer
      Throws:
      Exception - the exception