Class GridFTPServerFacade

    • Constructor Detail

    • Method Detail

      • setCredential

        public void setCredential​(org.ietf.jgss.GSSCredential cred)
      • setDataChannelProtection

        public void setDataChannelProtection​(int protection)
      • setTCPBufferSize

        public void setTCPBufferSize​(int size)
                              throws ClientException
        This method needs to be called BEFORE the local socket(s) get created. In other words, before setActive(), setPassive(), get(), put(), etc.
        Throws:
        ClientException
      • closeOutgoingSockets

        private void closeOutgoingSockets()
                                   throws ClientException
        All sockets opened when this server was active should send a special EBlock header before closing.
        Throws:
        ClientException
      • setActive

        public void setActive​(HostPort hp)
                       throws java.net.UnknownHostException,
                              ClientException,
                              java.io.IOException
        Description copied from class: FTPServerFacade
        Asynchronous; return before completion. Connect to the remote server. Any exception that would occure will not be thrown but returned through the local control channel.
        Overrides:
        setActive in class FTPServerFacade
        Throws:
        java.net.UnknownHostException
        ClientException
        java.io.IOException
      • setStripedActive

        public void setStripedActive​(HostPortList hpl)
                              throws java.net.UnknownHostException,
                                     java.io.IOException
        Throws:
        java.net.UnknownHostException
        java.io.IOException
      • setPassive

        public HostPort setPassive​(int port,
                                   int queue)
                            throws java.io.IOException
        Description copied from class: FTPServerFacade
        Start the local server
        Overrides:
        setPassive in class FTPServerFacade
        Parameters:
        port - required server port; can be set to ANY_PORT
        queue - max size of queue of awaiting new connection requests
        Returns:
        the server address
        Throws:
        java.io.IOException
      • setStripedPassive

        public HostPortList setStripedPassive()
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • setStripedPassive

        public HostPortList setStripedPassive​(int port,
                                              int queue)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • store

        public void store​(DataSink sink)
        Store the data from the data channel to the data sink. Does not block. If operation fails, exception might be thrown via local control channel.
        Overrides:
        store in class FTPServerFacade
        Parameters:
        sink - source of data
      • retrieve

        public void retrieve​(DataSource source)
        Retrieve the data from the data source and write to the data channel. This method does not block. If operation fails, exception might be thrown via local control channel.
        Overrides:
        retrieve in class FTPServerFacade
        Parameters:
        source - source of data
      • abort

        public void abort()
                   throws java.io.IOException
        Description copied from class: FTPServerFacade
        close data channels, but not control, nor the server
        Overrides:
        abort in class FTPServerFacade
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Overrides:
        close in class FTPServerFacade
        Throws:
        java.io.IOException
      • authenticate

        public static java.net.Socket authenticate​(java.net.Socket simpleSocket,
                                                   boolean isClientSocket,
                                                   org.ietf.jgss.GSSCredential credential,
                                                   int protection,
                                                   DataChannelAuthentication dcau)
                                            throws java.lang.Exception
        authenticate socket. if protection on, return authenticated socket wrapped over the original simpleSocket, else return original socket.
        Throws:
        java.lang.Exception